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 after dereferencing a null this pointer. 7 ; It should at least successfully build. 8 9 define void @autogen_SD2704903805(i8*, i32*, i64*, i32, i64, i8) { 10 BB: 11 %A4 = alloca i32 12 %A3 = alloca i32 13 %A2 = alloca i8 14 %A1 = alloca i32 15 %A = alloca i8 16 %L = load i8* %0 17 store i8 %5, i8* %0 18 %E = extractelement <2 x i16> zeroinitializer, i32 0 19 %Shuff = shufflevector <1 x i8> <i8 -1>, <1 x i8> <i8 -1>, <1 x i32> undef 20 %I = insertelement <1 x i8> <i8 -1>, i8 85, i32 0 21 %B = lshr <2 x i16> zeroinitializer, zeroinitializer 22 %FC = sitofp <4 x i16> zeroinitializer to <4 x float> 23 %Sl = select i1 true, float 0.000000e+00, float 0x401E76A240000000 24 %Cmp = icmp ule i16 -25210, %E 25 br label %CF83 26 27 CF83: ; preds = %BB 28 %L5 = load i8* %0 29 store i8 85, i8* %0 30 %E6 = extractelement <1 x i8> <i8 -1>, i32 0 31 %Shuff7 = shufflevector <2 x i16> zeroinitializer, <2 x i16> zeroinitializer, <2 x i32> <i32 1, i32 3> 32 %I8 = insertelement <4 x i16> zeroinitializer, i16 %E, i32 3 33 %B9 = ashr <2 x i16> %Shuff7, zeroinitializer 34 %FC10 = sitofp i32 -1 to float 35 %Sl11 = select i1 %Cmp, i32 -1, i32 -1 36 %Cmp12 = icmp sgt i32 -1, -1 37 br label %CF 38 39 CF: ; preds = %CF, %CF81, %CF83 40 %L13 = load i8* %0 41 store i8 0, i8* %0 42 %E14 = extractelement <2 x i64> zeroinitializer, i32 0 43 %Shuff15 = shufflevector <4 x i64> <i64 -1, i64 -1, i64 -1, i64 -1>, <4 x i64> <i64 -1, i64 -1, i64 -1, i64 -1>, <4 x i32> <i32 3, i32 5, i32 7, i32 undef> 44 %I16 = insertelement <4 x i64> <i64 -1, i64 -1, i64 -1, i64 -1>, i64 81222, i32 1 45 %B17 = lshr <2 x i16> zeroinitializer, %B 46 %Tr = trunc i32 272597 to i1 47 br i1 %Tr, label %CF, label %CF80 48 49 CF80: ; preds = %CF80, %CF 50 %Sl18 = select i1 %Cmp, <2 x i64> zeroinitializer, <2 x i64> zeroinitializer 51 %Cmp19 = icmp ne i1 %Cmp12, %Cmp 52 br i1 %Cmp19, label %CF80, label %CF81 53 54 CF81: ; preds = %CF80 55 %L20 = load i8* %0 56 store i8 85, i8* %0 57 %E21 = extractelement <1 x i8> <i8 -1>, i32 0 58 %Shuff22 = shufflevector <1 x i8> <i8 -1>, <1 x i8> %Shuff, <1 x i32> zeroinitializer 59 %I23 = insertelement <1 x i8> <i8 -1>, i8 %L5, i32 0 60 %FC24 = fptoui <4 x float> %FC to <4 x i16> 61 %Sl25 = select i1 %Cmp, <2 x i32> zeroinitializer, <2 x i32> <i32 -1, i32 -1> 62 %Cmp26 = icmp ult <4 x i64> %I16, %Shuff15 63 %L27 = load i8* %0 64 store i8 %L, i8* %0 65 %E28 = extractelement <1 x i8> <i8 -1>, i32 0 66 %Shuff29 = shufflevector <8 x i16> zeroinitializer, <8 x i16> zeroinitializer, <8 x i32> <i32 11, i32 undef, i32 15, i32 1, i32 3, i32 5, i32 undef, i32 9> 67 %I30 = insertelement <4 x i64> <i64 -1, i64 -1, i64 -1, i64 -1>, i64 %E14, i32 1 68 %B31 = mul i8 %E28, 85 69 %PC = bitcast i32* %A3 to i32* 70 %Sl32 = select i1 %Cmp12, float %FC10, float 0x4712BFE680000000 71 %L33 = load i32* %PC 72 store i32 %L33, i32* %PC 73 %E34 = extractelement <2 x i16> zeroinitializer, i32 1 74 %Shuff35 = shufflevector <1 x i8> %Shuff, <1 x i8> <i8 -1>, <1 x i32> zeroinitializer 75 %I36 = insertelement <1 x i8> <i8 -1>, i8 %L13, i32 0 76 %B37 = xor i8 %L27, %L 77 %Sl38 = select i1 %Cmp, i16 %E34, i16 %E 78 %Cmp39 = icmp eq i1 %Cmp19, %Cmp 79 br i1 %Cmp39, label %CF, label %CF77 80 81 CF77: ; preds = %CF77, %CF81 82 %L40 = load i32* %PC 83 store i32 %3, i32* %PC 84 %E41 = extractelement <2 x i32> zeroinitializer, i32 0 85 %Shuff42 = shufflevector <2 x i32> <i32 -1, i32 -1>, <2 x i32> zeroinitializer, <2 x i32> <i32 1, i32 3> 86 %I43 = insertelement <1 x i8> <i8 -1>, i8 0, i32 0 87 %B44 = or i16 %E, -25210 88 %Se = sext i32 %3 to i64 89 %Sl45 = select i1 true, <1 x i8> %Shuff, <1 x i8> %I43 90 %Cmp46 = icmp sge <1 x i8> %I36, %Shuff 91 %L47 = load i32* %PC 92 store i32 %L33, i32* %PC 93 %E48 = extractelement <2 x i16> zeroinitializer, i32 0 94 %Shuff49 = shufflevector <1 x i8> <i8 -1>, <1 x i8> <i8 -1>, <1 x i32> <i32 1> 95 %I50 = insertelement <2 x i32> %Sl25, i32 47963, i32 1 96 %B51 = srem <1 x i8> %I, %Shuff22 97 %FC52 = sitofp i8 %5 to double 98 %Sl53 = select i1 %Cmp39, i8 %L27, i8 85 99 %Cmp54 = icmp slt i16 %E34, %E34 100 br i1 %Cmp54, label %CF77, label %CF78 101 102 CF78: ; preds = %CF78, %CF77 103 %L55 = load i32* %PC 104 store i32 %L33, i32* %PC 105 %E56 = extractelement <8 x i16> %Shuff29, i32 4 106 %Shuff57 = shufflevector <1 x i8> <i8 -1>, <1 x i8> <i8 -1>, <1 x i32> <i32 1> 107 %I58 = insertelement <1 x i8> %B51, i8 %Sl53, i32 0 108 %ZE = fpext float %FC10 to double 109 %Sl59 = select i1 %Cmp12, <2 x i16> %B9, <2 x i16> zeroinitializer 110 %Cmp60 = fcmp ult double 0.000000e+00, 0.000000e+00 111 br i1 %Cmp60, label %CF78, label %CF79 112 113 CF79: ; preds = %CF79, %CF78 114 %L61 = load i32* %PC 115 store i32 %L33, i32* %A3 116 %E62 = extractelement <4 x i64> %Shuff15, i32 1 117 %Shuff63 = shufflevector <8 x i16> %Shuff29, <8 x i16> %Shuff29, <8 x i32> <i32 undef, i32 10, i32 12, i32 undef, i32 undef, i32 undef, i32 4, i32 6> 118 %I64 = insertelement <2 x i64> zeroinitializer, i64 %Se, i32 0 119 %B65 = shl i8 %5, 85 120 %ZE66 = zext <4 x i1> %Cmp26 to <4 x i32> 121 %Sl67 = select i1 %Tr, <1 x i8> %Shuff, <1 x i8> %I23 122 %Cmp68 = fcmp olt float 0x4712BFE680000000, 0x4712BFE680000000 123 br i1 %Cmp68, label %CF79, label %CF82 124 125 CF82: ; preds = %CF79 126 %L69 = load i32* %PC 127 store i32 %L33, i32* %PC 128 %E70 = extractelement <8 x i16> zeroinitializer, i32 3 129 %Shuff71 = shufflevector <4 x i64> %Shuff15, <4 x i64> <i64 -1, i64 -1, i64 -1, i64 -1>, <4 x i32> <i32 6, i32 undef, i32 2, i32 4> 130 %I72 = insertelement <1 x i8> <i8 -1>, i8 %L, i32 0 131 %B73 = srem i64 %E62, %Se 132 %ZE74 = zext <4 x i1> %Cmp26 to <4 x i32> 133 %Sl75 = select i1 %Cmp, i32 463279, i32 %L61 134 %Cmp76 = icmp sgt <1 x i8> %Shuff49, %Shuff22 135 store i8 %B31, i8* %0 136 store i8 85, i8* %0 137 store i32 %L33, i32* %PC 138 store i8 %B65, i8* %0 139 store i8 %L5, i8* %0 140 ret void 141 } 142