1; RUN: llc -march=mips < %s 2; RUN: llc -march=mips -mattr=+msa,+fp64 < %s 3; RUN: llc -march=mipsel < %s 4; RUN: llc -march=mipsel -mattr=+msa,+fp64 < %s 5 6; This test originally failed to select instructions for extract_vector_elt for 7; v4f32 on MSA. 8; It should at least successfully build. 9 10define void @autogen_SD3997499501(i8*, i32*, i64*, i32, i64, i8) { 11BB: 12 %A4 = alloca <1 x double> 13 %A3 = alloca double 14 %A2 = alloca float 15 %A1 = alloca double 16 %A = alloca double 17 %L = load i8, i8* %0 18 store i8 97, i8* %0 19 %E = extractelement <16 x i64> <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>, i32 14 20 %Shuff = shufflevector <2 x i1> zeroinitializer, <2 x i1> zeroinitializer, <2 x i32> <i32 1, i32 3> 21 %I = insertelement <4 x i64> zeroinitializer, i64 0, i32 3 22 %Tr = trunc <1 x i64> zeroinitializer to <1 x i8> 23 %Sl = select i1 false, double* %A1, double* %A 24 %Cmp = icmp ne <2 x i64> zeroinitializer, zeroinitializer 25 %L5 = load double, double* %Sl 26 store float -4.374162e+06, float* %A2 27 %E6 = extractelement <4 x i64> zeroinitializer, i32 3 28 %Shuff7 = shufflevector <4 x i64> zeroinitializer, <4 x i64> %I, <4 x i32> <i32 2, i32 4, i32 6, i32 undef> 29 %I8 = insertelement <2 x i1> %Shuff, i1 false, i32 0 30 %B = ashr <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, <i32 -1, i32 -1, i32 -1, i32 -1> 31 %PC = bitcast float* %A2 to float* 32 %Sl9 = select i1 false, i32 82299, i32 0 33 %Cmp10 = icmp slt i8 97, %5 34 br label %CF72 35 36CF72: ; preds = %CF72, %CF80, %CF78, %BB 37 %L11 = load double, double* %Sl 38 store double 0.000000e+00, double* %Sl 39 %E12 = extractelement <2 x i1> zeroinitializer, i32 0 40 br i1 %E12, label %CF72, label %CF80 41 42CF80: ; preds = %CF72 43 %Shuff13 = shufflevector <2 x i1> zeroinitializer, <2 x i1> zeroinitializer, <2 x i32> <i32 3, i32 1> 44 %I14 = insertelement <2 x i64> zeroinitializer, i64 %4, i32 1 45 %B15 = fadd double %L5, 0.000000e+00 46 %BC = bitcast i32 0 to float 47 %Sl16 = select i1 %E12, float 0xC7957ED940000000, float %BC 48 %Cmp17 = icmp eq i32 136082, 471909 49 br i1 %Cmp17, label %CF72, label %CF77 50 51CF77: ; preds = %CF77, %CF80 52 %L18 = load double, double* %Sl 53 store double 0.000000e+00, double* %Sl 54 %E19 = extractelement <2 x i1> zeroinitializer, i32 0 55 br i1 %E19, label %CF77, label %CF78 56 57CF78: ; preds = %CF77 58 %Shuff20 = shufflevector <2 x i1> zeroinitializer, <2 x i1> zeroinitializer, <2 x i32> <i32 1, i32 3> 59 %I21 = insertelement <8 x i1> zeroinitializer, i1 %Cmp10, i32 7 60 %B22 = sdiv <4 x i64> %Shuff7, zeroinitializer 61 %FC = uitofp i8 97 to double 62 %Sl23 = select i1 %Cmp10, <2 x i1> zeroinitializer, <2 x i1> zeroinitializer 63 %L24 = load double, double* %Sl 64 store float %Sl16, float* %PC 65 %E25 = extractelement <2 x i1> %Shuff, i32 1 66 br i1 %E25, label %CF72, label %CF76 67 68CF76: ; preds = %CF78 69 %Shuff26 = shufflevector <4 x i64> zeroinitializer, <4 x i64> %B22, <4 x i32> <i32 undef, i32 undef, i32 0, i32 undef> 70 %I27 = insertelement <4 x i64> zeroinitializer, i64 %E, i32 2 71 %B28 = mul <4 x i64> %I27, zeroinitializer 72 %ZE = zext <8 x i1> zeroinitializer to <8 x i64> 73 %Sl29 = select i1 %Cmp17, float -4.374162e+06, float -4.374162e+06 74 %L30 = load i8, i8* %0 75 store double %L5, double* %Sl 76 %E31 = extractelement <8 x i1> zeroinitializer, i32 5 77 br label %CF 78 79CF: ; preds = %CF, %CF81, %CF76 80 %Shuff32 = shufflevector <16 x i64> <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>, <16 x i64> <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>, <16 x i32> <i32 8, i32 undef, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 undef, i32 26, i32 28, i32 30, i32 undef, i32 2, i32 4, i32 6> 81 %I33 = insertelement <8 x i1> zeroinitializer, i1 false, i32 2 82 %BC34 = bitcast <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1> to <4 x float> 83 %Sl35 = select i1 %E12, <2 x i1> %I8, <2 x i1> zeroinitializer 84 %Cmp36 = fcmp oge double 0xC2C3BAE2D5C18360, 0xC2C3BAE2D5C18360 85 br i1 %Cmp36, label %CF, label %CF74 86 87CF74: ; preds = %CF74, %CF 88 %L37 = load float, float* %PC 89 store double 0.000000e+00, double* %Sl 90 %E38 = extractelement <2 x i1> %Sl23, i32 1 91 br i1 %E38, label %CF74, label %CF75 92 93CF75: ; preds = %CF75, %CF82, %CF74 94 %Shuff39 = shufflevector <2 x i1> %Shuff13, <2 x i1> zeroinitializer, <2 x i32> <i32 undef, i32 2> 95 %I40 = insertelement <4 x i64> zeroinitializer, i64 %4, i32 2 96 %Sl41 = select i1 %Cmp10, i32 0, i32 %3 97 %Cmp42 = icmp ne <1 x i64> zeroinitializer, zeroinitializer 98 %L43 = load double, double* %Sl 99 store i64 %4, i64* %2 100 %E44 = extractelement <2 x i1> %Shuff20, i32 1 101 br i1 %E44, label %CF75, label %CF82 102 103CF82: ; preds = %CF75 104 %Shuff45 = shufflevector <2 x i1> %Sl23, <2 x i1> %Sl23, <2 x i32> <i32 2, i32 0> 105 %I46 = insertelement <4 x i64> zeroinitializer, i64 0, i32 0 106 %B47 = sub i64 %E, %E6 107 %Sl48 = select i1 %Cmp10, double %L5, double %L43 108 %Cmp49 = icmp uge i64 %4, %B47 109 br i1 %Cmp49, label %CF75, label %CF81 110 111CF81: ; preds = %CF82 112 %L50 = load i8, i8* %0 113 store double %L43, double* %Sl 114 %E51 = extractelement <4 x i64> %Shuff7, i32 3 115 %Shuff52 = shufflevector <4 x float> %BC34, <4 x float> %BC34, <4 x i32> <i32 2, i32 4, i32 6, i32 0> 116 %I53 = insertelement <2 x i1> %Cmp, i1 %E25, i32 0 117 %B54 = fdiv double %L24, %L43 118 %BC55 = bitcast <4 x i64> zeroinitializer to <4 x double> 119 %Sl56 = select i1 false, i8 %5, i8 97 120 %L57 = load i8, i8* %0 121 store i8 %L50, i8* %0 122 %E58 = extractelement <2 x i1> %Shuff20, i32 1 123 br i1 %E58, label %CF, label %CF73 124 125CF73: ; preds = %CF73, %CF81 126 %Shuff59 = shufflevector <2 x i1> %Shuff13, <2 x i1> %Shuff45, <2 x i32> <i32 undef, i32 0> 127 %I60 = insertelement <4 x float> %Shuff52, float -4.374162e+06, i32 0 128 %B61 = mul <4 x i64> %I46, zeroinitializer 129 %PC62 = bitcast double* %A3 to float* 130 %Sl63 = select i1 %Cmp10, <1 x i64> zeroinitializer, <1 x i64> zeroinitializer 131 %Cmp64 = icmp ne <2 x i1> %Cmp, %Shuff 132 %L65 = load double, double* %A1 133 store float -4.374162e+06, float* %PC62 134 %E66 = extractelement <8 x i1> %I21, i32 3 135 br i1 %E66, label %CF73, label %CF79 136 137CF79: ; preds = %CF79, %CF73 138 %Shuff67 = shufflevector <8 x i1> %I21, <8 x i1> %I21, <8 x i32> <i32 6, i32 8, i32 10, i32 12, i32 14, i32 0, i32 undef, i32 4> 139 %I68 = insertelement <1 x i1> %Cmp42, i1 %E25, i32 0 140 %B69 = sdiv <16 x i64> <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>, <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1> 141 %Sl70 = select i1 %Cmp49, <2 x i1> %Sl23, <2 x i1> %Shuff45 142 %Cmp71 = icmp ne i1 false, false 143 br i1 %Cmp71, label %CF79, label %CF83 144 145CF83: ; preds = %CF79 146 store double 0.000000e+00, double* %Sl 147 store float %BC, float* %PC62 148 store double %Sl48, double* %Sl 149 store double %FC, double* %Sl 150 store float %BC, float* %PC62 151 ret void 152} 153