1; RUN: llc -march=mips < %s 2; RUN: llc -march=mips -mattr=+msa,+fp64,+mips32r2 < %s 3; RUN: llc -march=mipsel < %s 4; RUN: llc -march=mipsel -mattr=+msa,+fp64,+mips32r2 < %s 5 6; This test originally failed for MSA with a "Cannot select ..." error. 7; This happened because the legalizer treated undef's in the <4 x float> 8; constant as equivalent to the defined elements when checking if it a constant 9; splat, but then proceeded to legalize the undef's to zero, leaving it as a 10; non-splat that cannot be selected. It should have eliminated the undef's by 11; rewriting the splat constant. 12 13; It should at least successfully build. 14 15define void @autogen_SD2501752154() { 16BB: 17 %BC = bitcast <4 x i32> <i32 -1, i32 -1, i32 undef, i32 undef> to <4 x float> 18 br label %CF74 19 20CF74: ; preds = %CF74, %CF 21 %E54 = extractelement <1 x i1> undef, i32 0 22 br i1 %E54, label %CF74, label %CF79 23 24CF79: ; preds = %CF75 25 %I63 = insertelement <4 x float> %BC, float undef, i32 0 26 ret void 27} 28