This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37221] GCC for Cell SPU produces poor code when there is load-after-store in different loops
- From: "tehila at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Aug 2008 08:18:25 -0000
- Subject: [Bug middle-end/37221] GCC for Cell SPU produces poor code when there is load-after-store in different loops
- References: <bug-37221-13884@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from tehila at il dot ibm dot com 2008-08-25 08:18 -------
Andrew, thanks for your response and ideas.
>From what we see, if -funroll-loops is on, the loops:
for (j = 0; j < 4; j++)
arr[j] = mat2[i][j];
and
for (k = 0; k < 3; k++)
point += (double) mat1[arr[l]][k];
are being unrolled by the early-unrolling (cunrolli pass, that Richard Guenther
has added).
I think, the problem is that the loop
for (j = 0; j < 4; j++)
is not being unrolled.
cunrolli doesn't recognize # of iterations = 4.
I think it doesn't recognize it starts from 0.
Maybe Richard could help us understand why.
Hopefully, if that loop would be unrolled, the SRA will have the opportunity to
do the transformation we expect it to do.
--
tehila at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard dot guenther at
| |gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37221