diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2009-12-23 07:50:22 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2009-12-23 07:50:22 +0000 |
commit | 403ebc7e2c1134cb65763e8cacbca790a82360d7 (patch) | |
tree | bc19cb772a32fa933310f85a572a15b8391b4296 /gcc/testsuite/gcc.dg | |
parent | 070ba483434fc103357a001baeb4f907170854c4 (diff) | |
download | gcc-403ebc7e2c1134cb65763e8cacbca790a82360d7.zip gcc-403ebc7e2c1134cb65763e8cacbca790a82360d7.tar.gz gcc-403ebc7e2c1134cb65763e8cacbca790a82360d7.tar.bz2 |
re PR tree-optimization/42205 ([graphite] internal compiler error: verify_ssa failed with -ffast-math -floop-interchange)
Fix PR42205.
2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42205
* graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
Insert the reduction copy in the same block as the phi node.
(follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
* testsuite/gcc.dg/graphite/pr42205-1.c: New.
* testsuite/gcc.dg/graphite/pr42205-2.c: New.
From-SVN: r155419
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/pr42205-1.c | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/pr42205-2.c | 11 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/pr42205-1.c b/gcc/testsuite/gcc.dg/graphite/pr42205-1.c new file mode 100644 index 0000000..413b9f7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr42205-1.c @@ -0,0 +1,17 @@ +/* { dg-options "-O1 -ffast-math -floop-interchange" } */ + +int adler32(int adler, char *buf, int n) +{ + int sum = 0; + do { + adler += buf[0]; + sum += adler; + adler += buf[1]; + sum += adler; + adler += buf[2]; + sum += adler; + adler += buf[3]; + sum += adler; + } while (--n); + return adler | (sum << 16); +} diff --git a/gcc/testsuite/gcc.dg/graphite/pr42205-2.c b/gcc/testsuite/gcc.dg/graphite/pr42205-2.c new file mode 100644 index 0000000..595cedb --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr42205-2.c @@ -0,0 +1,11 @@ +/* { dg-options "-O1 -funsafe-math-optimizations -floop-interchange" } */ + +double f(double x) +{ + double y = 0.0; + int i; + for (i = 0; i < 8; i++) { + y += x * i; + } + return y; +} |