diff options
author | Bin Cheng <bin.cheng@arm.com> | 2016-08-09 15:08:02 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2016-08-09 15:08:02 +0000 |
commit | 42970a179d71e59c317440d0567b003681e915ba (patch) | |
tree | e2dec7e06bcb0dea52cd1cba64b1dc05f6b884da /gcc/testsuite/gcc.dg | |
parent | 8aa46dd2d5808a951afee6c6322615225f298d6a (diff) | |
download | gcc-42970a179d71e59c317440d0567b003681e915ba.zip gcc-42970a179d71e59c317440d0567b003681e915ba.tar.gz gcc-42970a179d71e59c317440d0567b003681e915ba.tar.bz2 |
re PR tree-optimization/72772 (Missed SCEV after pass reordering@236440)
PR tree-optimization/72772
* tree-ssa-loop-niter.c (loop_exits_before_overflow): Check equality
for expanded base.
gcc/testsuite
PR tree-optimization/pr72772
* gcc.dg/tree-ssa/pr72772.c: New test.
From-SVN: r239291
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr72772.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr72772.c b/gcc/testsuite/gcc.dg/tree-ssa/pr72772.c new file mode 100644 index 0000000..b998561 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr72772.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */ + +int foo (int flag, char *a) +{ + short i, j; + short l = 0; + if (flag == 1) + l = 3; + + for (i = 0; i < 4; i++) + { + for (j = l - 1; j > 0; j--) + a[j] = a[j - 1]; + a[0] = i; + } +} + +/* Addresses of array reference a[j] and a[j - 1] are SCEVs. */ +/* { dg-final { scan-tree-dump-not "failed: evolution of base is not affine." "ldist" } } */ + |