------- Comment #6 from suckfish at ihug dot co dot nz 2008-10-11 23:24 ------- I think this function actually gets miscompiled:
typedef int v2si __attribute__ ((vector_size (8))); v2si foo (v2si x) { x &= (v2si) 0xffffffffll; x = __builtin_ia32_psrad (x, 1); x &= (v2si) 0x80000000ll; return x; } to foo: pxor %xmm0, %xmm0 ret The psrad is preserving the sign bit we are returning, so the compiler should not assume it to be zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37807