[Bug target/42431] [4.5 Regression] wrong code for 200.sixtrack with vectorization and -fdata-sections

janis at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Feb 12 20:36:00 GMT 2010



------- Comment #6 from janis at gcc dot gnu dot org  2010-02-12 20:36 -------
In the attached testcase wrong code is generated for the loop in subroutine
sub3 that sets 12 of the elements of array k to zero.  While minimizing the
testcase I saw different kinds of bad code for that array, but with this
version it's:

        vxor 31,31,31
        ld 9,.LC2@toc(2)
        ld 29,.LC2@toc(2)
        li 0,16 
        stvx 31,0,29
        add 9,9,9
        stvx 31,0,9
        stvx 31,9.0

Needless to say, doubling the array address has bad consequences.  It would
make
 sense if the instruction were instead "add 9,29,0"

I'm planning to stare at dump files for awhile but won't complain if someone
else figures it out first.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42431



More information about the Gcc-bugs mailing list