This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/37221] GCC for Cell SPU produces poor code when there is load-after-store in different loops



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]