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 tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly



------- Comment #12 from amodra at gmail dot com  2010-06-16 03:14 -------
testsuite/gcc.dg/vect/pr44507.c is invalid on LP64.  This:

    curVal = *((unsigned long *)(&pArray[index]));

loads 8 bytes, ie. the last time around the loop this loads 4 bytes past the
end of the array.  On big-endian machines this is the low 32 bits so the test
fails.  The obvious fix is to replace the cast with (unsigned int *) and indeed
this makes the test pass on powerpc64.


-- 


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


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