tree-optimization/112495 - alias versioning and address spaces
We are not correctly handling differing address spaces in dependence analysis runtime alias check generation so refuse to do that. PR tree-optimization/112495 * tree-data-ref.cc (runtime_alias_check_p): Reject checks between different address spaces. * gcc.target/i386/pr112495.c: New testcase.
This commit is contained in:
parent
5021fa7076
commit
0f593c0521
2 changed files with 19 additions and 0 deletions
12
gcc/testsuite/gcc.target/i386/pr112495.c
Normal file
12
gcc/testsuite/gcc.target/i386/pr112495.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3" } */
|
||||
|
||||
typedef struct { int v; } T1;
|
||||
typedef struct { T1 v[32]; } T2;
|
||||
|
||||
T1 s;
|
||||
T1 f1() { return s; }
|
||||
|
||||
void f2(__seg_gs T2 *p, int n) {
|
||||
for (int i = 0; i < n; ++i) p->v[i] = f1();
|
||||
}
|
|
@ -1640,6 +1640,13 @@ runtime_alias_check_p (ddr_p ddr, class loop *loop, bool speed_p)
|
|||
"runtime alias check not supported for"
|
||||
" outer loop.\n");
|
||||
|
||||
/* FORNOW: We don't support handling different address spaces. */
|
||||
if (TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (DR_BASE_ADDRESS (DDR_A (ddr)))))
|
||||
!= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (DR_BASE_ADDRESS (DDR_B (ddr))))))
|
||||
return opt_result::failure_at (DR_STMT (DDR_A (ddr)),
|
||||
"runtime alias check between different "
|
||||
"address spaces not supported.\n");
|
||||
|
||||
return opt_result::success ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue