------- Comment #4 from gael dot guennebaud at gmail dot com 2009-06-24 11:12 ------- some additional info:
- compiling with -fno-strict-aliasing fix the issue, so perhaps this is not a real bug but a feature ? - on the other hand using the may_alias type attribute for casting does not help: inline __m128 ploadu(const float* from) { typedef double __attribute__((may_alias)) doubleA; typedef __m128 __attribute__((may_alias)) __m128A; __m128 r; r = (__m128A)(_mm_load_sd( (const doubleA*)(from) )); r = _mm_loadh_pi(r, (const __m64*)(from+2)); return r; } I guess this is because the "const doubleA*" is then casted to a "const double*" when calling the _mm_load_sd() function. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40537