This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43657] [4.3/4.4/4.5/4.6 Regression] -ftree-loop-linear causes FAIL: gcc.dg/vect/vect-cond-5.c execution test
- From: "changpeng.fang at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Oct 2010 21:28:02 +0000
- Subject: [Bug tree-optimization/43657] [4.3/4.4/4.5/4.6 Regression] -ftree-loop-linear causes FAIL: gcc.dg/vect/vect-cond-5.c execution test
- Auto-submitted: auto-generated
- References: <bug-43657-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43657
--- Comment #4 from Changpeng Fang <changpeng.fang at amd dot com> 2010-10-19 21:27:46 UTC ---
for (k = 0; k < 32; k++)
{
res = 0;
for (j = 0; j < 32; j++)
for (i = 0; i < 32; i++)
{
next = a[i][j];
res = c > cond_array[i+k][j] ? next : res;
}
out[k] = res;
}
gcc interchanges i and j loops, which is not legal in this case.
Apparently, res takes the last value of a[i][j] that satisfies the
condition c > cond_array[i+k][j]. As a result, change in the
reference order will get a different value for res.
Anyone knows where to do this legality check?
What about the interchange in Graphite for this case?