------- Comment #1 from rguenth at gcc dot gnu dot org 2007-12-12 09:55 ------- Without optimization main() preprocesses to
int main() { ((__m128i)__builtin_ia32_pshufd ((__v4si)Vec(5), (((3) << 6) | ((3) << 4) | ((3) << 2) | (3)))); } with optimization we get instead int main() { _mm_shuffle_epi32(Vec(5), (((3) << 6) | ((3) << 4) | ((3) << 2) | (3))); } because with optimization we use an inline function instead of a macro. Uros - it was you who changed that (and I see it may not be too easy to make all parties happy here). My suggestion is to force the same "argument" type by doing #define _mm_shuffle_epi32(__A, __B) \ ((__m128i)__builtin_ia32_pshufd ((__v4si)(__m128i)__A, (int)__B)) instead of #define _mm_shuffle_epi32(__A, __B) \ ((__m128i)__builtin_ia32_pshufd ((__v4si)__A, __B)) to match the prototype of _mm_shuffle_epi32 which reads static __inline __m128i __attribute__((__always_inline__, __artificial__)) _mm_shuffle_epi32 (__m128i __A, const int __mask) { return (__m128i)__builtin_ia32_pshufd ((__v4si)__A, __mask); } and adjust all !__OPTIMIZE__ macro variants this way. (at least this makes this testcase work properly) -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uros at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |rejects-valid Last reconfirmed|0000-00-00 00:00:00 |2007-12-12 09:55:10 date| | Summary|SSE2 intrinsics - emmintrin |[4.3 Regression] SSE2 |with optimisations off and |intrinsics - emmintrin with |type conversion error |optimisations off and type | |conversion error Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34435