This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/37096] conditional evaluation incorrect with -O3
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2008 18:16:07 -0000
- Subject: [Bug target/37096] conditional evaluation incorrect with -O3
- References: <bug-37096-16590@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from ubizjak at gmail dot com 2008-09-11 18:16 -------
Hm, with -O2 -fno-strict-aliasing, it works fine.
Is there an aliasing issue involved?
short Transform4x4(short *pMatrix)
{
__m128i r4, r5;
__m128i r0 = _mm_loadl_epi64((__m128i *)(pMatrix + 0 * 16));
__m128i r1 = _mm_loadl_epi64((__m128i *)(pMatrix + 1 * 16));
__m128i r2 = _mm_loadl_epi64((__m128i *)(pMatrix + 2 * 16));
__m128i r3 = _mm_loadl_epi64((__m128i *)(pMatrix + 3 * 16));
... stuff ...
_mm_storel_epi64((__m128i *)(pMatrix + 0 * 16), r0);
_mm_storel_epi64((__m128i *)(pMatrix + 1 * 16), r1);
_mm_storel_epi64((__m128i *)(pMatrix + 2 * 16), r2);
_mm_storel_epi64((__m128i *)(pMatrix + 3 * 16), r3);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37096