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 for MSA with a 7 ; `Num < NumOperands && "Invalid child # of SDNode!"' assertion. 8 ; It should at least successfully build. 9 10 define void @autogen_SD525530439(i8*, i32*, i64*, i32, i64, i8) { 11 BB: 12 %A4 = alloca i32 13 %A3 = alloca double 14 %A2 = alloca <1 x double> 15 %A1 = alloca <8 x double> 16 %A = alloca i64 17 %L = load i8* %0 18 store i64 33695, i64* %A 19 %E = extractelement <4 x i32> zeroinitializer, i32 3 20 %Shuff = shufflevector <2 x i32> <i32 -1, i32 -1>, <2 x i32> <i32 -1, i32 -1>, <2 x i32> <i32 2, i32 0> 21 %I = insertelement <4 x i16> zeroinitializer, i16 -11642, i32 0 22 %B = lshr <8 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> 23 %ZE = fpext float 0x3B64A2B880000000 to double 24 %Sl = select i1 true, i16 -1, i16 -11642 25 %L5 = load i8* %0 26 store i8 0, i8* %0 27 %E6 = extractelement <4 x i32> zeroinitializer, i32 2 28 %Shuff7 = shufflevector <8 x i1> zeroinitializer, <8 x i1> zeroinitializer, <8 x i32> <i32 undef, i32 7, i32 9, i32 11, i32 13, i32 15, i32 1, i32 undef> 29 %I8 = insertelement <4 x i32> zeroinitializer, i32 %3, i32 3 30 %B9 = sub i32 71140, 439732 31 %BC = bitcast <2 x i32> <i32 -1, i32 -1> to <2 x float> 32 %Sl10 = select i1 true, i32* %1, i32* %1 33 %Cmp = icmp sge <8 x i64> zeroinitializer, zeroinitializer 34 %L11 = load i32* %Sl10 35 store <1 x double> zeroinitializer, <1 x double>* %A2 36 %E12 = extractelement <4 x i16> zeroinitializer, i32 0 37 %Shuff13 = shufflevector <1 x i64> zeroinitializer, <1 x i64> zeroinitializer, <1 x i32> undef 38 %I14 = insertelement <1 x i16> zeroinitializer, i16 %Sl, i32 0 39 %B15 = or i16 -1, %E12 40 %BC16 = bitcast <4 x i32> zeroinitializer to <4 x float> 41 %Sl17 = select i1 true, i64 %4, i64 %4 42 %Cmp18 = fcmp ugt float 0xC5ABB1BF80000000, 0x3EEF3D6300000000 43 br label %CF75 44 45 CF75: ; preds = %CF75, %BB 46 %L19 = load i32* %Sl10 47 store i32 %L11, i32* %Sl10 48 %E20 = extractelement <4 x i32> zeroinitializer, i32 1 49 %Shuff21 = shufflevector <4 x i32> zeroinitializer, <4 x i32> %I8, <4 x i32> <i32 undef, i32 2, i32 4, i32 6> 50 %I22 = insertelement <4 x float> %BC16, float 0x3EEF3D6300000000, i32 2 51 %B23 = shl i32 71140, 439732 52 %ZE24 = fpext <4 x float> %I22 to <4 x double> 53 %Sl25 = select i1 %Cmp18, i32 %L11, i32 %L11 54 %Cmp26 = icmp ne i32 %E20, %L19 55 br i1 %Cmp26, label %CF75, label %CF76 56 57 CF76: ; preds = %CF75 58 %L27 = load i32* %Sl10 59 store i32 439732, i32* %Sl10 60 %E28 = extractelement <4 x i32> %Shuff21, i32 3 61 %Shuff29 = shufflevector <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>, <8 x i32> <i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 0> 62 %I30 = insertelement <8 x i1> %Shuff7, i1 %Cmp18, i32 4 63 %Sl31 = select i1 %Cmp18, i32 %3, i32 %B23 64 %Cmp32 = icmp ugt i32 0, %3 65 br label %CF74 66 67 CF74: ; preds = %CF74, %CF80, %CF78, %CF76 68 %L33 = load i64* %2 69 store i32 71140, i32* %Sl10 70 %E34 = extractelement <4 x i32> zeroinitializer, i32 1 71 %Shuff35 = shufflevector <1 x i16> zeroinitializer, <1 x i16> zeroinitializer, <1 x i32> undef 72 %I36 = insertelement <4 x i16> zeroinitializer, i16 -11642, i32 0 73 %B37 = mul <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, %Shuff29 74 %Sl38 = select i1 %Cmp18, double 0.000000e+00, double 0x2BA9DB480DA732C6 75 %Cmp39 = icmp sgt i16 -11642, %Sl 76 br i1 %Cmp39, label %CF74, label %CF80 77 78 CF80: ; preds = %CF74 79 %L40 = load i8* %0 80 store i32 0, i32* %Sl10 81 %E41 = extractelement <8 x i64> zeroinitializer, i32 1 82 %Shuff42 = shufflevector <1 x i16> %I14, <1 x i16> %I14, <1 x i32> undef 83 %I43 = insertelement <4 x i16> %I36, i16 -11642, i32 0 84 %FC = fptoui float 0x455CA2B080000000 to i16 85 %Sl44 = select i1 %Cmp18, i1 %Cmp18, i1 %Cmp39 86 br i1 %Sl44, label %CF74, label %CF78 87 88 CF78: ; preds = %CF80 89 %L45 = load i32* %Sl10 90 store i8 %L5, i8* %0 91 %E46 = extractelement <8 x i1> %Shuff7, i32 2 92 br i1 %E46, label %CF74, label %CF77 93 94 CF77: ; preds = %CF77, %CF78 95 %Shuff47 = shufflevector <4 x i16> %I43, <4 x i16> zeroinitializer, <4 x i32> <i32 5, i32 undef, i32 1, i32 3> 96 %I48 = insertelement <1 x i16> %Shuff42, i16 %Sl, i32 0 97 %B49 = mul i8 0, %L40 98 %FC50 = uitofp i32 %3 to double 99 %Sl51 = select i1 %Sl44, i32 %L27, i32 0 100 %Cmp52 = icmp sge i8 %B49, 0 101 br i1 %Cmp52, label %CF77, label %CF79 102 103 CF79: ; preds = %CF77 104 %L53 = load i32* %Sl10 105 store i8 %L40, i8* %0 106 %E54 = extractelement <4 x i32> zeroinitializer, i32 1 107 %Shuff55 = shufflevector <4 x i32> %Shuff21, <4 x i32> %I8, <4 x i32> <i32 4, i32 6, i32 undef, i32 2> 108 %I56 = insertelement <4 x i32> zeroinitializer, i32 %Sl51, i32 2 109 %Tr = trunc <1 x i64> %Shuff13 to <1 x i16> 110 %Sl57 = select i1 %Cmp18, <2 x i32> <i32 -1, i32 -1>, <2 x i32> <i32 -1, i32 -1> 111 %Cmp58 = icmp uge <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, %I56 112 %L59 = load i8* %0 113 store <1 x double> zeroinitializer, <1 x double>* %A2 114 %E60 = extractelement <4 x i32> zeroinitializer, i32 0 115 %Shuff61 = shufflevector <4 x i32> %I8, <4 x i32> %I8, <4 x i32> <i32 undef, i32 1, i32 undef, i32 undef> 116 %I62 = insertelement <4 x i16> zeroinitializer, i16 %E12, i32 1 117 %B63 = and <4 x i32> %Shuff61, <i32 -1, i32 -1, i32 -1, i32 -1> 118 %PC = bitcast double* %A3 to i32* 119 %Sl64 = select i1 %Cmp18, <4 x i32> %Shuff61, <4 x i32> %Shuff55 120 %Cmp65 = icmp sgt i32 439732, %3 121 br label %CF 122 123 CF: ; preds = %CF79 124 %L66 = load i32* %Sl10 125 store i32 %E6, i32* %PC 126 %E67 = extractelement <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, i32 2 127 %Shuff68 = shufflevector <4 x i32> %Sl64, <4 x i32> %I8, <4 x i32> <i32 5, i32 undef, i32 1, i32 undef> 128 %I69 = insertelement <4 x i16> %Shuff47, i16 %Sl, i32 3 129 %B70 = sdiv <4 x i64> zeroinitializer, zeroinitializer 130 %FC71 = sitofp i32 %L66 to double 131 %Sl72 = select i1 %Cmp18, i64 %4, i64 %4 132 %Cmp73 = icmp eq <4 x i64> zeroinitializer, %B70 133 store i32 %B23, i32* %PC 134 store i32 %3, i32* %PC 135 store i32 %3, i32* %Sl10 136 store i32 %L27, i32* %1 137 store i32 0, i32* %PC 138 ret void 139 } 140