llvm.org GIT mirror llvm / 25a3c4b
Remove loop index split test cases for release. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_21@42195 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 13 years ago
10 changed file(s) with 0 addition(s) and 477 deletion(s). Raw diff Collapse all Expand all
+0
-52
test/Transforms/LoopIndexSplit/Crash-2007-08-17.ll less more
None ; RUN: llvm-as < %s | opt -loop-index-split -disable-output
1
2 %struct._edit_script = type { %struct._edit_script*, i32, i8 }
3
4 define void @align_path(i8* %seq1, i8* %seq2, i32 %i1, i32 %j1, i32 %i2, i32 %j2, i32 %dist, %struct._edit_script** %head, %struct._edit_script** %tail, i32 %M, i32 %N) {
5 entry:
6 br label %bb354
7
8 bb354: ; preds = %bb511, %entry
9 br i1 false, label %bb495, label %bb368
10
11 bb368: ; preds = %bb354
12 ret void
13
14 bb495: ; preds = %bb495, %bb354
15 br i1 false, label %bb511, label %bb495
16
17 bb511: ; preds = %bb495
18 br i1 false, label %xmalloc.exit69, label %bb354
19
20 xmalloc.exit69: ; preds = %bb511
21 br i1 false, label %bb556, label %bb542.preheader
22
23 bb542.preheader: ; preds = %xmalloc.exit69
24 ret void
25
26 bb556: ; preds = %xmalloc.exit69
27 br label %bb583
28
29 bb583: ; preds = %cond_next693, %bb556
30 %k.4342.0 = phi i32 [ %tmp707, %cond_next693 ], [ 0, %bb556 ] ; [#uses=2]
31 %tmp586 = icmp eq i32 %k.4342.0, 0 ; [#uses=1]
32 br i1 %tmp586, label %cond_true589, label %cond_false608
33
34 cond_true589: ; preds = %bb583
35 br label %cond_next693
36
37 cond_false608: ; preds = %bb583
38 br i1 false, label %cond_next661, label %cond_next693
39
40 cond_next661: ; preds = %cond_false608
41 br label %cond_next693
42
43 cond_next693: ; preds = %cond_next661, %cond_false608, %cond_true589
44 %tmp705 = getelementptr i32* null, i32 0 ; [#uses=0]
45 %tmp707 = add i32 %k.4342.0, 1 ; [#uses=2]
46 %tmp711 = icmp sgt i32 %tmp707, 0 ; [#uses=1]
47 br i1 %tmp711, label %bb726.preheader, label %bb583
48
49 bb726.preheader: ; preds = %cond_next693
50 ret void
51 }
+0
-58
test/Transforms/LoopIndexSplit/Crash2-2007-08-17.ll less more
None ; RUN: llvm-as < %s | opt -loop-index-split -disable-output
1
2 %struct._edit_script = type { %struct._edit_script*, i32, i8 }
3
4 define void @align_path(i8* %seq1, i8* %seq2, i32 %i1, i32 %j1, i32 %i2, i32 %j2, i32 %dist, %struct._edit_script** %head, %struct._edit_script** %tail, i32 %M, i32 %N) {
5 entry:
6 br label %bb354
7
8 bb354: ; preds = %bb511, %entry
9 br i1 false, label %bb495, label %bb368
10
11 bb368: ; preds = %bb354
12 ret void
13
14 bb495: ; preds = %bb495, %bb354
15 br i1 false, label %bb511, label %bb495
16
17 bb511: ; preds = %bb495
18 br i1 false, label %xmalloc.exit69, label %bb354
19
20 xmalloc.exit69: ; preds = %bb511
21 br i1 false, label %bb556, label %bb542.preheader
22
23 bb542.preheader: ; preds = %xmalloc.exit69
24 ret void
25
26 bb556: ; preds = %xmalloc.exit69
27 br label %bb583
28
29 bb583: ; preds = %cond_next693, %bb556
30 %k.4342.0 = phi i32 [ %tmp707, %cond_next693 ], [ 0, %bb556 ] ; [#uses=2]
31 %tmp586 = icmp eq i32 %k.4342.0, 0 ; [#uses=1]
32 br i1 %tmp586, label %cond_true589, label %cond_false608
33
34 cond_true589: ; preds = %bb583
35 br label %cond_next693
36
37 cond_false608: ; preds = %bb583
38 br i1 false, label %bb645, label %cond_next693
39
40 bb645: ; preds = %cond_false608
41 br i1 false, label %bb684, label %cond_next661
42
43 cond_next661: ; preds = %bb645
44 br i1 false, label %bb684, label %cond_next693
45
46 bb684: ; preds = %cond_next661, %bb645
47 br label %cond_next693
48
49 cond_next693: ; preds = %bb684, %cond_next661, %cond_false608, %cond_true589
50 %tmp705 = getelementptr i32* null, i32 0 ; [#uses=0]
51 %tmp707 = add i32 %k.4342.0, 1 ; [#uses=2]
52 %tmp711 = icmp sgt i32 %tmp707, 0 ; [#uses=1]
53 br i1 %tmp711, label %bb726.preheader, label %bb583
54
55 bb726.preheader: ; preds = %cond_next693
56 ret void
57 }
+0
-50
test/Transforms/LoopIndexSplit/ExitCondition-2007-09-10.ll less more
None ; RUN: llvm-as < %s | opt -loop-index-split -disable-output
1
2 @k = external global i32 ; [#uses=2]
3
4 define void @foobar(i32 %a, i32 %b) {
5 entry:
6 br label %bb
7
8 bb: ; preds = %cond_next16, %entry
9 %i.01.0 = phi i32 [ 0, %entry ], [ %tmp18, %cond_next16 ] ; [#uses=5]
10 %tsum.18.0 = phi i32 [ 42, %entry ], [ %tsum.013.1, %cond_next16 ] ; [#uses=3]
11 %tmp1 = icmp slt i32 %i.01.0, 50 ; [#uses=1]
12 br i1 %tmp1, label %cond_true, label %cond_false
13
14 cond_true: ; preds = %bb
15 %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1]
16 %tmp6 = add i32 %tmp4, %tsum.18.0 ; [#uses=2]
17 %tmp914 = load i32* @k, align 4 ; [#uses=1]
18 %tmp1015 = icmp eq i32 %tmp914, 0 ; [#uses=1]
19 br i1 %tmp1015, label %cond_next16, label %cond_true13
20
21 cond_false: ; preds = %bb
22 %tmp8 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
23 %tmp9 = load i32* @k, align 4 ; [#uses=1]
24 %tmp10 = icmp eq i32 %tmp9, 0 ; [#uses=1]
25 br i1 %tmp10, label %cond_next16, label %cond_true13
26
27 cond_true13: ; preds = %cond_false, %cond_true
28 %tsum.013.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=1]
29 %tmp15 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
30 br label %cond_next16
31
32 cond_next16: ; preds = %cond_false, %cond_true, %cond_true13
33 %tsum.013.1 = phi i32 [ %tsum.013.0, %cond_true13 ], [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=2]
34 %tmp18 = add i32 %i.01.0, 1 ; [#uses=3]
35 %tmp21 = icmp eq i32 %tmp18, 100 ; [#uses=1]
36 br i1 %tmp21, label %bb, label %bb24
37
38 bb24: ; preds = %cond_next16
39 %tmp18.lcssa = phi i32 [ %tmp18, %cond_next16 ] ; [#uses=1]
40 %tsum.013.1.lcssa = phi i32 [ %tsum.013.1, %cond_next16 ] ; [#uses=1]
41 %tmp27 = tail call i32 @t( i32 %tmp18.lcssa, i32 %tsum.013.1.lcssa ) ; [#uses=0]
42 ret void
43 }
44
45 declare i32 @foo(i32)
46
47 declare i32 @bar(i32)
48
49 declare i32 @t(i32, i32)
+0
-61
test/Transforms/LoopIndexSplit/OneIterLoop-2007-08-17.ll less more
None ; Loop is elimianted
1 ; RUN: llvm-as < %s | opt -loop-index-split -disable-output -stats |& \
2 ; RUN: grep "loop-index-split" | count 1
3 %struct.anon = type { i32 }
4 @S1 = external global i32 ; [#uses=1]
5 @W1 = external global i32 ; [#uses=1]
6 @Y = weak global [100 x %struct.anon] zeroinitializer, align 32 ; <[100 x %struct.anon]*> [#uses=1]
7 @ti = external global i32 ; [#uses=1]
8 @T2 = external global [100 x [100 x i32]] ; <[100 x [100 x i32]]*> [#uses=1]
9 @d = external global i32 ; [#uses=1]
10 @T1 = external global i32 ; [#uses=2]
11 @N2 = external global i32 ; [#uses=2]
12
13 define void @foo() {
14 entry:
15 %tmp = load i32* @S1, align 4 ; [#uses=2]
16 %tmp266 = load i32* @N2, align 4 ; [#uses=1]
17 %tmp288 = icmp ult i32 %tmp, %tmp266 ; [#uses=1]
18 br i1 %tmp288, label %bb.preheader, label %return
19
20 bb.preheader: ; preds = %entry
21 %tmp1 = load i32* @W1, align 4 ; [#uses=1]
22 %tmp13 = load i32* @ti, align 4 ; [#uses=1]
23 %tmp18 = load i32* @d, align 4 ; [#uses=1]
24 %tmp26 = load i32* @N2, align 4 ; [#uses=1]
25 %T1.promoted = load i32* @T1 ; [#uses=1]
26 br label %bb
27
28 bb: ; preds = %bb.preheader, %bb25
29 %T1.tmp.1 = phi i32 [ %T1.promoted, %bb.preheader ], [ %T1.tmp.0, %bb25 ] ; [#uses=3]
30 %tj.01.0 = phi i32 [ %tmp24, %bb25 ], [ %tmp, %bb.preheader ] ; [#uses=4]
31 %tmp3 = icmp eq i32 %tj.01.0, %tmp1 ; [#uses=1]
32 br i1 %tmp3, label %cond_true, label %bb25
33
34 cond_true: ; preds = %bb
35 %tmp7 = getelementptr [100 x %struct.anon]* @Y, i32 0, i32 %tj.01.0, i32 0 ; [#uses=1]
36 %tmp8 = load i32* %tmp7, align 4 ; [#uses=1]
37 %tmp9 = icmp sgt i32 %tmp8, 0 ; [#uses=1]
38 br i1 %tmp9, label %cond_true12, label %bb25
39
40 cond_true12: ; preds = %cond_true
41 %tmp16 = getelementptr [100 x [100 x i32]]* @T2, i32 0, i32 %tmp13, i32 %tj.01.0 ; [#uses=1]
42 %tmp17 = load i32* %tmp16, align 4 ; [#uses=1]
43 %tmp19 = mul i32 %tmp18, %tmp17 ; [#uses=1]
44 %tmp21 = add i32 %tmp19, %T1.tmp.1 ; [#uses=1]
45 br label %bb25
46
47 bb25: ; preds = %cond_true, %bb, %cond_true12
48 %T1.tmp.0 = phi i32 [ %T1.tmp.1, %bb ], [ %T1.tmp.1, %cond_true ], [ %tmp21, %cond_true12 ] ; [#uses=2]
49 %tmp24 = add i32 %tj.01.0, 1 ; [#uses=2]
50 %tmp28 = icmp ult i32 %tmp24, %tmp26 ; [#uses=1]
51 br i1 %tmp28, label %bb, label %return.loopexit
52
53 return.loopexit: ; preds = %bb25
54 %T1.tmp.0.lcssa = phi i32 [ %T1.tmp.0, %bb25 ] ; [#uses=1]
55 store i32 %T1.tmp.0.lcssa, i32* @T1
56 br label %return
57
58 return: ; preds = %return.loopexit, %entry
59 ret void
60 }
+0
-62
test/Transforms/LoopIndexSplit/OneIterLoop2-2007-08-17.ll less more
None ; Loop is elimianted. Save last value assignment.
1 ; RUN: llvm-as < %s | opt -loop-index-split -disable-output -stats |& \
2 ; RUN: grep "loop-index-split" | count 1
3
4 %struct.anon = type { i32 }
5 @S1 = external global i32 ; [#uses=1]
6 @W1 = external global i32 ; [#uses=1]
7 @Y = weak global [100 x %struct.anon] zeroinitializer, align 32 ; <[100 x %struct.anon]*> [#uses=1]
8 @ti = external global i32 ; [#uses=1]
9 @T2 = external global [100 x [100 x i32]] ; <[100 x [100 x i32]]*> [#uses=1]
10 @d = external global i32 ; [#uses=1]
11 @T1 = external global i32 ; [#uses=2]
12 @N1 = external global i32 ; [#uses=2]
13
14 define void @foo() {
15 entry:
16 %tmp = load i32* @S1, align 4 ; [#uses=2]
17 %tmp266 = load i32* @N1, align 4 ; [#uses=1]
18 %tmp288 = icmp ult i32 %tmp, %tmp266 ; [#uses=1]
19 br i1 %tmp288, label %bb.preheader, label %return
20
21 bb.preheader: ; preds = %entry
22 %tmp1 = load i32* @W1, align 4 ; [#uses=1]
23 %tmp13 = load i32* @ti, align 4 ; [#uses=1]
24 %tmp18 = load i32* @d, align 4 ; [#uses=1]
25 %tmp26 = load i32* @N1, align 4 ; [#uses=1]
26 %T1.promoted = load i32* @T1 ; [#uses=1]
27 br label %bb
28
29 bb: ; preds = %bb.preheader, %bb25
30 %T1.tmp.1 = phi i32 [ %T1.promoted, %bb.preheader ], [ %T1.tmp.0, %bb25 ] ; [#uses=3]
31 %tj.01.0 = phi i32 [ %tmp24, %bb25 ], [ %tmp, %bb.preheader ] ; [#uses=4]
32 %tmp24 = add i32 %tj.01.0, 1 ; [#uses=2]
33 %tmp3 = icmp eq i32 %tmp24, %tmp1 ; [#uses=1]
34 br i1 %tmp3, label %cond_true, label %bb25
35
36 cond_true: ; preds = %bb
37 %tmp7 = getelementptr [100 x %struct.anon]* @Y, i32 0, i32 %tj.01.0, i32 0 ; [#uses=1]
38 %tmp8 = load i32* %tmp7, align 4 ; [#uses=1]
39 %tmp9 = icmp sgt i32 %tmp8, 0 ; [#uses=1]
40 br i1 %tmp9, label %cond_true12, label %bb25
41
42 cond_true12: ; preds = %cond_true
43 %tmp16 = getelementptr [100 x [100 x i32]]* @T2, i32 0, i32 %tmp13, i32 %tj.01.0 ; [#uses=1]
44 %tmp17 = load i32* %tmp16, align 4 ; [#uses=1]
45 %tmp19 = mul i32 %tmp18, %tmp17 ; [#uses=1]
46 %tmp21 = add i32 %tmp19, %T1.tmp.1 ; [#uses=1]
47 br label %bb25
48
49 bb25: ; preds = %cond_true, %bb, %cond_true12
50 %T1.tmp.0 = phi i32 [ %T1.tmp.1, %bb ], [ %T1.tmp.1, %cond_true ], [ %tmp21, %cond_true12 ] ; [#uses=2]
51 %tmp28 = icmp ult i32 %tmp24, %tmp26 ; [#uses=1]
52 br i1 %tmp28, label %bb, label %return.loopexit
53
54 return.loopexit: ; preds = %bb25
55 %T1.tmp.0.lcssa = phi i32 [ %T1.tmp.0, %bb25 ] ; [#uses=1]
56 store i32 %T1.tmp.0.lcssa, i32* @T1
57 br label %return
58
59 return: ; preds = %return.loopexit, %entry
60 ret void
61 }
+0
-35
test/Transforms/LoopIndexSplit/OneIterLoop3-2007-08-17.ll less more
None ; Loop is elimianted. Save last value assignments, including induction variable.
1 ; RUN: llvm-as < %s | opt -loop-index-split -disable-output -stats |& \
2 ; RUN: grep "loop-index-split" | count 1
3
4 declare i32 @foo(i32)
5 declare i32 @bar(i32, i32)
6
7 define void @foobar(i32 %a, i32 %b) {
8 entry:
9 br label %bb
10
11 bb: ; preds = %cond_next, %entry
12 %i.01.0 = phi i32 [ 0, %entry ], [ %tmp8, %cond_next ] ; [#uses=3]
13 %tsum.16.0 = phi i32 [ 42, %entry ], [ %tsum.0, %cond_next ] ; [#uses=2]
14 %tmp1 = icmp eq i32 %i.01.0, 50 ; [#uses=1]
15 br i1 %tmp1, label %cond_true, label %cond_next
16
17 cond_true: ; preds = %bb
18 %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1]
19 %tmp6 = add i32 %tmp4, %tsum.16.0 ; [#uses=1]
20 br label %cond_next
21
22 cond_next: ; preds = %bb, %cond_true
23 %tsum.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.16.0, %bb ] ; [#uses=2]
24 %tmp8 = add i32 %i.01.0, 1 ; [#uses=3]
25 %tmp11 = icmp slt i32 %tmp8, 100 ; [#uses=1]
26 br i1 %tmp11, label %bb, label %bb14
27
28 bb14: ; preds = %cond_next
29 %tmp8.lcssa = phi i32 [ %tmp8, %cond_next ] ; [#uses=1]
30 %tsum.0.lcssa = phi i32 [ %tsum.0, %cond_next ] ; [#uses=1]
31 %tmp17 = tail call i32 @bar( i32 %tmp8.lcssa, i32 %tsum.0.lcssa ) ; [#uses=0]
32 ret void
33 }
34
+0
-52
test/Transforms/LoopIndexSplit/SaveLastValue-2007-08-17.ll less more
None ; Split loop. Save last value.
1 ; RUN: llvm-as < %s | opt -loop-index-split -disable-output -stats |& \
2 ; RUN: grep "loop-index-split" | count 1
3
4 @k = external global i32 ; [#uses=2]
5
6 define void @foobar(i32 %a, i32 %b) {
7 entry:
8 br label %bb
9
10 bb: ; preds = %cond_next16, %entry
11 %i.01.0 = phi i32 [ 0, %entry ], [ %tmp18, %cond_next16 ] ; [#uses=5]
12 %tsum.18.0 = phi i32 [ 42, %entry ], [ %tsum.013.1, %cond_next16 ] ; [#uses=3]
13 %tmp1 = icmp slt i32 %i.01.0, 50 ; [#uses=1]
14 br i1 %tmp1, label %cond_true, label %cond_false
15
16 cond_true: ; preds = %bb
17 %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1]
18 %tmp6 = add i32 %tmp4, %tsum.18.0 ; [#uses=2]
19 %tmp914 = load i32* @k, align 4 ; [#uses=1]
20 %tmp1015 = icmp eq i32 %tmp914, 0 ; [#uses=1]
21 br i1 %tmp1015, label %cond_next16, label %cond_true13
22
23 cond_false: ; preds = %bb
24 %tmp8 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
25 %tmp9 = load i32* @k, align 4 ; [#uses=1]
26 %tmp10 = icmp eq i32 %tmp9, 0 ; [#uses=1]
27 br i1 %tmp10, label %cond_next16, label %cond_true13
28
29 cond_true13: ; preds = %cond_false, %cond_true
30 %tsum.013.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=1]
31 %tmp15 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
32 br label %cond_next16
33
34 cond_next16: ; preds = %cond_false, %cond_true, %cond_true13
35 %tsum.013.1 = phi i32 [ %tsum.013.0, %cond_true13 ], [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=2]
36 %tmp18 = add i32 %i.01.0, 1 ; [#uses=3]
37 %tmp21 = icmp slt i32 %tmp18, 100 ; [#uses=1]
38 br i1 %tmp21, label %bb, label %bb24
39
40 bb24: ; preds = %cond_next16
41 %tmp18.lcssa = phi i32 [ %tmp18, %cond_next16 ] ; [#uses=1]
42 %tsum.013.1.lcssa = phi i32 [ %tsum.013.1, %cond_next16 ] ; [#uses=1]
43 %tmp27 = tail call i32 @t( i32 %tmp18.lcssa, i32 %tsum.013.1.lcssa ) ; [#uses=0]
44 ret void
45 }
46
47 declare i32 @foo(i32)
48
49 declare i32 @bar(i32)
50
51 declare i32 @t(i32, i32)
+0
-52
test/Transforms/LoopIndexSplit/SplitValue-2007-08-24.ll less more
None ; Split loop. Save last value. Split value is off by one in this example.
1 ; RUN: llvm-as < %s | opt -loop-index-split -disable-output -stats |& \
2 ; RUN: grep "loop-index-split" | count 1
3
4 @k = external global i32 ; [#uses=2]
5
6 define void @foobar(i32 %a, i32 %b) {
7 entry:
8 br label %bb
9
10 bb: ; preds = %cond_next16, %entry
11 %i.01.0 = phi i32 [ 0, %entry ], [ %tmp18, %cond_next16 ] ; [#uses=5]
12 %tsum.18.0 = phi i32 [ 42, %entry ], [ %tsum.013.1, %cond_next16 ] ; [#uses=3]
13 %tmp1 = icmp sgt i32 %i.01.0, 50 ; [#uses=1]
14 br i1 %tmp1, label %cond_true, label %cond_false
15
16 cond_true: ; preds = %bb
17 %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1]
18 %tmp6 = add i32 %tmp4, %tsum.18.0 ; [#uses=2]
19 %tmp914 = load i32* @k, align 4 ; [#uses=1]
20 %tmp1015 = icmp eq i32 %tmp914, 0 ; [#uses=1]
21 br i1 %tmp1015, label %cond_next16, label %cond_true13
22
23 cond_false: ; preds = %bb
24 %tmp8 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
25 %tmp9 = load i32* @k, align 4 ; [#uses=1]
26 %tmp10 = icmp eq i32 %tmp9, 0 ; [#uses=1]
27 br i1 %tmp10, label %cond_next16, label %cond_true13
28
29 cond_true13: ; preds = %cond_false, %cond_true
30 %tsum.013.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=1]
31 %tmp15 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
32 br label %cond_next16
33
34 cond_next16: ; preds = %cond_false, %cond_true, %cond_true13
35 %tsum.013.1 = phi i32 [ %tsum.013.0, %cond_true13 ], [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=2]
36 %tmp18 = add i32 %i.01.0, 1 ; [#uses=3]
37 %tmp21 = icmp slt i32 %tmp18, 100 ; [#uses=1]
38 br i1 %tmp21, label %bb, label %bb24
39
40 bb24: ; preds = %cond_next16
41 %tmp18.lcssa = phi i32 [ %tmp18, %cond_next16 ] ; [#uses=1]
42 %tsum.013.1.lcssa = phi i32 [ %tsum.013.1, %cond_next16 ] ; [#uses=1]
43 %tmp27 = tail call i32 @t( i32 %tmp18.lcssa, i32 %tsum.013.1.lcssa ) ; [#uses=0]
44 ret void
45 }
46
47 declare i32 @foo(i32)
48
49 declare i32 @bar(i32)
50
51 declare i32 @t(i32, i32)
+0
-52
test/Transforms/LoopIndexSplit/UpperBound-2007-08-24.ll less more
None ; Split loop. Split value is a constant and greater then exit value.
1 ; Check whether optimizer inserts proper checkfor split value or not.
2 ; RUN: llvm-as < %s | opt -loop-index-split | llvm-dis | grep select
3
4 @k = external global i32 ; [#uses=2]
5
6 define void @foobar(i32 %a, i32 %b) {
7 entry:
8 br label %bb
9
10 bb: ; preds = %cond_next16, %entry
11 %i.01.0 = phi i32 [ 0, %entry ], [ %tmp18, %cond_next16 ] ; [#uses=5]
12 %tsum.18.0 = phi i32 [ 42, %entry ], [ %tsum.013.1, %cond_next16 ] ; [#uses=3]
13 %tmp1 = icmp slt i32 %i.01.0, 500 ; [#uses=1]
14 br i1 %tmp1, label %cond_true, label %cond_false
15
16 cond_true: ; preds = %bb
17 %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1]
18 %tmp6 = add i32 %tmp4, %tsum.18.0 ; [#uses=2]
19 %tmp914 = load i32* @k, align 4 ; [#uses=1]
20 %tmp1015 = icmp eq i32 %tmp914, 0 ; [#uses=1]
21 br i1 %tmp1015, label %cond_next16, label %cond_true13
22
23 cond_false: ; preds = %bb
24 %tmp8 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
25 %tmp9 = load i32* @k, align 4 ; [#uses=1]
26 %tmp10 = icmp eq i32 %tmp9, 0 ; [#uses=1]
27 br i1 %tmp10, label %cond_next16, label %cond_true13
28
29 cond_true13: ; preds = %cond_false, %cond_true
30 %tsum.013.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=1]
31 %tmp15 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0]
32 br label %cond_next16
33
34 cond_next16: ; preds = %cond_false, %cond_true, %cond_true13
35 %tsum.013.1 = phi i32 [ %tsum.013.0, %cond_true13 ], [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=2]
36 %tmp18 = add i32 %i.01.0, 1 ; [#uses=3]
37 %tmp21 = icmp slt i32 %tmp18, 100 ; [#uses=1]
38 br i1 %tmp21, label %bb, label %bb24
39
40 bb24: ; preds = %cond_next16
41 %tmp18.lcssa = phi i32 [ %tmp18, %cond_next16 ] ; [#uses=1]
42 %tsum.013.1.lcssa = phi i32 [ %tsum.013.1, %cond_next16 ] ; [#uses=1]
43 %tmp27 = tail call i32 @t( i32 %tmp18.lcssa, i32 %tsum.013.1.lcssa ) ; [#uses=0]
44 ret void
45 }
46
47 declare i32 @foo(i32)
48
49 declare i32 @bar(i32)
50
51 declare i32 @t(i32, i32)
+0
-3
test/Transforms/LoopIndexSplit/dg.exp less more
None load_lib llvm.exp
1
2 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]