Extended Description
We miscompile ffmpeg's mjpegenc_common.c due to a bad instruction being selected to materialize a vector constant. Testcase:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define <4 x i32> @f(<4 x i32> %a) {
%v = add nuw nsw <4 x i32> %a, <i32 16843009, i32 16843009, i32 16843009, i32 16843009>
ret <4 x i32> %v
}
This compiles to:
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
... which computes %a + {1, 1, 1, 1}, not %a + {0x01010101, 0x01010101, 0x01010101, 0x01010101}.