This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/68953] [6 Regression] [graphite] Wrong code w/ -O[12] -floop-nest-optimize
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 21:31:19 +0000
- Subject: [Bug tree-optimization/68953] [6 Regression] [graphite] Wrong code w/ -O[12] -floop-nest-optimize
- Auto-submitted: auto-generated
- References: <bug-68953-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68953
--- Comment #1 from vries at gcc dot gnu.org ---
Created attachment 38141
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38141&action=edit
updated test-case
Fails with -O1, passes with -O2.
The problem is that this loop nest:
...
for (zh = 0; zh < 2; ++zh)
for (ro = 0; ro < 3; ++ro)
yu[ro][0] = yu[zh + 1][0];
...
is rewritten into this loop nest, which has different semantics:
...
for (ro = 0; ro < 3; ++ro)
for (zh = 0; zh < 2; ++zh)
yu[ro][0] = yu[zh + 1][0];
...