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