http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43147
Marc Glisse <marc.glisse at normalesup dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc.glisse at normalesup | |dot org --- Comment #4 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-23 08:40:04 UTC --- Apart from combining 2 shuffles, I would expect the set and the shuffle to be combined in Comment 1. I was going to report the following, but it already appears in this bug: __m128d f(double d){ __m128d x=_mm_setr_pd(-d,d); return _mm_shuffle_pd(x,x,1); } movsd .LC0(%rip), %xmm1 xorpd %xmm0, %xmm1 movapd %xmm1, %xmm2 unpcklpd %xmm0, %xmm2 movapd %xmm2, %xmm0 shufpd $1, %xmm2, %xmm0 some extra moves, as usual, and a shuffle that could be combined with the unpack. (obviously we don't write such code, it is only after inlining that it looks that way)