llvm.org GIT mirror llvm / 962a285
Revert "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." This reverts commit r336140. Our tests shows that LSR assert fails with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336473 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Shen 2 years ago
18 changed file(s) with 55 addition(s) and 70 deletion(s). Raw diff Collapse all Expand all
22432243
22442244 SignOrUnsignWrap = ScalarEvolution::maskFlags(Flags, SignOrUnsignMask);
22452245
2246 if (SignOrUnsignWrap != SignOrUnsignMask &&
2247 (Type == scAddExpr || Type == scMulExpr) && Ops.size() == 2 &&
2248 isa(Ops[0])) {
2249
2250 auto Opcode = [&] {
2251 switch (Type) {
2252 case scAddExpr:
2253 return Instruction::Add;
2254 case scMulExpr:
2255 return Instruction::Mul;
2256 default:
2257 llvm_unreachable("Unexpected SCEV op.");
2258 }
2259 }();
2246 if (SignOrUnsignWrap != SignOrUnsignMask && Type == scAddExpr &&
2247 Ops.size() == 2 && isa(Ops[0])) {
2248
2249 // (A + C) --> (A + C) if the addition does not sign overflow
2250 // (A + C) --> (A + C) if the addition does not unsign overflow
22602251
22612252 const APInt &C = cast(Ops[0])->getAPInt();
2262
2263 // (A C) --> (A C) if the op doesn't sign overflow.
22642253 if (!(SignOrUnsignWrap & SCEV::FlagNSW)) {
22652254 auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
2266 Opcode, C, OBO::NoSignedWrap);
2255 Instruction::Add, C, OBO::NoSignedWrap);
22672256 if (NSWRegion.contains(SE->getSignedRange(Ops[1])))
22682257 Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNSW);
22692258 }
2270
2271 // (A C) --> (A C) if the op doesn't unsign overflow.
22722259 if (!(SignOrUnsignWrap & SCEV::FlagNUW)) {
22732260 auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
2274 Opcode, C, OBO::NoUnsignedWrap);
2261 Instruction::Add, C, OBO::NoUnsignedWrap);
22752262 if (NUWRegion.contains(SE->getUnsignedRange(Ops[1])))
22762263 Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNUW);
22772264 }
99 ; AddRec: {{{(28 + (4 * (-4 + (3 * %m)) * %o) + %A),+,(8 * %m * %o)}<%for.i>,+,(12 * %o)}<%for.j>,+,20}<%for.k>
1010 ; CHECK: Base offset: %A
1111 ; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of 4 bytes.
12 ; CHECK: ArrayRef[{3,+,2}<nw><%for.i>][{-4,+,3}<%for.j>][{7,+,5}<%for.k>]
12 ; CHECK: ArrayRef[{3,+,2}<%for.i>][{-4,+,3}<%for.j>][{7,+,5}<%for.k>]
1313
1414 define void @foo(i64 %n, i64 %m, i64 %o, i32* nocapture %A) #0 {
1515 entry:
1010 ; AddRec: {{((%m * %b * 8) + %A),+,(2 * %m * 8)}<%for.i>,+,(2 * 8)}<%for.j>
1111 ; CHECK: Base offset: %A
1212 ; CHECK: ArrayDecl[UnknownSize][%m] with elements of 8 bytes.
13 ; CHECK: ArrayRef[{%b,+,2}<%for.i>][{0,+,2}<nuw><%for.j>]
13 ; CHECK: ArrayRef[{%b,+,2}<%for.i>][{0,+,2}<%for.j>]
1414
1515
1616 define void @foo(i64 %n, i64 %m, i64 %b, double* %A) {
6969 ; sure they aren't marked as post-inc users.
7070 ;
7171 ; CHECK-LABEL: IV Users for loop %test2.loop
72 ; CHECK-NO-LCSSA: %sub.cond.us = ((-1 * %sub.us)uw>sw> + {0,+,1}<%test2.loop>) (post-inc with loop %test2.loop) in %sext.us = mul i32 %mul.us, %sub.cond.us
72 ; CHECK-NO-LCSSA: %sub.cond.us = ((-1 * %sub.us)sw> + {0,+,1}<%test2.loop>) (post-inc with loop %test2.loop) in %sext.us = mul i32 %mul.us, %sub.cond.us
7373 define i32 @test2() {
7474 entry:
7575 br label %test2.loop
250250 ; CHECK-NEXT: Member: {((2 * %offset) + %a),+,2}<%for.body>
251251 ; CHECK-NEXT: Group {{.*}}[[ONE]]:
252252 ; CHECK-NEXT: (Low: %a High: (10000 + %a))
253 ; CHECK-NEXT: Member: {%a,+,2}<nw><%for.body>
253 ; CHECK-NEXT: Member: {%a,+,2}<%for.body>
254254 ; CHECK-NEXT: Group {{.*}}[[TWO]]:
255255 ; CHECK-NEXT: (Low: (20000 + %a) High: (30000 + %a))
256 ; CHECK-NEXT: Member: {(20000 + %a),+,2}<nw><%for.body>
256 ; CHECK-NEXT: Member: {(20000 + %a),+,2}<%for.body>
257257
258258 define void @testi(i16* %a,
259259 i64 %offset) {
3232 ; i64 {0,+,2}<%for.body>
3333
3434 ; LAA: [PSE] %arrayidxA = getelementptr i16, i16* %a, i64 %mul_ext:
35 ; LAA-NEXT: ((2 * (zext i32 {0,+,2}<%for.body> to i64)) + %a)
35 ; LAA-NEXT: ((2 * (zext i32 {0,+,2}<%for.body> to i64)) + %a)
3636 ; LAA-NEXT: --> {%a,+,4}<%for.body>
3737
3838
129129 ; i64 {zext i32 (2 * (trunc i64 %N to i32)) to i64,+,-2}<%for.body>
130130
131131 ; LAA: [PSE] %arrayidxA = getelementptr i16, i16* %a, i64 %mul_ext:
132 ; LAA-NEXT: ((2 * (zext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)) + %a)
132 ; LAA-NEXT: ((2 * (zext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)) + %a)
133133 ; LAA-NEXT: --> {((4 * (zext i31 (trunc i64 %N to i31) to i64)) + %a),+,-4}<%for.body>
134134
135135 ; LV-LABEL: f2
209209 ; i64 {0,+,2}<%for.body>
210210
211211 ; LAA: [PSE] %arrayidxA = getelementptr i16, i16* %a, i64 %mul_ext:
212 ; LAA-NEXT: ((2 * (sext i32 {0,+,2}<%for.body> to i64)) + %a)
212 ; LAA-NEXT: ((2 * (sext i32 {0,+,2}<%for.body> to i64)) + %a)
213213 ; LAA-NEXT: --> {%a,+,4}<%for.body>
214214
215215 ; LV-LABEL: f3
277277 ; LAA: Memory dependences are safe{{$}}
278278 ; LAA: SCEV assumptions:
279279 ; LAA-NEXT: {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> Added Flags:
280 ; LAA-NEXT: {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body> Added Flags:
280 ; LAA-NEXT: {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body> Added Flags:
281281
282282 ; The expression for %mul_ext as analyzed by SCEV is
283283 ; i64 (sext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)
285285 ; i64 {sext i32 (2 * (trunc i64 %N to i32)) to i64,+,-2}<%for.body>
286286
287287 ; LAA: [PSE] %arrayidxA = getelementptr i16, i16* %a, i64 %mul_ext:
288 ; LAA-NEXT: ((2 * (sext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)) + %a)
289 ; LAA-NEXT: --> {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body>
288 ; LAA-NEXT: ((2 * (sext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)) + %a)
289 ; LAA-NEXT: --> {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body>
290290
291291 ; LV-LABEL: f4
292292 ; LV-LABEL: for.body.lver.check
361361 ; LAA: Memory dependences are safe{{$}}
362362 ; LAA: SCEV assumptions:
363363 ; LAA-NEXT: {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> Added Flags:
364 ; LAA-NEXT: {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body> Added Flags:
364 ; LAA-NEXT: {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body> Added Flags:
365365
366366 ; LAA: [PSE] %arrayidxA = getelementptr inbounds i16, i16* %a, i32 %mul:
367367 ; LAA-NEXT: ((2 * (sext i32 {(2 * (trunc i64 %N to i32)),+,-2}<%for.body> to i64)) + %a)
368 ; LAA-NEXT: --> {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body>
368 ; LAA-NEXT: --> {((2 * (sext i32 (2 * (trunc i64 %N to i32)) to i64)) + %a),+,-4}<%for.body>
369369
370370 ; LV-LABEL: f5
371371 ; LV-LABEL: for.body.lver.check
321321 ; CHECK: %SQ = mul i32 %i.0, %i.0
322322 ; CHECK-NEXT: --> {4,+,5,+,2}<%bb3>
323323 ; CHECK: %tmp4 = mul i32 %i.0, 2
324 ; CHECK-NEXT: --> {4,+,2}<nuw><%bb3>
324 ; CHECK-NEXT: --> {4,+,2}<%bb3>
325325 ; CHECK: %tmp5 = sub i32 %SQ, %tmp4
326326 ; CHECK-NEXT: --> {0,+,3,+,2}<%bb3>
327327
77 ; CHECK-NEXT: %tmp1 = udiv i32 %val, 16
88 ; CHECK-NEXT: --> (%val /u 16) U: [0,268435456) S: [0,268435456)
99 ; CHECK-NEXT: %tmp2 = mul i32 %tmp1, 16
10 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
10 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
1111 ; CHECK-NEXT: Determining loop execution counts for: @div
1212 ;
1313 %tmp1 = udiv i32 %val, 16
2121 ; CHECK-NEXT: %tmp1 = sdiv i32 %val, 16
2222 ; CHECK-NEXT: --> %tmp1 U: full-set S: [-134217728,134217728)
2323 ; CHECK-NEXT: %tmp2 = mul i32 %tmp1, 16
24 ; CHECK-NEXT: --> (16 * %tmp1) U: [0,-15) S: [-2147483648,2147483633)
24 ; CHECK-NEXT: --> (16 * %tmp1) U: [0,-15) S: [-2147483648,2147483633)
2525 ; CHECK-NEXT: Determining loop execution counts for: @sdiv
2626 ;
2727 %tmp1 = sdiv i32 %val, 16
3737 ; CHECK-LABEL: 'mask_b'
3838 ; CHECK-NEXT: Classifying expressions for: @mask_b
3939 ; CHECK-NEXT: %masked = and i32 %val, -16
40 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
40 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
4141 ; CHECK-NEXT: Determining loop execution counts for: @mask_b
4242 ;
4343 %masked = and i32 %val, -16
5050 ; CHECK-NEXT: %lowbitscleared = lshr i32 %val, 4
5151 ; CHECK-NEXT: --> (%val /u 16) U: [0,268435456) S: [0,268435456)
5252 ; CHECK-NEXT: %masked = shl i32 %lowbitscleared, 4
53 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
53 ; CHECK-NEXT: --> (16 * (%val /u 16)) U: [0,-15) S: [0,-15)
5454 ; CHECK-NEXT: Determining loop execution counts for: @mask_d
5555 ;
5656 %lowbitscleared = lshr i32 %val, 4
77 ; CHECK-NEXT: %tmp1 = udiv i32 %val, 64
88 ; CHECK-NEXT: --> (%val /u 64) U: [0,67108864) S: [0,67108864)
99 ; CHECK-NEXT: %tmp2 = mul i32 %tmp1, 16
10 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
10 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
1111 ; CHECK-NEXT: Determining loop execution counts for: @udiv_biggerLshr
1212 ;
1313 %tmp1 = udiv i32 %val, 64
3737 ; CHECK-NEXT: %tmp1 = lshr i32 %val, 6
3838 ; CHECK-NEXT: --> (%val /u 64) U: [0,67108864) S: [0,67108864)
3939 ; CHECK-NEXT: %tmp2 = shl i32 %tmp1, 4
40 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
40 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
4141 ; CHECK-NEXT: Determining loop execution counts for: @shifty_biggerLshr
4242 ;
4343 %tmp1 = lshr i32 %val, 6
5151 ; CHECK-NEXT: %tmp1 = lshr exact i32 %val, 6
5252 ; CHECK-NEXT: --> (%val /u 64) U: [0,67108864) S: [0,67108864)
5353 ; CHECK-NEXT: %tmp2 = shl i32 %tmp1, 4
54 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
54 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
5555 ; CHECK-NEXT: Determining loop execution counts for: @shifty_biggerLshr_lshrexact
5656 ;
5757 %tmp1 = lshr exact i32 %val, 6
9595 ; CHECK-NEXT: %tmp1 = lshr i32 %val, 2
9696 ; CHECK-NEXT: --> (%val /u 4) U: [0,1073741824) S: [0,1073741824)
9797 ; CHECK-NEXT: %tmp2 = and i32 %tmp1, -16
98 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
98 ; CHECK-NEXT: --> (16 * (%val /u 64)) U: [0,1073741809) S: [0,1073741809)
9999 ; CHECK-NEXT: Determining loop execution counts for: @masky_biggerLshr
100100 ;
101101 %tmp1 = lshr i32 %val, 2
120120 ; CHECK-NEXT: %tmp1 = shl i32 %val, 2
121121 ; CHECK-NEXT: --> (4 * %val) U: [0,-3) S: [-2147483648,2147483645)
122122 ; CHECK-NEXT: %tmp2 = and i32 %tmp1, -64
123 ; CHECK-NEXT: --> (64 * (zext i26 (trunc i32 (%val /u 16) to i26) to i32)) U: [0,-63) S: [0,-63)
123 ; CHECK-NEXT: --> (64 * (zext i26 (trunc i32 (%val /u 16) to i26) to i32)) U: [0,-63) S: [0,-63)
124124 ; CHECK-NEXT: Determining loop execution counts for: @masky_biggerShr
125125 ;
126126 %tmp1 = shl i32 %val, 2
7878
7979 ; Note: Without the preheader assume, there is an 'smax' in the
8080 ; backedge-taken count expression:
81 ; CHECK: Loop %bb: backedge-taken count is ((-1 + (2 * (%no /u 2))) /u 2)
81 ; CHECK: Loop %bb: backedge-taken count is ((-1 + (2 * (%no /u 2))) /u 2)
8282 ; CHECK: Loop %bb: max backedge-taken count is 1073741822
7272 ret void
7373 }
7474
75 ; CHECK: Loop %bb: backedge-taken count is ((-1 + (2 * (%no /u 2))) /u 2)
75 ; CHECK: Loop %bb: backedge-taken count is ((-1 + (2 * (%no /u 2))) /u 2)
7676 ; CHECK: Loop %bb: max backedge-taken count is 1073741822
125125 }
126126
127127 ; CHECK-LABEL: PR12375
128 ; CHECK: --> {(4 + %arg),+,4}<%bb1>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (4 + (4 * ((-1 + (-1 * %arg) + ((4 + %arg) umax (8 + %arg))) /u 4)) + %arg)
128 ; CHECK: --> {(4 + %arg),+,4}<%bb1>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (4 + (4 * ((-1 + (-1 * %arg) + ((4 + %arg) umax (8 + %arg))) /u 4)) + %arg)
129129 define i32 @PR12375(i32* readnone %arg) {
130130 bb:
131131 %tmp = getelementptr inbounds i32, i32* %arg, i64 2
144144 }
145145
146146 ; CHECK-LABEL: PR12376
147 ; CHECK: --> {(4 + %arg),+,4}<%bb2>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (4 + (4 * ((-1 + (-1 * %arg) + ((4 + %arg) umax %arg1)) /u 4)) + %arg)
147 ; CHECK: --> {(4 + %arg),+,4}<%bb2>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (4 + (4 * ((-1 + (-1 * %arg) + ((4 + %arg) umax %arg1)) /u 4)) + %arg)
148148 define void @PR12376(i32* nocapture %arg, i32* nocapture %arg1) {
149149 bb:
150150 br label %bb2
7979 ; CHECK-NEXT: --> (sext i16 {%Start,+,-1}<%bb3> to i32)
8080 ; CHECK: Loop %bb3: Unpredictable backedge-taken count.
8181 ; CHECK-NEXT: Loop %bb3: Unpredictable max backedge-taken count.
82 ; CHECK-NEXT: Loop %bb3: Predicated backedge-taken count is (2 + (sext i16 %Start to i32) + ((-2 + (-1 * (sext i16 %Start to i32))) smax (-1 + (-1 * %M))))
82 ; CHECK-NEXT: Loop %bb3: Predicated backedge-taken count is (2 + (sext i16 %Start to i32) + ((-2 + (-1 * (sext i16 %Start to i32))) smax (-1 + (-1 * %M))))
8383 ; CHECK-NEXT: Predicates:
8484 ; CHECK-NEXT: {%Start,+,-1}<%bb3> Added Flags:
8585
44 ; CHECK: %tmp10 = ashr exact i64 %tmp9, 32
55 ; CHECK-NEXT: --> {{.*}} Exits: (sext i32 (-2 + (2 * %arg2)) to i64)
66 ; CHECK: %tmp11 = getelementptr inbounds i32, i32* %arg, i64 %tmp10
7 ; CHECK-NEXT: --> {{.*}} Exits: ((4 * (sext i32 (-2 + (2 * %arg2)) to i64)) + %arg)
7 ; CHECK-NEXT: --> {{.*}} Exits: ((4 * (sext i32 (-2 + (2 * %arg2)) to i64)) + %arg)
88 ; CHECK: %tmp14 = or i64 %tmp10, 1
99 ; CHECK-NEXT: --> {{.*}} Exits: (1 + (sext i32 (-2 + (2 * %arg2)) to i64))
1010 ; CHECK: %tmp15 = getelementptr inbounds i32, i32* %arg, i64 %tmp14
11 ; CHECK-NEXT: --> {{.*}} Exits: (4 + (4 * (sext i32 (-2 + (2 * %arg2)) to i64)) + %arg)
11 ; CHECK-NEXT: --> {{.*}} Exits: (4 + (4 * (sext i32 (-2 + (2 * %arg2)) to i64)) + %arg)
1212 ; CHECK:Loop %bb7: backedge-taken count is (-1 + (zext i32 %arg2 to i64))
1313 ; CHECK-NEXT:Loop %bb7: max backedge-taken count is -1
1414 ; CHECK-NEXT:Loop %bb7: Predicated backedge-taken count is (-1 + (zext i32 %arg2 to i64))
9595 ; CHECK-NEXT: %tmp1 = shl i32 %val, 2
9696 ; CHECK-NEXT: --> (4 * %val) U: [0,-3) S: [-2147483648,2147483645)
9797 ; CHECK-NEXT: %tmp2 = and i32 %tmp1, 268435452
98 ; CHECK-NEXT: --> (4 * (zext i26 (trunc i32 %val to i26) to i32)) U: [0,268435453) S: [0,268435453)
98 ; CHECK-NEXT: --> (4 * (zext i26 (trunc i32 %val to i26) to i32)) U: [0,268435453) S: [0,268435453)
9999 ; CHECK-NEXT: Determining loop execution counts for: @masky_biggerShl
100100 ;
101101 %tmp1 = shl i32 %val, 2
3030 ret i32 %i
3131
3232 ; CHECK-LABEL: @test2
33 ; CHECK: Loop %loop: backedge-taken count is ((-32 + (32 * (%n /u 32))) /u 32)
33 ; CHECK: Loop %loop: backedge-taken count is ((-32 + (32 * (%n /u 32))) /u 32)
3434 ; CHECK: Loop %loop: max backedge-taken count is 134217727
3535 }
3636
1818 }
1919
2020 ; CHECK-LABEL: @range
21 ;
22 ; This had to be disabled when r334428 was reverted. We should enable this test
23 ; when r334428 is reapplied with a fix.
2124 define void @range() {
22 %a = call i32 @get_int(), !range !{i32 0, i32 100}
25 %a = call i32 @get_int(), !range !0
2326 %b = mul i32 %a, 4
2427 %c = zext i32 %b to i64
2528 ; CHECK: %c
26 ; CHECK-NEXT: --> (4 * (zext i32 %a to i64))
29 ; CHECK-NEXT: --> (zext i32 (4 * %a) to i64)
2730 ret void
2831 }
2932
30 ; CHECK-LABEL: @no_nuw
31 define void @no_nuw() {
32 %a = call i32 @get_int(), !range !{i32 0, i32 3}
33 %b = mul i32 %a, -100
34 ; CHECK: %b
35 ; CHECK-NEXT: --> (-100 * %a)
36 ret void
37 }
33 !0 = !{i32 0, i32 100}
1313 br label %bb6
1414
1515 bb6: ; preds = %bb6.lr.ph, %bb6
16 %_tmp1423 = phi i64 [ undef, %bb6.lr.ph ], [ %_tmp142, %bb6 ]
16 %_tmp1423 = phi i16 [ undef, %bb6.lr.ph ], [ %_tmp142, %bb6 ]
1717 %_tmp123 = getelementptr [2 x [3 x [5 x i16]]], [2 x [3 x [5 x i16]]]* @x, i16 0, i64 undef
18 %_tmp126 = getelementptr [3 x [5 x i16]], [3 x [5 x i16]]* %_tmp123, i16 0, i64 %_tmp1423
18 %_tmp125 = sext i16 %_tmp1423 to i64
19 %_tmp126 = getelementptr [3 x [5 x i16]], [3 x [5 x i16]]* %_tmp123, i16 0, i64 %_tmp125
1920 %_tmp129 = getelementptr [5 x i16], [5 x i16]* %_tmp126, i16 0, i64 undef
2021 %_tmp130 = load i16, i16* %_tmp129
2122 store i16 undef, i16* getelementptr ([2 x [3 x [5 x i16]]], [2 x [3 x [5 x i16]]]* @x, i64 0, i64 undef, i64 undef, i64 undef)
22 %_tmp142 = add i64 %_tmp1423, 1
23 %_tmp142 = add i16 %_tmp1423, 1
2324 br i1 false, label %bb6, label %loop.exit
2425
2526 loop.exit: ; preds = %bb6
26 %_tmp142.lcssa = phi i64 [ %_tmp142, %bb6 ]
27 %_tmp142.lcssa = phi i16 [ %_tmp142, %bb6 ]
2728 %split = phi i16 [ undef, %bb6 ]
2829 ; CHECK: %split = phi i16 [ undef, %bb6 ], [ undef, %bb6.lver.orig ]
2930 br label %bb9
3940 br label %bb6
4041
4142 bb6: ; preds = %bb6.lr.ph, %bb6
42 %_tmp1423 = phi i64 [ undef, %bb6.lr.ph ], [ %_tmp142, %bb6 ]
43 %_tmp1423 = phi i16 [ undef, %bb6.lr.ph ], [ %_tmp142, %bb6 ]
4344 %_tmp123 = getelementptr [2 x [3 x [5 x i16]]], [2 x [3 x [5 x i16]]]* @x, i16 0, i64 undef
44 %_tmp126 = getelementptr [3 x [5 x i16]], [3 x [5 x i16]]* %_tmp123, i16 0, i64 %_tmp1423
45 %_tmp125 = sext i16 %_tmp1423 to i64
46 %_tmp126 = getelementptr [3 x [5 x i16]], [3 x [5 x i16]]* %_tmp123, i16 0, i64 %_tmp125
4547 %_tmp129 = getelementptr [5 x i16], [5 x i16]* %_tmp126, i16 0, i64 undef
4648 %_tmp130 = load i16, i16* %_tmp129
4749 store i16 undef, i16* getelementptr ([2 x [3 x [5 x i16]]], [2 x [3 x [5 x i16]]]* @x, i64 0, i64 undef, i64 undef, i64 undef)
48 %_tmp142 = add i64 %_tmp1423, 1
50 %_tmp142 = add i16 %_tmp1423, 1
4951 br i1 false, label %bb6, label %loop.exit
5052
5153 loop.exit: ; preds = %bb6
52 %_tmp142.lcssa = phi i64 [ %_tmp142, %bb6 ]
54 %_tmp142.lcssa = phi i16 [ %_tmp142, %bb6 ]
5355 %split = phi i16 [ %t, %bb6 ]
5456 ; CHECK: %split = phi i16 [ %t, %bb6 ], [ %t, %bb6.lver.orig ]
5557 br label %bb9