This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2010 03:14:12 -0000
- Subject: [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
- References: <bug-44507-10630@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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