diff options
author | Richard Biener <rguenther@suse.de> | 2018-10-24 09:42:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-10-24 09:42:19 +0000 |
commit | 53b8a7107e6c6a774d5e69b8fd5ce46e94c35adb (patch) | |
tree | a6c33cf124e89ded62f6b09d7aec6f6204cb4599 /gcc/testsuite | |
parent | 19b5595858162b8a77b84db93b21b39a48dc2d0e (diff) | |
download | gcc-53b8a7107e6c6a774d5e69b8fd5ce46e94c35adb.zip gcc-53b8a7107e6c6a774d5e69b8fd5ce46e94c35adb.tar.gz gcc-53b8a7107e6c6a774d5e69b8fd5ce46e94c35adb.tar.bz2 |
re PR tree-optimization/84013 (wrong __restrict clique with inline asm operand)
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/84013
* tree-ssa-structalias.c (struct msdi_data): New struct for
marshalling data to walk_stmt_load_store_ops.
(maybe_set_dependence_info): Refactor as callback for
walk_stmt_load_store_ops.
(compute_dependence_clique): Set restrict info on all stmt kinds.
* gcc.dg/tree-ssa/restrict-9.c: New testcase.
From-SVN: r265455
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/restrict-9.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fd437f5..c17488a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2018-10-24 Richard Biener <rguenther@suse.de> + PR tree-optimization/84013 + * gcc.dg/tree-ssa/restrict-9.c: New testcase. + +2018-10-24 Richard Biener <rguenther@suse.de> + PR tree-optimization/87665 * gcc.dg/torture/pr87665.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/restrict-9.c b/gcc/testsuite/gcc.dg/tree-ssa/restrict-9.c new file mode 100644 index 0000000..bc7f635 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/restrict-9.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized-alias" } */ + +int *abc(int** __restrict a, int** __restrict b) +{ + *a = 0; // clique 1 base 1 + asm volatile("":"+m"(*b)); // clique 0 base 0 (wrong) + *a = 0; // clique 1 base 1 + return *b; // clique 1 base 2 (what it should be) +} + +/* { dg-final { scan-tree-dump-times "clique 1 base \[12\]" 5 "optimized" } } */ +/* On RTL we can DSE one of the stores of zero, on the GIMPLE level we + do not bother to do disambiguation against asms. */ +/* { dg-final { scan-tree-dump-times " = 0;" 1 "optimized" { xfail *-*-* } } } */ +/* { dg-final { scan-assembler-times "mov\[^\n\r\]*0" 1 { target { x86_64-*-* i?86-*-* } } } } */ |