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: 26 Aug 2008 20:47:37 -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 #5 from tehila at il dot ibm dot com 2008-08-26 20:47 -------
(In reply to comment #3)
> The meaning here is to the second
> for (j = 0; j < 4; j++)
> loop.
> It's loop #4 in cunrolli pass.
> > cunrolli doesn't recognize # of iterations = 4.
> > I think it doesn't recognize it starts from 0.
We think the problem is that j=0 are somewhere before got hoisted into some
part above.
If I add 'printf' before the loop (i.e., after the if) the loop does get
unrolled and with SRA optimization the performance get improved.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37221