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