1; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs -disable-lsr | FileCheck %s 2; 3; Regression test for a machine verifier complaint discovered with llvm-stress. 4; Test that splitting of a 128 bit store does not result in use of undef phys reg. 5; This test case involved spilling of 128 bits, where the data operand was killed. 6 7define void @autogen_SD15107(i8*, i32*, i64*, i32, i64, i8) { 8; CHECK: .text 9BB: 10 %A4 = alloca double 11 %A1 = alloca i32 12 %L = load i8, i8* %0 13 br label %CF331 14 15CF331: ; preds = %CF331, %BB 16 %Shuff = shufflevector <8 x i8> zeroinitializer, <8 x i8> zeroinitializer, <8 x i32> <i32 undef, i32 undef, i32 1, i32 3, i32 5, i32 7, i32 9, i32 11> 17 %L5 = load i8, i8* %0 18 %FC9 = fptosi float 0xC59D259100000000 to i8 19 %Shuff13 = shufflevector <8 x i64> zeroinitializer, <8 x i64> zeroinitializer, <8 x i32> <i32 10, i32 undef, i32 14, i32 0, i32 undef, i32 4, i32 6, i32 8> 20 %Tr = trunc <8 x i16> zeroinitializer to <8 x i1> 21 %Sl16 = select i1 true, i64 448097, i64 253977 22 %E18 = extractelement <2 x i1> zeroinitializer, i32 1 23 br i1 %E18, label %CF331, label %CF350 24 25CF350: ; preds = %CF331 26 %Cmp22 = icmp slt i8 %L, -1 27 br label %CF 28 29CF: ; preds = %CF333, %CF364, %CF, %CF350 30 %Shuff25 = shufflevector <16 x i1> zeroinitializer, <16 x i1> zeroinitializer, <16 x i32> <i32 25, i32 27, i32 29, i32 31, i32 1, i32 undef, i32 undef, i32 7, i32 9, i32 11, i32 undef, i32 15, i32 17, i32 19, i32 21, i32 23> 31 %B27 = mul <8 x i8> zeroinitializer, %Shuff 32 %L31 = load i8, i8* %0 33 store i8 %L5, i8* %0 34 %E32 = extractelement <8 x i64> %Shuff13, i32 5 35 %Sl37 = select i1 %E18, i64* %2, i64* %2 36 %E40 = extractelement <8 x i64> %Shuff13, i32 4 37 %I42 = insertelement <8 x i64> %Shuff13, i64 0, i32 1 38 %Sl44 = select i1 true, double* %A4, double* %A4 39 %L46 = load i64, i64* %Sl37 40 br i1 undef, label %CF, label %CF335 41 42CF335: ; preds = %CF335, %CF 43 %Shuff48 = shufflevector <8 x i16> zeroinitializer, <8 x i16> zeroinitializer, <8 x i32> <i32 undef, i32 15, i32 undef, i32 3, i32 5, i32 7, i32 9, i32 11> 44 %B50 = sub <8 x i64> undef, zeroinitializer 45 %Se = sext i1 %Cmp22 to i64 46 %Cmp52 = icmp ule i64 %E40, 184653 47 br i1 %Cmp52, label %CF335, label %CF364 48 49CF364: ; preds = %CF335 50 store i64 %E32, i64* %Sl37 51 %B57 = udiv <8 x i64> %I42, %B50 52 %L61 = load i64, i64* %Sl37 53 %Sl65 = select i1 undef, i1 %Cmp52, i1 true 54 br i1 %Sl65, label %CF, label %CF333 55 56CF333: ; preds = %CF364 57 %Cmp66 = fcmp uge float 0x474A237E00000000, undef 58 br i1 %Cmp66, label %CF, label %CF324 59 60CF324: ; preds = %CF358, %CF360, %CF333 61 %L67 = load i64, i64* %Sl37 62 %Sl73 = select i1 %E18, i8 %L, i8 %L31 63 %ZE = zext i1 true to i32 64 %Cmp81 = icmp ult i64 184653, %L46 65 br label %CF346 66 67CF346: ; preds = %CF363, %CF346, %CF324 68 %L82 = load double, double* %Sl44 69 store i64 %Se, i64* %Sl37 70 br i1 undef, label %CF346, label %CF363 71 72CF363: ; preds = %CF346 73 %I85 = insertelement <8 x i64> undef, i64 0, i32 4 74 %Se86 = sext i1 %Cmp81 to i64 75 %Cmp88 = icmp eq <16 x i1> zeroinitializer, undef 76 %Shuff91 = shufflevector <8 x i64> %B57, <8 x i64> %I42, <8 x i32> <i32 1, i32 undef, i32 5, i32 7, i32 undef, i32 11, i32 13, i32 undef> 77 %Sl95 = select i1 undef, i8 -1, i8 %5 78 store i8 %FC9, i8* %0 79 %Sl102 = select i1 %Sl65, float 0x3AAFABC380000000, float undef 80 %L104 = load i64, i64* %Sl37 81 store i8 %Sl95, i8* %0 82 br i1 undef, label %CF346, label %CF360 83 84CF360: ; preds = %CF363 85 %I107 = insertelement <16 x i1> undef, i1 %Sl65, i32 3 86 %B108 = fdiv float undef, %Sl102 87 %FC109 = sitofp <16 x i1> %Shuff25 to <16 x float> 88 %Cmp111 = icmp slt i8 %Sl73, %Sl95 89 br i1 %Cmp111, label %CF324, label %CF344 90 91CF344: ; preds = %CF344, %CF360 92 store i64 %4, i64* %Sl37 93 br i1 undef, label %CF344, label %CF358 94 95CF358: ; preds = %CF344 96 %B116 = add i8 29, %5 97 %Sl118 = select i1 %Cmp81, <8 x i1> undef, <8 x i1> %Tr 98 %L120 = load i16, i16* undef 99 store i8 %FC9, i8* %0 100 %E121 = extractelement <16 x i1> %Shuff25, i32 3 101 br i1 %E121, label %CF324, label %CF325 102 103CF325: ; preds = %CF362, %CF358 104 %I123 = insertelement <8 x i16> undef, i16 %L120, i32 0 105 %Sl125 = select i1 undef, i32 undef, i32 199785 106 %Cmp126 = icmp ule <16 x i1> undef, %Cmp88 107 br label %CF356 108 109CF356: ; preds = %CF356, %CF325 110 %FC131 = sitofp <8 x i8> %B27 to <8 x double> 111 store i8 %Sl73, i8* %0 112 store i64 396197, i64* %Sl37 113 %L150 = load i64, i64* %Sl37 114 %Cmp157 = icmp ult i64 %L150, %L61 115 br i1 %Cmp157, label %CF356, label %CF359 116 117CF359: ; preds = %CF359, %CF356 118 %B162 = srem <8 x i64> %I85, %Shuff13 119 %Tr163 = trunc i64 %Se to i8 120 %Sl164 = select i1 %Cmp52, i32* %A1, i32* %1 121 store i64 %E32, i64* undef 122 %I168 = insertelement <8 x i16> %I123, i16 undef, i32 5 123 %Se170 = sext i1 %Cmp81 to i32 124 %Cmp172 = icmp uge i8 %Sl73, %Sl73 125 br i1 %Cmp172, label %CF359, label %CF362 126 127CF362: ; preds = %CF359 128 store i16 0, i16* undef 129 store i64 448097, i64* %Sl37 130 %E189 = extractelement <8 x i16> %Shuff48, i32 6 131 %Sl194 = select i1 %Cmp111, i8 29, i8 0 132 %Cmp195 = icmp eq i32 %ZE, %ZE 133 br i1 %Cmp195, label %CF325, label %CF326 134 135CF326: ; preds = %CF342, %CF362 136 store i64 %L104, i64* undef 137 br label %CF342 138 139CF342: ; preds = %CF326 140 %Cmp203 = icmp ule i1 %Cmp195, %E18 141 br i1 %Cmp203, label %CF326, label %CF337 142 143CF337: ; preds = %CF342 144 br label %CF327 145 146CF327: ; preds = %CF336, %CF355, %CF327, %CF337 147 store i64 %Se86, i64* undef 148 %Tr216 = trunc i64 184653 to i16 149 %Sl217 = select i1 %Cmp157, <4 x i1> undef, <4 x i1> undef 150 %Cmp218 = icmp slt i32 undef, %Se170 151 br i1 %Cmp218, label %CF327, label %CF355 152 153CF355: ; preds = %CF327 154 %E220 = extractelement <16 x i1> %Cmp126, i32 3 155 br i1 %E220, label %CF327, label %CF340 156 157CF340: ; preds = %CF355 158 %Sl224 = select i1 %Sl65, double undef, double 0xBE278346AB25A5C4 159 br label %CF334 160 161CF334: ; preds = %CF343, %CF334, %CF340 162 %L226 = load i64, i64* undef 163 store i32 %3, i32* %Sl164 164 %Cmp233 = icmp uge i16 %Tr216, %L120 165 br i1 %Cmp233, label %CF334, label %CF354 166 167CF354: ; preds = %CF334 168 store i64 %L226, i64* %Sl37 169 %Cmp240 = icmp uge i1 %Cmp52, undef 170 %Shuff243 = shufflevector <16 x i1> %I107, <16 x i1> undef, <16 x i32> <i32 28, i32 30, i32 undef, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 undef> 171 %B245 = fmul <16 x float> %FC109, %FC109 172 br label %CF343 173 174CF343: ; preds = %CF354 175 %Cmp248 = icmp sgt i8 0, %B116 176 br i1 %Cmp248, label %CF334, label %CF336 177 178CF336: ; preds = %CF343 179 store i64 %E32, i64* undef 180 br i1 undef, label %CF327, label %CF328 181 182CF328: ; preds = %CF345, %CF336 183 br label %CF345 184 185CF345: ; preds = %CF328 186 %E257 = extractelement <4 x i1> %Sl217, i32 2 187 br i1 %E257, label %CF328, label %CF338 188 189CF338: ; preds = %CF345 190 %Sl261 = select i1 %E121, <8 x i16> zeroinitializer, <8 x i16> undef 191 %Cmp262 = icmp sgt i8 undef, %Sl194 192 br label %CF329 193 194CF329: ; preds = %CF339, %CF348, %CF357, %CF338 195 store i64 %L67, i64* %Sl37 196 br label %CF357 197 198CF357: ; preds = %CF329 199 %Cmp275 = icmp ne i1 %Cmp203, %Sl65 200 br i1 %Cmp275, label %CF329, label %CF348 201 202CF348: ; preds = %CF357 203 %Shuff286 = shufflevector <8 x i16> undef, <8 x i16> %Sl261, <8 x i32> <i32 6, i32 8, i32 10, i32 12, i32 undef, i32 0, i32 2, i32 4> 204 %Cmp291 = icmp ne i32 %Sl125, undef 205 br i1 %Cmp291, label %CF329, label %CF339 206 207CF339: ; preds = %CF348 208 %Cmp299 = fcmp ugt double %L82, undef 209 br i1 %Cmp299, label %CF329, label %CF330 210 211CF330: ; preds = %CF361, %CF330, %CF339 212 %E301 = extractelement <8 x double> %FC131, i32 3 213 store i64 %Sl16, i64* %Sl37 214 %Se313 = sext <8 x i1> %Sl118 to <8 x i32> 215 %Cmp315 = icmp sgt i8 %Tr163, %L 216 br i1 %Cmp315, label %CF330, label %CF361 217 218CF361: ; preds = %CF330 219 store i16 %L120, i16* undef 220 %Shuff318 = shufflevector <8 x i64> %B162, <8 x i64> undef, <8 x i32> <i32 8, i32 10, i32 12, i32 14, i32 0, i32 2, i32 4, i32 6> 221 %ZE321 = zext i16 %E189 to i64 222 %Sl322 = select i1 %Cmp240, i1 %Cmp262, i1 %Cmp291 223 br i1 %Sl322, label %CF330, label %CF351 224 225CF351: ; preds = %CF361 226 store double %Sl224, double* %Sl44 227 store i32 %ZE, i32* %Sl164 228 ret void 229} 230