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 to select instructions for extract_vector_elt for 7; v2f64 on MSA. 8; It should at least successfully build. 9 10define void @autogen_SD997348632(i8*, i32*, i64*, i32, i64, i8) { 11BB: 12 %A4 = alloca <2 x i32> 13 %A3 = alloca <16 x i16> 14 %A2 = alloca <4 x i1> 15 %A1 = alloca <4 x i16> 16 %A = alloca <2 x i32> 17 %L = load i8, i8* %0 18 store i8 %L, i8* %0 19 %E = extractelement <4 x i32> zeroinitializer, i32 0 20 %Shuff = shufflevector <4 x i64> zeroinitializer, <4 x i64> zeroinitializer, <4 x i32> <i32 undef, i32 1, i32 3, i32 5> 21 %I = insertelement <2 x i1> zeroinitializer, i1 false, i32 1 22 %FC = sitofp <4 x i32> zeroinitializer to <4 x double> 23 %Sl = select i1 false, <4 x i64> %Shuff, <4 x i64> %Shuff 24 %L5 = load i8, i8* %0 25 store i8 %5, i8* %0 26 %E6 = extractelement <1 x i16> zeroinitializer, i32 0 27 %Shuff7 = shufflevector <2 x i1> %I, <2 x i1> %I, <2 x i32> <i32 1, i32 undef> 28 %I8 = insertelement <1 x i16> zeroinitializer, i16 0, i32 0 29 %B = xor i32 376034, %3 30 %FC9 = fptoui float 0x406DB70180000000 to i64 31 %Sl10 = select i1 false, <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1> 32 %Cmp = icmp ult <4 x i64> zeroinitializer, zeroinitializer 33 %L11 = load i8, i8* %0 34 store i8 %L, i8* %0 35 %E12 = extractelement <4 x i64> zeroinitializer, i32 2 36 %Shuff13 = shufflevector <4 x i32> zeroinitializer, <4 x i32> zeroinitializer, <4 x i32> <i32 5, i32 7, i32 undef, i32 3> 37 %I14 = insertelement <8 x i32> zeroinitializer, i32 -1, i32 7 38 %B15 = fdiv <4 x double> %FC, %FC 39 %Tr = trunc i32 376034 to i16 40 %Sl16 = select i1 false, <8 x i32> %Sl10, <8 x i32> zeroinitializer 41 %Cmp17 = icmp uge i32 233658, %E 42 br label %CF 43 44CF: ; preds = %CF, %CF79, %CF84, %BB 45 %L18 = load i8, i8* %0 46 store i8 %L, i8* %0 47 %E19 = extractelement <4 x i64> %Sl, i32 3 48 %Shuff20 = shufflevector <2 x i1> %Shuff7, <2 x i1> %I, <2 x i32> <i32 2, i32 0> 49 %I21 = insertelement <4 x i64> zeroinitializer, i64 %FC9, i32 0 50 %B22 = xor <8 x i32> %I14, %I14 51 %Tr23 = trunc i16 0 to i8 52 %Sl24 = select i1 false, <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <8 x i32> zeroinitializer 53 %Cmp25 = icmp eq i1 false, false 54 br i1 %Cmp25, label %CF, label %CF79 55 56CF79: ; preds = %CF 57 %L26 = load i8, i8* %0 58 store i8 %L26, i8* %0 59 %E27 = extractelement <1 x i16> zeroinitializer, i32 0 60 %Shuff28 = shufflevector <16 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <16 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <16 x i32> <i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31, i32 1, i32 3, i32 5, i32 7, i32 9, i32 11> 61 %I29 = insertelement <16 x i32> %Shuff28, i32 %B, i32 15 62 %B30 = fdiv float 0.000000e+00, -6.749110e+06 63 %Sl31 = select i1 false, i32 %3, i32 %3 64 %Cmp32 = fcmp uno float 0.000000e+00, 0x406DB70180000000 65 br i1 %Cmp32, label %CF, label %CF78 66 67CF78: ; preds = %CF78, %CF79 68 %L33 = load i8, i8* %0 69 store i8 %L, i8* %0 70 %E34 = extractelement <16 x i32> %Shuff28, i32 1 71 %Shuff35 = shufflevector <4 x i64> zeroinitializer, <4 x i64> %I21, <4 x i32> <i32 undef, i32 6, i32 0, i32 2> 72 %I36 = insertelement <4 x double> %FC, double 0xA4A57F449CA36CC2, i32 2 73 %Se = sext <4 x i1> %Cmp to <4 x i32> 74 %Sl37 = select i1 %Cmp17, i32 0, i32 0 75 %Cmp38 = icmp ne i32 440284, 376034 76 br i1 %Cmp38, label %CF78, label %CF80 77 78CF80: ; preds = %CF80, %CF82, %CF78 79 %L39 = load i8, i8* %0 80 store i8 %L, i8* %0 81 %E40 = extractelement <2 x i1> %Shuff20, i32 1 82 br i1 %E40, label %CF80, label %CF82 83 84CF82: ; preds = %CF80 85 %Shuff41 = shufflevector <2 x i1> zeroinitializer, <2 x i1> %Shuff20, <2 x i32> <i32 2, i32 0> 86 %I42 = insertelement <2 x i1> %Shuff41, i1 false, i32 0 87 %B43 = sub i32 %E, 0 88 %Sl44 = select i1 %Cmp32, <16 x i32> %Shuff28, <16 x i32> %Shuff28 89 %Cmp45 = icmp sgt <4 x i64> zeroinitializer, %I21 90 %L46 = load i8, i8* %0 91 store i8 %L11, i8* %0 92 %E47 = extractelement <8 x i32> %Sl16, i32 4 93 %Shuff48 = shufflevector <2 x i1> zeroinitializer, <2 x i1> %Shuff7, <2 x i32> <i32 undef, i32 1> 94 %I49 = insertelement <2 x i1> %Shuff48, i1 %Cmp17, i32 1 95 %B50 = and <8 x i32> %I14, %Sl10 96 %FC51 = fptoui float -6.749110e+06 to i1 97 br i1 %FC51, label %CF80, label %CF81 98 99CF81: ; preds = %CF81, %CF82 100 %Sl52 = select i1 false, float -6.749110e+06, float 0x406DB70180000000 101 %Cmp53 = icmp uge <2 x i32> <i32 -1, i32 -1>, <i32 -1, i32 -1> 102 %L54 = load i8, i8* %0 103 store i8 %L5, i8* %0 104 %E55 = extractelement <8 x i32> zeroinitializer, i32 7 105 %Shuff56 = shufflevector <4 x i64> zeroinitializer, <4 x i64> zeroinitializer, <4 x i32> <i32 undef, i32 4, i32 6, i32 0> 106 %I57 = insertelement <2 x i1> %Shuff7, i1 false, i32 0 107 %B58 = fmul <4 x double> %FC, %FC 108 %FC59 = fptoui <4 x double> %I36 to <4 x i16> 109 %Sl60 = select i1 %Cmp17, <2 x i1> %I, <2 x i1> %I57 110 %Cmp61 = icmp ule <8 x i32> %B50, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1> 111 %L62 = load i8, i8* %0 112 store i8 %L33, i8* %0 113 %E63 = extractelement <4 x i64> %Shuff, i32 2 114 %Shuff64 = shufflevector <4 x i64> %Shuff56, <4 x i64> %Shuff56, <4 x i32> <i32 5, i32 7, i32 1, i32 undef> 115 %I65 = insertelement <2 x i1> zeroinitializer, i1 false, i32 1 116 %B66 = sdiv i32 %B, %E55 117 %Tr67 = trunc i8 %L54 to i1 118 br i1 %Tr67, label %CF81, label %CF83 119 120CF83: ; preds = %CF83, %CF81 121 %Sl68 = select i1 %Cmp17, i1 %Cmp25, i1 %Tr67 122 br i1 %Sl68, label %CF83, label %CF84 123 124CF84: ; preds = %CF83 125 %Cmp69 = icmp uge i32 %E, %E34 126 br i1 %Cmp69, label %CF, label %CF77 127 128CF77: ; preds = %CF84 129 %L70 = load i8, i8* %0 130 store i8 %L, i8* %0 131 %E71 = extractelement <4 x i64> %Shuff, i32 0 132 %Shuff72 = shufflevector <2 x i1> zeroinitializer, <2 x i1> %I, <2 x i32> <i32 3, i32 1> 133 %I73 = insertelement <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, i32 %B66, i32 1 134 %FC74 = uitofp i1 %Cmp32 to double 135 %Sl75 = select i1 %FC51, i16 9704, i16 0 136 %Cmp76 = icmp ugt <1 x i16> %I8, %I8 137 store i8 %L39, i8* %0 138 store i8 %5, i8* %0 139 store i8 %Tr23, i8* %0 140 store i8 %L, i8* %0 141 store i8 %5, i8* %0 142 ret void 143} 144