llvm.org GIT mirror llvm / 4323665
Revert the test moves from 176733. Use "REQUIRES: asserts" instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176873 91177308-0d34-0410-b5e6-96231b3b80d8 Jan Wen Voung 6 years ago
160 changed file(s) with 3681 addition(s) and 3676 deletion(s). Raw diff Collapse all Expand all
+0
-42
test/Analysis/RegionInfo/Stats/block_sort.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats -analyze < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @BZ2_blockSort() nounwind {
6 start:
7 br label %while
8
9 while:
10 br label %while.body134.i.i
11
12 while.body134.i.i:
13 br i1 1, label %end, label %w
14
15 w:
16 br label %if.end140.i.i
17
18 if.end140.i.i:
19 br i1 1, label %while.end186.i.i, label %if.end183.i.i
20
21 if.end183.i.i:
22 br label %while.body134.i.i
23
24 while.end186.i.i:
25 br label %while
26
27 end:
28 ret void
29 }
30 ; CHECK-NOT: =>
31 ; CHECK: [0] start =>
32 ; CHECK: [1] while => end
33
34 ; STAT: 2 region - The # of regions
35 ; STAT: 1 region - The # of simple regions
36
37 ; BBIT: start, while, while.body134.i.i, end, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
38 ; BBIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
39
40 ; RNIT: start, while => end, end,
41 ; RNIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
+0
-33
test/Analysis/RegionInfo/Stats/cond_loop.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 5:
7 br label %"0"
8
9 0:
10 br label %"1"
11 1:
12 br i1 1, label %"2", label %"3"
13 2:
14 ret void
15 3:
16 br i1 1, label %"1", label %"4"
17 4:
18 br label %"0"
19 }
20
21 ; CHECK-NOT: =>
22 ; CHECK: [0] 5 =>
23 ; CHECK: [1] 0 => 2
24
25 ; STAT: 2 region - The # of regions
26 ; STAT: 1 region - The # of simple regions
27
28 ; BBIT: 5, 0, 1, 2, 3, 4,
29 ; BBIT: 0, 1, 3, 4,
30
31 ; RNIT: 5, 0 => 2, 2,
32 ; RNIT: 0, 1, 3, 4,
+0
-60
test/Analysis/RegionInfo/Stats/condition_complicated.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define internal fastcc zeroext i8 @handle_compress() nounwind {
6 end165:
7 br i1 1, label %false239, label %true181
8
9 true181:
10 br i1 1, label %then187, label %else232
11
12 then187:
13 br label %end265
14
15 else232:
16 br i1 1, label %false239, label %then245
17
18 false239:
19 br i1 1, label %then245, label %else259
20
21 then245:
22 br i1 1, label %then251, label %end253
23
24 then251:
25 br label %end253
26
27 end253:
28 br label %end265
29
30 else259:
31 br label %end265
32
33 end265:
34 br i1 1, label %then291, label %end298
35
36 then291:
37 br label %end298
38
39 end298:
40 ret i8 1
41 }
42
43 ; CHECK-NOT: =>
44 ; CHECK: [0] end165 =>
45 ; CHECK-NEXT: [1] end165 => end265
46 ; CHECK-NEXT: [2] then245 => end253
47 ; CHECK-NEXT: [1] end265 => end298
48
49 ; STAT: 4 region - The # of regions
50
51 ; BBIT: end165, false239, then245, then251, end253, end265, then291, end298, else259, true181, then187, else232,
52 ; BBIT: end165, false239, then245, then251, end253, else259, true181, then187, else232,
53 ; BBIT: then245, then251,
54 ; BBIT: end265, then291,
55
56 ; RNIT: end165 => end265, end265 => end298, end298,
57 ; RNIT: end165, false239, then245 => end253, end253, else259, true181, then187, else232,
58 ; RNIT: then245, then251,
59 ; RNIT: end265, then291,
+0
-44
test/Analysis/RegionInfo/Stats/condition_complicated_2.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define internal fastcc void @compress() nounwind {
6 end33:
7 br i1 1, label %end124, label %lor.lhs.false95
8
9 lor.lhs.false95:
10 br i1 1, label %then107, label %end172
11
12 then107:
13 br i1 1, label %end124, label %then113
14
15 then113:
16 br label %end124
17
18 end124:
19 br label %exit
20
21 end172:
22 br label %exit
23
24
25 exit:
26 unreachable
27
28
29 }
30 ; CHECK-NOT: =>
31 ; CHECK: [0] end33 =>
32 ; CHECK-NEXT: [1] end33 => exit
33 ; CHECK-NEXT: [2] then107 => end124
34
35 ; STAT: 3 region - The # of regions
36
37 ; BBIT: end33, end124, exit, lor.lhs.false95, then107, then113, end172,
38 ; BBIT: end33, end124, lor.lhs.false95, then107, then113, end172,
39 ; BBIT: then107, then113,
40
41 ; RNIT: end33 => exit, exit,
42 ; RNIT: end33, end124, lor.lhs.false95, then107 => end124, end172,
43 ; RNIT: then107, then113,
+0
-26
test/Analysis/RegionInfo/Stats/condition_forward_edge.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 0:
7 br label %"1"
8 1:
9 br i1 1, label %"2", label %"3"
10 2:
11 br label %"3"
12 3:
13 ret void
14 }
15 ; CHECK-NOT: =>
16 ; CHECK: [0] 0 =>
17 ; CHECK: [1] 1 => 3
18
19 ; STAT: 2 region - The # of regions
20
21 ; BBIT: 0, 1, 2, 3,
22 ; BBIT: 1, 2,
23
24 ; RNIT: 0, 1 => 3, 3,
25 ; RNIT: 1, 2,
+0
-31
test/Analysis/RegionInfo/Stats/condition_same_exit.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 0:
7 br i1 1, label %"1", label %"4"
8
9 1:
10 br i1 1, label %"2", label %"3"
11 2:
12 br label %"4"
13 3:
14 br label %"4"
15 4:
16 ret void
17 }
18 ; CHECK-NOT: =>
19 ; CHECK: [0] 0 =>
20 ; CHECK-NEXT: [1] 0 => 4
21 ; CHECK-NEXT: [2] 1 => 4
22 ; STAT: 3 region - The # of regions
23
24 ; BBIT: 0, 1, 2, 4, 3,
25 ; BBIT: 0, 1, 2, 3,
26 ; BBIT: 1, 2, 3,
27
28 ; RNIT: 0 => 4, 4,
29 ; RNIT: 0, 1 => 4,
30 ; RNIT: 1, 2, 3,
+0
-28
test/Analysis/RegionInfo/Stats/condition_simple.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 0:
7 br label %"1"
8 1:
9 br i1 1, label %"2", label %"3"
10 2:
11 br label %"4"
12 3:
13 br label %"4"
14 4:
15 ret void
16 }
17
18 ; CHECK-NOT: =>
19 ; CHECK: [0] 0 =>
20 ; CHECK-NEXT: [1] 1 => 4
21 ; STAT: 2 region - The # of regions
22
23 ; BBIT: 0, 1, 2, 4, 3,
24 ; BBIT: 1, 2, 3,
25
26 ; RNIT: 0, 1 => 4, 4,
27 ; RNIT: 1, 2, 3,
+0
-38
test/Analysis/RegionInfo/Stats/exit_in_condition.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define internal fastcc zeroext i8 @handle_compress() nounwind {
6 entry:
7 br label %outer
8
9 outer:
10 br label %body
11
12 body:
13 br i1 1, label %body.i, label %if.end
14
15 body.i:
16 br i1 1, label %end, label %if.end
17
18 if.end:
19 br label %if.then64
20
21 if.then64:
22 br label %outer
23
24 end:
25 ret i8 1
26 }
27 ; CHECK-NOT: =>
28 ; CHECK: [0] entry =>
29 ; CHECK-NEXT: [1] outer => end
30 ; STAT: 2 region - The # of regions
31 ; STAT: 1 region - The # of simple regions
32
33 ; BBIT: entry, outer, body, body.i, end, if.end, if.then64,
34 ; BBIT: outer, body, body.i, if.end, if.then64,
35
36 ; RNIT: entry, outer => end, end,
37 ; RNIT: outer, body, body.i, if.end, if.then64,
+0
-20
test/Analysis/RegionInfo/Stats/infinite_loop.ll less more
None ; RUN: opt -regions -analyze < %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2
3 define void @normal_condition() nounwind {
4 0:
5 br label %"1"
6 1:
7 br i1 1, label %"2", label %"3"
8 2:
9 br label %"2"
10 3:
11 br label %"4"
12 4:
13 ret void
14 }
15 ; CHECK-NOT: =>
16 ; CHECK: [0] 0 =>
17 ; CHECK: [1] 1 => 4
18 ; STAT: 2 region - The # of regions
19 ; STAT: 1 region - The # of simple regions
+0
-36
test/Analysis/RegionInfo/Stats/infinite_loop_2.ll less more
None ; RUN: opt -regions -analyze < %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 0:
7 br label %"1"
8 1:
9 br i1 1, label %"2", label %"3"
10 2:
11 br label %"5"
12 5:
13 br i1 1, label %"11", label %"12"
14 11:
15 br label %"6"
16 12:
17 br label %"6"
18 6:
19 br label %"2"
20 3:
21 br label %"4"
22 4:
23 ret void
24 }
25 ; CHECK-NOT: =>
26 ; CHECK: [0] 0 =>
27 ; CHECK: [1] 1 => 3
28 ; STAT: 2 region - The # of regions
29 ; STAT: 1 region - The # of simple regions
30
31 ; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4,
32 ; BBIT: 1, 2, 5, 11, 6, 12,
33
34 ; RNIT: 0, 1 => 3, 3, 4,
35 ; RNIT: 1, 2, 5, 11, 6, 12,
+0
-52
test/Analysis/RegionInfo/Stats/infinite_loop_3.ll less more
None ; RUN: opt -regions -analyze < %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"7"
9 7:
10 br i1 1, label %"1", label %"8"
11 1:
12 br i1 1, label %"2", label %"3"
13 2:
14 br label %"5"
15 5:
16 br i1 1, label %"11", label %"12"
17 11:
18 br label %"6"
19 12:
20 br label %"6"
21 6:
22 br label %"2"
23 8:
24 br label %"9"
25 9:
26 br i1 1, label %"13", label %"14"
27 13:
28 br label %"10"
29 14:
30 br label %"10"
31 10:
32 br label %"8"
33 3:
34 br label %"4"
35 4:
36 ret void
37 }
38 ; CHECK-NOT: =>
39 ; CHECK: [0] 0 =>
40 ; CHECK-NEXT: [1] 1 => 3
41 ; CHECK-NEXT: [1] 7 => 1
42 ; STAT: 3 region - The # of regions
43 ; STAT: 2 region - The # of simple regions
44
45 ; BBIT: 0, 7, 1, 2, 5, 11, 6, 12, 3, 4, 8, 9, 13, 10, 14,
46 ; BBIT: 7, 8, 9, 13, 10, 14,
47 ; BBIT: 1, 2, 5, 11, 6, 12,
48
49 ; RNIT: 0, 7 => 1, 1 => 3, 3, 4,
50 ; RNIT: 7, 8, 9, 13, 10, 14,
51 ; RNIT: 1, 2, 5, 11, 6, 12,
+0
-48
test/Analysis/RegionInfo/Stats/infinite_loop_4.ll less more
None ; RUN: opt -regions -analyze < %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @normal_condition() nounwind {
6 0:
7 br label %"7"
8 7:
9 br i1 1, label %"1", label %"8"
10 1:
11 br i1 1, label %"2", label %"3"
12 2:
13 br label %"5"
14 5:
15 br i1 1, label %"11", label %"12"
16 11:
17 br label %"6"
18 12:
19 br label %"6"
20 6:
21 br i1 1, label %"2", label %"10"
22 8:
23 br label %"9"
24 9:
25 br i1 1, label %"13", label %"14"
26 13:
27 br label %"10"
28 14:
29 br label %"10"
30 10:
31 br label %"8"
32 3:
33 br label %"4"
34 4:
35 ret void
36 }
37 ; CHECK-NOT: =>
38 ; CHECK: [0] 0 =>
39 ; CHECK-NEXT: [1] 7 => 3
40 ; STAT: 2 region - The # of regions
41 ; STAT: 1 region - The # of simple regions
42
43 ; BBIT: 0, 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12, 3, 4,
44 ; BBIT: 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12,
45
46 ; RNIT: 0, 7 => 3, 3, 4,
47 ; RNIT: 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12,
+0
-4
test/Analysis/RegionInfo/Stats/lit.local.cfg less more
None config.suffixes = ['.ll', '.c', '.cpp']
1
2 if not config.root.enable_assertions:
3 config.unsupported = True
+0
-46
test/Analysis/RegionInfo/Stats/loop_with_condition.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"1"
9 1:
10 br i1 1, label %"6", label %"2"
11 2:
12 br i1 1, label %"3", label %"4"
13 3:
14 br label %"5"
15 4:
16 br label %"5"
17 5:
18 br label %"8"
19 8:
20 br i1 1, label %"7", label %"9"
21 9:
22 br label %"2"
23 7:
24 br label %"6"
25 6:
26 ret void
27 }
28
29 ; CHECK-NOT: =>
30 ; CHECK: [0] 0 =>
31 ; CHECK-NEXT: [1] 1 => 6
32 ; CHECK-NEXT: [2] 2 => 7
33 ; CHECK-NEXT: [3] 2 => 5
34 ; STAT: 4 region - The # of regions
35 ; STAT: 1 region - The # of simple regions
36
37 ; BBIT: 0, 1, 6, 2, 3, 5, 8, 7, 9, 4,
38 ; BBIT: 1, 2, 3, 5, 8, 7, 9, 4,
39 ; BBIT: 2, 3, 5, 8, 9, 4,
40 ; BBIT: 2, 3, 4,
41
42 ; RNIT: 0, 1 => 6, 6,
43 ; RNIT: 1, 2 => 7, 7,
44 ; RNIT: 2 => 5, 5, 8, 9,
45 ; RNIT: 2, 3, 4,
+0
-40
test/Analysis/RegionInfo/Stats/loops_1.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define internal fastcc zeroext i8 @loops_1() nounwind {
6 entry:
7 br i1 1, label %outer , label %a
8
9 a:
10 br label %body
11
12 outer:
13 br label %body
14
15 body:
16 br i1 1, label %land, label %if
17
18 land:
19 br i1 1, label %exit, label %end
20
21 exit:
22 br i1 1, label %if, label %end
23
24 if:
25 br label %outer
26
27 end:
28 ret i8 1
29 }
30 ; CHECK-NOT: =>
31 ; CHECK: [0] entry =>
32 ; CHECK-NEXT: [1] entry => end
33 ; STAT: 2 region - The # of regions
34
35 ; BBIT: entry, outer, body, land, exit, if, end, a,
36 ; BBIT: entry, outer, body, land, exit, if, a,
37
38 ; RNIT: entry => end, end,
39 ; RNIT: entry, outer, body, land, exit, if, a,
+0
-49
test/Analysis/RegionInfo/Stats/loops_2.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @meread_() nounwind {
6 entry:
7 br label %bb23
8
9 bb23:
10 br label %bb.i
11
12 bb.i: ; preds = %bb.i, %bb54
13 br label %pflini_.exit
14
15 pflini_.exit: ; preds = %bb.i
16 br label %bb58thread-split
17
18 bb58thread-split: ; preds = %bb64, %bb61, %pflini_.exit
19 br label %bb58
20
21 bb58: ; preds = %bb60, %bb58thread-split
22 br i1 1, label %bb59, label %bb23
23
24 bb59: ; preds = %bb58
25 switch i32 1, label %bb60 [
26 i32 1, label %l98
27 ]
28
29 bb60: ; preds = %bb59
30 br i1 1, label %bb61, label %bb58
31
32 bb61: ; preds = %bb60
33 br label %bb58thread-split
34
35 l98: ; preds = %bb69, %bb59
36 ret void
37 }
38 ; CHECK-NOT: =>
39 ; CHECK: [0] entry =>
40 ; CHECK: [1] bb23 => l98
41 ; STAT: 2 region - The # of regions
42 ; STAT: 1 region - The # of simple regions
43
44 ; BBIT: entry, bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61, l98,
45 ; BBIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61,
46
47 ; RNIT: entry, bb23 => l98, l98,
48 ; RNIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61,
+0
-69
test/Analysis/RegionInfo/Stats/mix_1.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @a_linear_impl_fig_1() nounwind {
7 0:
8
9 br i1 1, label %"1", label %"15"
10 1:
11 switch i32 0, label %"2" [ i32 0, label %"3"
12 i32 1, label %"7"]
13 2:
14 br label %"4"
15 3:
16 br label %"5"
17 4:
18 br label %"6"
19 5:
20 br label %"6"
21 6:
22 br label %"7"
23 7:
24 br label %"15"
25 15:
26 br label %"8"
27 8:
28 br label %"16"
29 16:
30 br label %"9"
31 9:
32 br i1 1, label %"10", label %"11"
33 11:
34 br i1 1, label %"13", label %"12"
35 13:
36 br label %"14"
37 12:
38 br label %"14"
39 14:
40 br label %"8"
41 10:
42 br label %"17"
43 17:
44 br label %"18"
45 18:
46 ret void
47 }
48
49 ; CHECK-NOT: =>
50 ; CHECK: [0] 0 =>
51 ; CHECK-NEXT: [1] 0 => 15
52 ; CHECK-NEXT: [2] 1 => 7
53 ; CHECK-NEXT: [1] 8 => 10
54 ; CHECK-NEXT: [2] 11 => 14
55 ; STAT: 5 region - The # of regions
56 ; STAT: 1 region - The # of simple regions
57
58 ; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5,
59 ; BBIT: 0, 1, 2, 4, 6, 7, 3, 5,
60 ; BBIT: 1, 2, 4, 6, 3, 5,
61 ; BBIT: 8, 16, 9, 11, 13, 14, 12,
62 ; BBIT: 11, 13, 12,
63
64 ; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18,
65 ; RNIT: 0, 1 => 7, 7,
66 ; RNIT: 1, 2, 4, 6, 3, 5,
67 ; RNIT: 8, 16, 9, 11 => 14, 14,
68 ; RNIT: 11, 13, 12,
+0
-33
test/Analysis/RegionInfo/Stats/nested_loops.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc zeroext i8 @handle_compress() nounwind {
7 entry:
8 br label %outer
9
10 outer:
11 br label %body
12
13 body:
14 br i1 1, label %exit172, label %end
15
16 exit172:
17 br i1 1, label %end, label %outer
18
19 end:
20 ret i8 1
21 }
22 ; CHECK-NOT: =>
23 ; CHECK: [0] entry =>
24 ; CHECK-NEXT: [1] outer => end
25
26 ; STAT: 2 region - The # of regions
27
28 ; BBIT: entry, outer, body, exit172, end,
29 ; BBIT: outer, body, exit172,
30
31 ; RNIT: entry, outer => end, end,
32 ; RNIT: outer, body, exit172,
+0
-49
test/Analysis/RegionInfo/Stats/next.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @MAIN__() nounwind {
6 entry:
7 br label %__label_002001.outer
8
9 __label_002001.outer: ; preds = %bb236, %bb92
10 br label %__label_002001
11
12 __label_002001: ; preds = %bb229, %__label_002001.outer
13 br i1 1, label %bb93, label %__label_000020
14
15 bb93: ; preds = %__label_002001
16 br i1 1, label %__label_000020, label %bb197
17
18 bb197: ; preds = %bb193
19 br i1 1, label %bb229, label %bb224
20
21 bb224: ; preds = %bb223, %bb227
22 br i1 1, label %bb229, label %bb224
23
24 bb229: ; preds = %bb227, %bb223
25 br i1 1, label %__label_002001, label %__label_002001.outer
26
27 __label_000020: ; preds = %__label_002001, %bb194
28 ret void
29 }
30
31 ; CHECK-NOT: =>
32 ; CHECK: [0] entry =>
33 ; CHECK-NEXT: [1] __label_002001.outer => __label_000020
34 ; CHECK-NEXT: [2] bb197 => bb229
35 ; CHECK-NEXT: [3] bb224 => bb229
36
37 ; STAT: 4 region - The # of regions
38 ; STAT: 1 region - The # of simple regions
39
40 ; BBIT: entry, __label_002001.outer, __label_002001, bb93, __label_000020, bb197, bb229, bb224,
41 ; BBIT: __label_002001.outer, __label_002001, bb93, bb197, bb229, bb224,
42 ; BBIT: bb197, bb224,
43 ; BBIT: bb224,
44
45 ; RNIT: entry, __label_002001.outer => __label_000020, __label_000020,
46 ; RNIT: __label_002001.outer, __label_002001, bb93, bb197 => bb229, bb229,
47 ; RNIT: bb197, bb224 => bb229,
48 ; RNIT: bb224,
+0
-55
test/Analysis/RegionInfo/Stats/paper.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define void @a_linear_impl_fig_1() nounwind {
6 0:
7 br label %"1"
8 1:
9 br label %"2"
10 2:
11 br label %"3"
12 3:
13 br i1 1, label %"13", label %"4"
14 4:
15 br i1 1, label %"5", label %"1"
16 5:
17 br i1 1, label %"8", label %"6"
18 6:
19 br i1 1, label %"7", label %"4"
20 7:
21 ret void
22 8:
23 br i1 1, label %"9", label %"1"
24 9:
25 br label %"10"
26 10:
27 br i1 1, label %"12", label %"11"
28 11:
29 br i1 1, label %"9", label %"8"
30 13:
31 br i1 1, label %"2", label %"1"
32 12:
33 switch i32 0, label %"1" [ i32 0, label %"9"
34 i32 1, label %"8"]
35 }
36
37 ; CHECK-NOT: =>
38 ; CHECK: [0] 0 =>
39 ; CHECK-NEXT: [1] 1 => 7
40 ; CHECK-NEXT: [2] 1 => 4
41 ; CHECK-NEXT: [2] 8 => 1
42
43 ; STAT: 4 region - The # of regions
44 ; STAT: 1 region - The # of simple regions
45
46 ; BBIT: 0, 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6, 7,
47 ; BBIT: 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6,
48 ; BBIT: 1, 2, 3, 13,
49 ; BBIT: 8, 9, 10, 12, 11,
50
51 ; RNIT: 0, 1 => 7, 7,
52 ; RNIT: 1 => 4, 4, 5, 8 => 1, 6,
53 ; RNIT: 1, 2, 3, 13,
54 ; RNIT: 8, 9, 10, 12, 11,
+0
-46
test/Analysis/RegionInfo/Stats/two_loops_same_header.ll less more
None ; RUN: opt -regions -analyze < %s | FileCheck %s
1 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
2 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
3 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
4
5 define internal fastcc zeroext i8 @handle_compress() nounwind {
6 entry:
7 br label %outer
8
9 outer:
10 br label %body
11
12 body:
13 br i1 1, label %else, label %true77
14
15 true77:
16 br i1 1, label %then83, label %else
17
18 then83:
19 br label %outer
20
21 else:
22 br label %else106
23
24 else106:
25 br i1 1, label %end, label %outer
26
27 end:
28 ret i8 1
29 }
30
31 ; CHECK-NOT: =>
32 ; CHECK: [0] entry =>
33 ; CHECK-NEXT: [1] outer => end
34 ; CHECK-NEXT: [2] outer => else
35
36 ; STAT: 3 region - The # of regions
37 ; STAT: 1 region - The # of simple regions
38
39 ; BBIT: entry, outer, body, else, else106, end, true77, then83,
40 ; BBIT: outer, body, else, else106, true77, then83,
41 ; BBIT: outer, body, true77, then83,
42
43 ; RNIT: entry, outer => end, end,
44 ; RNIT: outer => else, else, else106,
45 ; RNIT: outer, body, true77, then83,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats -analyze < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @BZ2_blockSort() nounwind {
7 start:
8 br label %while
9
10 while:
11 br label %while.body134.i.i
12
13 while.body134.i.i:
14 br i1 1, label %end, label %w
15
16 w:
17 br label %if.end140.i.i
18
19 if.end140.i.i:
20 br i1 1, label %while.end186.i.i, label %if.end183.i.i
21
22 if.end183.i.i:
23 br label %while.body134.i.i
24
25 while.end186.i.i:
26 br label %while
27
28 end:
29 ret void
30 }
31 ; CHECK-NOT: =>
32 ; CHECK: [0] start =>
33 ; CHECK: [1] while => end
34
35 ; STAT: 2 region - The # of regions
36 ; STAT: 1 region - The # of simple regions
37
38 ; BBIT: start, while, while.body134.i.i, end, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
39 ; BBIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
40
41 ; RNIT: start, while => end, end,
42 ; RNIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 5:
8 br label %"0"
9
10 0:
11 br label %"1"
12 1:
13 br i1 1, label %"2", label %"3"
14 2:
15 ret void
16 3:
17 br i1 1, label %"1", label %"4"
18 4:
19 br label %"0"
20 }
21
22 ; CHECK-NOT: =>
23 ; CHECK: [0] 5 =>
24 ; CHECK: [1] 0 => 2
25
26 ; STAT: 2 region - The # of regions
27 ; STAT: 1 region - The # of simple regions
28
29 ; BBIT: 5, 0, 1, 2, 3, 4,
30 ; BBIT: 0, 1, 3, 4,
31
32 ; RNIT: 5, 0 => 2, 2,
33 ; RNIT: 0, 1, 3, 4,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc zeroext i8 @handle_compress() nounwind {
7 end165:
8 br i1 1, label %false239, label %true181
9
10 true181:
11 br i1 1, label %then187, label %else232
12
13 then187:
14 br label %end265
15
16 else232:
17 br i1 1, label %false239, label %then245
18
19 false239:
20 br i1 1, label %then245, label %else259
21
22 then245:
23 br i1 1, label %then251, label %end253
24
25 then251:
26 br label %end253
27
28 end253:
29 br label %end265
30
31 else259:
32 br label %end265
33
34 end265:
35 br i1 1, label %then291, label %end298
36
37 then291:
38 br label %end298
39
40 end298:
41 ret i8 1
42 }
43
44 ; CHECK-NOT: =>
45 ; CHECK: [0] end165 =>
46 ; CHECK-NEXT: [1] end165 => end265
47 ; CHECK-NEXT: [2] then245 => end253
48 ; CHECK-NEXT: [1] end265 => end298
49
50 ; STAT: 4 region - The # of regions
51
52 ; BBIT: end165, false239, then245, then251, end253, end265, then291, end298, else259, true181, then187, else232,
53 ; BBIT: end165, false239, then245, then251, end253, else259, true181, then187, else232,
54 ; BBIT: then245, then251,
55 ; BBIT: end265, then291,
56
57 ; RNIT: end165 => end265, end265 => end298, end298,
58 ; RNIT: end165, false239, then245 => end253, end253, else259, true181, then187, else232,
59 ; RNIT: then245, then251,
60 ; RNIT: end265, then291,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc void @compress() nounwind {
7 end33:
8 br i1 1, label %end124, label %lor.lhs.false95
9
10 lor.lhs.false95:
11 br i1 1, label %then107, label %end172
12
13 then107:
14 br i1 1, label %end124, label %then113
15
16 then113:
17 br label %end124
18
19 end124:
20 br label %exit
21
22 end172:
23 br label %exit
24
25
26 exit:
27 unreachable
28
29
30 }
31 ; CHECK-NOT: =>
32 ; CHECK: [0] end33 =>
33 ; CHECK-NEXT: [1] end33 => exit
34 ; CHECK-NEXT: [2] then107 => end124
35
36 ; STAT: 3 region - The # of regions
37
38 ; BBIT: end33, end124, exit, lor.lhs.false95, then107, then113, end172,
39 ; BBIT: end33, end124, lor.lhs.false95, then107, then113, end172,
40 ; BBIT: then107, then113,
41
42 ; RNIT: end33 => exit, exit,
43 ; RNIT: end33, end124, lor.lhs.false95, then107 => end124, end172,
44 ; RNIT: then107, then113,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"1"
9 1:
10 br i1 1, label %"2", label %"3"
11 2:
12 br label %"3"
13 3:
14 ret void
15 }
16 ; CHECK-NOT: =>
17 ; CHECK: [0] 0 =>
18 ; CHECK: [1] 1 => 3
19
20 ; STAT: 2 region - The # of regions
21
22 ; BBIT: 0, 1, 2, 3,
23 ; BBIT: 1, 2,
24
25 ; RNIT: 0, 1 => 3, 3,
26 ; RNIT: 1, 2,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br i1 1, label %"1", label %"4"
9
10 1:
11 br i1 1, label %"2", label %"3"
12 2:
13 br label %"4"
14 3:
15 br label %"4"
16 4:
17 ret void
18 }
19 ; CHECK-NOT: =>
20 ; CHECK: [0] 0 =>
21 ; CHECK-NEXT: [1] 0 => 4
22 ; CHECK-NEXT: [2] 1 => 4
23 ; STAT: 3 region - The # of regions
24
25 ; BBIT: 0, 1, 2, 4, 3,
26 ; BBIT: 0, 1, 2, 3,
27 ; BBIT: 1, 2, 3,
28
29 ; RNIT: 0 => 4, 4,
30 ; RNIT: 0, 1 => 4,
31 ; RNIT: 1, 2, 3,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"1"
9 1:
10 br i1 1, label %"2", label %"3"
11 2:
12 br label %"4"
13 3:
14 br label %"4"
15 4:
16 ret void
17 }
18
19 ; CHECK-NOT: =>
20 ; CHECK: [0] 0 =>
21 ; CHECK-NEXT: [1] 1 => 4
22 ; STAT: 2 region - The # of regions
23
24 ; BBIT: 0, 1, 2, 4, 3,
25 ; BBIT: 1, 2, 3,
26
27 ; RNIT: 0, 1 => 4, 4,
28 ; RNIT: 1, 2, 3,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc zeroext i8 @handle_compress() nounwind {
7 entry:
8 br label %outer
9
10 outer:
11 br label %body
12
13 body:
14 br i1 1, label %body.i, label %if.end
15
16 body.i:
17 br i1 1, label %end, label %if.end
18
19 if.end:
20 br label %if.then64
21
22 if.then64:
23 br label %outer
24
25 end:
26 ret i8 1
27 }
28 ; CHECK-NOT: =>
29 ; CHECK: [0] entry =>
30 ; CHECK-NEXT: [1] outer => end
31 ; STAT: 2 region - The # of regions
32 ; STAT: 1 region - The # of simple regions
33
34 ; BBIT: entry, outer, body, body.i, end, if.end, if.then64,
35 ; BBIT: outer, body, body.i, if.end, if.then64,
36
37 ; RNIT: entry, outer => end, end,
38 ; RNIT: outer, body, body.i, if.end, if.then64,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3
4 define void @normal_condition() nounwind {
5 0:
6 br label %"1"
7 1:
8 br i1 1, label %"2", label %"3"
9 2:
10 br label %"2"
11 3:
12 br label %"4"
13 4:
14 ret void
15 }
16 ; CHECK-NOT: =>
17 ; CHECK: [0] 0 =>
18 ; CHECK: [1] 1 => 4
19 ; STAT: 2 region - The # of regions
20 ; STAT: 1 region - The # of simple regions
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"1"
9 1:
10 br i1 1, label %"2", label %"3"
11 2:
12 br label %"5"
13 5:
14 br i1 1, label %"11", label %"12"
15 11:
16 br label %"6"
17 12:
18 br label %"6"
19 6:
20 br label %"2"
21 3:
22 br label %"4"
23 4:
24 ret void
25 }
26 ; CHECK-NOT: =>
27 ; CHECK: [0] 0 =>
28 ; CHECK: [1] 1 => 3
29 ; STAT: 2 region - The # of regions
30 ; STAT: 1 region - The # of simple regions
31
32 ; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4,
33 ; BBIT: 1, 2, 5, 11, 6, 12,
34
35 ; RNIT: 0, 1 => 3, 3, 4,
36 ; RNIT: 1, 2, 5, 11, 6, 12,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3
4 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
5 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
6
7 define void @normal_condition() nounwind {
8 0:
9 br label %"7"
10 7:
11 br i1 1, label %"1", label %"8"
12 1:
13 br i1 1, label %"2", label %"3"
14 2:
15 br label %"5"
16 5:
17 br i1 1, label %"11", label %"12"
18 11:
19 br label %"6"
20 12:
21 br label %"6"
22 6:
23 br label %"2"
24 8:
25 br label %"9"
26 9:
27 br i1 1, label %"13", label %"14"
28 13:
29 br label %"10"
30 14:
31 br label %"10"
32 10:
33 br label %"8"
34 3:
35 br label %"4"
36 4:
37 ret void
38 }
39 ; CHECK-NOT: =>
40 ; CHECK: [0] 0 =>
41 ; CHECK-NEXT: [1] 1 => 3
42 ; CHECK-NEXT: [1] 7 => 1
43 ; STAT: 3 region - The # of regions
44 ; STAT: 2 region - The # of simple regions
45
46 ; BBIT: 0, 7, 1, 2, 5, 11, 6, 12, 3, 4, 8, 9, 13, 10, 14,
47 ; BBIT: 7, 8, 9, 13, 10, 14,
48 ; BBIT: 1, 2, 5, 11, 6, 12,
49
50 ; RNIT: 0, 7 => 1, 1 => 3, 3, 4,
51 ; RNIT: 7, 8, 9, 13, 10, 14,
52 ; RNIT: 1, 2, 5, 11, 6, 12,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @normal_condition() nounwind {
7 0:
8 br label %"7"
9 7:
10 br i1 1, label %"1", label %"8"
11 1:
12 br i1 1, label %"2", label %"3"
13 2:
14 br label %"5"
15 5:
16 br i1 1, label %"11", label %"12"
17 11:
18 br label %"6"
19 12:
20 br label %"6"
21 6:
22 br i1 1, label %"2", label %"10"
23 8:
24 br label %"9"
25 9:
26 br i1 1, label %"13", label %"14"
27 13:
28 br label %"10"
29 14:
30 br label %"10"
31 10:
32 br label %"8"
33 3:
34 br label %"4"
35 4:
36 ret void
37 }
38 ; CHECK-NOT: =>
39 ; CHECK: [0] 0 =>
40 ; CHECK-NEXT: [1] 7 => 3
41 ; STAT: 2 region - The # of regions
42 ; STAT: 1 region - The # of simple regions
43
44 ; BBIT: 0, 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12, 3, 4,
45 ; BBIT: 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12,
46
47 ; RNIT: 0, 7 => 3, 3, 4,
48 ; RNIT: 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3
4 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
5 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
6
7 define void @normal_condition() nounwind {
8 0:
9 br label %"1"
10 1:
11 br i1 1, label %"6", label %"2"
12 2:
13 br i1 1, label %"3", label %"4"
14 3:
15 br label %"5"
16 4:
17 br label %"5"
18 5:
19 br label %"8"
20 8:
21 br i1 1, label %"7", label %"9"
22 9:
23 br label %"2"
24 7:
25 br label %"6"
26 6:
27 ret void
28 }
29
30 ; CHECK-NOT: =>
31 ; CHECK: [0] 0 =>
32 ; CHECK-NEXT: [1] 1 => 6
33 ; CHECK-NEXT: [2] 2 => 7
34 ; CHECK-NEXT: [3] 2 => 5
35 ; STAT: 4 region - The # of regions
36 ; STAT: 1 region - The # of simple regions
37
38 ; BBIT: 0, 1, 6, 2, 3, 5, 8, 7, 9, 4,
39 ; BBIT: 1, 2, 3, 5, 8, 7, 9, 4,
40 ; BBIT: 2, 3, 5, 8, 9, 4,
41 ; BBIT: 2, 3, 4,
42
43 ; RNIT: 0, 1 => 6, 6,
44 ; RNIT: 1, 2 => 7, 7,
45 ; RNIT: 2 => 5, 5, 8, 9,
46 ; RNIT: 2, 3, 4,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc zeroext i8 @loops_1() nounwind {
7 entry:
8 br i1 1, label %outer , label %a
9
10 a:
11 br label %body
12
13 outer:
14 br label %body
15
16 body:
17 br i1 1, label %land, label %if
18
19 land:
20 br i1 1, label %exit, label %end
21
22 exit:
23 br i1 1, label %if, label %end
24
25 if:
26 br label %outer
27
28 end:
29 ret i8 1
30 }
31 ; CHECK-NOT: =>
32 ; CHECK: [0] entry =>
33 ; CHECK-NEXT: [1] entry => end
34 ; STAT: 2 region - The # of regions
35
36 ; BBIT: entry, outer, body, land, exit, if, end, a,
37 ; BBIT: entry, outer, body, land, exit, if, a,
38
39 ; RNIT: entry => end, end,
40 ; RNIT: entry, outer, body, land, exit, if, a,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @meread_() nounwind {
7 entry:
8 br label %bb23
9
10 bb23:
11 br label %bb.i
12
13 bb.i: ; preds = %bb.i, %bb54
14 br label %pflini_.exit
15
16 pflini_.exit: ; preds = %bb.i
17 br label %bb58thread-split
18
19 bb58thread-split: ; preds = %bb64, %bb61, %pflini_.exit
20 br label %bb58
21
22 bb58: ; preds = %bb60, %bb58thread-split
23 br i1 1, label %bb59, label %bb23
24
25 bb59: ; preds = %bb58
26 switch i32 1, label %bb60 [
27 i32 1, label %l98
28 ]
29
30 bb60: ; preds = %bb59
31 br i1 1, label %bb61, label %bb58
32
33 bb61: ; preds = %bb60
34 br label %bb58thread-split
35
36 l98: ; preds = %bb69, %bb59
37 ret void
38 }
39 ; CHECK-NOT: =>
40 ; CHECK: [0] entry =>
41 ; CHECK: [1] bb23 => l98
42 ; STAT: 2 region - The # of regions
43 ; STAT: 1 region - The # of simple regions
44
45 ; BBIT: entry, bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61, l98,
46 ; BBIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61,
47
48 ; RNIT: entry, bb23 => l98, l98,
49 ; RNIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3
4 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
5 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
6
7 define void @a_linear_impl_fig_1() nounwind {
8 0:
9
10 br i1 1, label %"1", label %"15"
11 1:
12 switch i32 0, label %"2" [ i32 0, label %"3"
13 i32 1, label %"7"]
14 2:
15 br label %"4"
16 3:
17 br label %"5"
18 4:
19 br label %"6"
20 5:
21 br label %"6"
22 6:
23 br label %"7"
24 7:
25 br label %"15"
26 15:
27 br label %"8"
28 8:
29 br label %"16"
30 16:
31 br label %"9"
32 9:
33 br i1 1, label %"10", label %"11"
34 11:
35 br i1 1, label %"13", label %"12"
36 13:
37 br label %"14"
38 12:
39 br label %"14"
40 14:
41 br label %"8"
42 10:
43 br label %"17"
44 17:
45 br label %"18"
46 18:
47 ret void
48 }
49
50 ; CHECK-NOT: =>
51 ; CHECK: [0] 0 =>
52 ; CHECK-NEXT: [1] 0 => 15
53 ; CHECK-NEXT: [2] 1 => 7
54 ; CHECK-NEXT: [1] 8 => 10
55 ; CHECK-NEXT: [2] 11 => 14
56 ; STAT: 5 region - The # of regions
57 ; STAT: 1 region - The # of simple regions
58
59 ; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5,
60 ; BBIT: 0, 1, 2, 4, 6, 7, 3, 5,
61 ; BBIT: 1, 2, 4, 6, 3, 5,
62 ; BBIT: 8, 16, 9, 11, 13, 14, 12,
63 ; BBIT: 11, 13, 12,
64
65 ; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18,
66 ; RNIT: 0, 1 => 7, 7,
67 ; RNIT: 1, 2, 4, 6, 3, 5,
68 ; RNIT: 8, 16, 9, 11 => 14, 14,
69 ; RNIT: 11, 13, 12,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3
4 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
5 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
6
7 define internal fastcc zeroext i8 @handle_compress() nounwind {
8 entry:
9 br label %outer
10
11 outer:
12 br label %body
13
14 body:
15 br i1 1, label %exit172, label %end
16
17 exit172:
18 br i1 1, label %end, label %outer
19
20 end:
21 ret i8 1
22 }
23 ; CHECK-NOT: =>
24 ; CHECK: [0] entry =>
25 ; CHECK-NEXT: [1] outer => end
26
27 ; STAT: 2 region - The # of regions
28
29 ; BBIT: entry, outer, body, exit172, end,
30 ; BBIT: outer, body, exit172,
31
32 ; RNIT: entry, outer => end, end,
33 ; RNIT: outer, body, exit172,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @MAIN__() nounwind {
7 entry:
8 br label %__label_002001.outer
9
10 __label_002001.outer: ; preds = %bb236, %bb92
11 br label %__label_002001
12
13 __label_002001: ; preds = %bb229, %__label_002001.outer
14 br i1 1, label %bb93, label %__label_000020
15
16 bb93: ; preds = %__label_002001
17 br i1 1, label %__label_000020, label %bb197
18
19 bb197: ; preds = %bb193
20 br i1 1, label %bb229, label %bb224
21
22 bb224: ; preds = %bb223, %bb227
23 br i1 1, label %bb229, label %bb224
24
25 bb229: ; preds = %bb227, %bb223
26 br i1 1, label %__label_002001, label %__label_002001.outer
27
28 __label_000020: ; preds = %__label_002001, %bb194
29 ret void
30 }
31
32 ; CHECK-NOT: =>
33 ; CHECK: [0] entry =>
34 ; CHECK-NEXT: [1] __label_002001.outer => __label_000020
35 ; CHECK-NEXT: [2] bb197 => bb229
36 ; CHECK-NEXT: [3] bb224 => bb229
37
38 ; STAT: 4 region - The # of regions
39 ; STAT: 1 region - The # of simple regions
40
41 ; BBIT: entry, __label_002001.outer, __label_002001, bb93, __label_000020, bb197, bb229, bb224,
42 ; BBIT: __label_002001.outer, __label_002001, bb93, bb197, bb229, bb224,
43 ; BBIT: bb197, bb224,
44 ; BBIT: bb224,
45
46 ; RNIT: entry, __label_002001.outer => __label_000020, __label_000020,
47 ; RNIT: __label_002001.outer, __label_002001, bb93, bb197 => bb229, bb229,
48 ; RNIT: bb197, bb224 => bb229,
49 ; RNIT: bb224,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define void @a_linear_impl_fig_1() nounwind {
7 0:
8 br label %"1"
9 1:
10 br label %"2"
11 2:
12 br label %"3"
13 3:
14 br i1 1, label %"13", label %"4"
15 4:
16 br i1 1, label %"5", label %"1"
17 5:
18 br i1 1, label %"8", label %"6"
19 6:
20 br i1 1, label %"7", label %"4"
21 7:
22 ret void
23 8:
24 br i1 1, label %"9", label %"1"
25 9:
26 br label %"10"
27 10:
28 br i1 1, label %"12", label %"11"
29 11:
30 br i1 1, label %"9", label %"8"
31 13:
32 br i1 1, label %"2", label %"1"
33 12:
34 switch i32 0, label %"1" [ i32 0, label %"9"
35 i32 1, label %"8"]
36 }
37
38 ; CHECK-NOT: =>
39 ; CHECK: [0] 0 =>
40 ; CHECK-NEXT: [1] 1 => 7
41 ; CHECK-NEXT: [2] 1 => 4
42 ; CHECK-NEXT: [2] 8 => 1
43
44 ; STAT: 4 region - The # of regions
45 ; STAT: 1 region - The # of simple regions
46
47 ; BBIT: 0, 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6, 7,
48 ; BBIT: 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6,
49 ; BBIT: 1, 2, 3, 13,
50 ; BBIT: 8, 9, 10, 12, 11,
51
52 ; RNIT: 0, 1 => 7, 7,
53 ; RNIT: 1 => 4, 4, 5, 8 => 1, 6,
54 ; RNIT: 1, 2, 3, 13,
55 ; RNIT: 8, 9, 10, 12, 11,
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
3 ; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s
4 ; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s
5
6 define internal fastcc zeroext i8 @handle_compress() nounwind {
7 entry:
8 br label %outer
9
10 outer:
11 br label %body
12
13 body:
14 br i1 1, label %else, label %true77
15
16 true77:
17 br i1 1, label %then83, label %else
18
19 then83:
20 br label %outer
21
22 else:
23 br label %else106
24
25 else106:
26 br i1 1, label %end, label %outer
27
28 end:
29 ret i8 1
30 }
31
32 ; CHECK-NOT: =>
33 ; CHECK: [0] entry =>
34 ; CHECK-NEXT: [1] outer => end
35 ; CHECK-NEXT: [2] outer => else
36
37 ; STAT: 3 region - The # of regions
38 ; STAT: 1 region - The # of simple regions
39
40 ; BBIT: entry, outer, body, else, else106, end, true77, then83,
41 ; BBIT: outer, body, else, else106, true77, then83,
42 ; BBIT: outer, body, true77, then83,
43
44 ; RNIT: entry, outer => end, end,
45 ; RNIT: outer => else, else, else106,
46 ; RNIT: outer, body, true77, then83,
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic \
2 ; RUN: -mattr=+v6 | grep r9
3 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic \
4 ; RUN: -mattr=+v6 -arm-reserve-r9 -ifcvt-limit=0 -stats 2>&1 | grep asm-printer
5 ; | grep 35
6
7 define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) {
8 newFuncRoot:
9 br label %bb74
10
11 bb78.exitStub: ; preds = %bb74
12 store i32 %d2.1, i32* %d2.1.out
13 store i32 %d3.1, i32* %d3.1.out
14 store i32 %d0.1, i32* %d0.1.out
15 store i32 %d1.1, i32* %d1.1.out
16 ret void
17
18 bb74: ; preds = %bb26, %newFuncRoot
19 %fp.1.rec = phi i32 [ 0, %newFuncRoot ], [ %tmp71.rec, %bb26 ] ; [#uses=3]
20 %fm.1.in = phi i32* [ %tmp71, %bb26 ], [ %tmp1011, %newFuncRoot ] ; [#uses=1]
21 %d0.1 = phi i32 [ %tmp44, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
22 %d1.1 = phi i32 [ %tmp54, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
23 %d2.1 = phi i32 [ %tmp64, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
24 %d3.1 = phi i32 [ %tmp69, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
25 %fm.1 = load i32* %fm.1.in ; [#uses=4]
26 icmp eq i32 %fp.1.rec, %tmp8 ; :0 [#uses=1]
27 br i1 %0, label %bb78.exitStub, label %bb26
28
29 bb26: ; preds = %bb74
30 %tmp28 = getelementptr i32** %tmp1, i32 %fp.1.rec ; [#uses=1]
31 %tmp30 = load i32** %tmp28 ; [#uses=4]
32 %tmp33 = getelementptr i32* %tmp30, i32 %i.0196.0.ph ; [#uses=1]
33 %tmp34 = load i32* %tmp33 ; [#uses=1]
34 %tmp38 = getelementptr i32* %tmp30, i32 %tmp36224 ; [#uses=1]
35 %tmp39 = load i32* %tmp38 ; [#uses=1]
36 %tmp42 = mul i32 %tmp34, %fm.1 ; [#uses=1]
37 %tmp44 = add i32 %tmp42, %d0.1 ; [#uses=1]
38 %tmp48 = getelementptr i32* %tmp30, i32 %tmp46223 ; [#uses=1]
39 %tmp49 = load i32* %tmp48 ; [#uses=1]
40 %tmp52 = mul i32 %tmp39, %fm.1 ; [#uses=1]
41 %tmp54 = add i32 %tmp52, %d1.1 ; [#uses=1]
42 %tmp58 = getelementptr i32* %tmp30, i32 %tmp56222 ; [#uses=1]
43 %tmp59 = load i32* %tmp58 ; [#uses=1]
44 %tmp62 = mul i32 %tmp49, %fm.1 ; [#uses=1]
45 %tmp64 = add i32 %tmp62, %d2.1 ; [#uses=1]
46 %tmp67 = mul i32 %tmp59, %fm.1 ; [#uses=1]
47 %tmp69 = add i32 %tmp67, %d3.1 ; [#uses=1]
48 %tmp71.rec = add i32 %fp.1.rec, 1 ; [#uses=2]
49 %tmp71 = getelementptr i32* %tmp1011, i32 %tmp71.rec ; [#uses=1]
50 br label %bb74
51 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -o /dev/null -stats 2>&1 | FileCheck %s -check-prefix=STATS
2 ; Radar 10266272
3 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
4 target triple = "thumbv7-apple-ios4.0.0"
5 ; STATS-NOT: machine-sink
6
7 define i32 @foo(i32 %h) nounwind readonly ssp {
8 entry:
9 br label %for.cond
10
11 for.cond: ; preds = %for.body, %entry
12 %cmp = icmp slt i32 0, %h
13 br i1 %cmp, label %for.body, label %if.end299
14
15 for.body: ; preds = %for.cond
16 %v.5 = select i1 undef, i32 undef, i32 0
17 %0 = load i8* undef, align 1, !tbaa !0
18 %conv88 = zext i8 %0 to i32
19 %sub89 = sub nsw i32 0, %conv88
20 %v.8 = select i1 undef, i32 undef, i32 %sub89
21 %1 = load i8* null, align 1, !tbaa !0
22 %conv108 = zext i8 %1 to i32
23 %2 = load i8* undef, align 1, !tbaa !0
24 %conv110 = zext i8 %2 to i32
25 %sub111 = sub nsw i32 %conv108, %conv110
26 %cmp112 = icmp slt i32 %sub111, 0
27 %sub115 = sub nsw i32 0, %sub111
28 %v.10 = select i1 %cmp112, i32 %sub115, i32 %sub111
29 %add62 = add i32 0, %v.5
30 %add73 = add i32 %add62, 0
31 %add84 = add i32 %add73, 0
32 %add95 = add i32 %add84, %v.8
33 %add106 = add i32 %add95, 0
34 %add117 = add i32 %add106, %v.10
35 %add128 = add i32 %add117, 0
36 %add139 = add i32 %add128, 0
37 %add150 = add i32 %add139, 0
38 %add161 = add i32 %add150, 0
39 %add172 = add i32 %add161, 0
40 br i1 undef, label %for.cond, label %if.end299
41
42 if.end299: ; preds = %for.body, %for.cond
43 %s.10 = phi i32 [ %add172, %for.body ], [ 0, %for.cond ]
44 ret i32 %s.10
45 }
46
47 !0 = metadata !{metadata !"omnipotent char", metadata !1}
48 !1 = metadata !{metadata !"Simple C/C++ TBAA", null}
+0
-51
test/CodeGen/ARM/Stats/2007-03-13-InstrSched.ll less more
None ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic \
1 ; RUN: -mattr=+v6 | grep r9
2 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic \
3 ; RUN: -mattr=+v6 -arm-reserve-r9 -ifcvt-limit=0 -stats 2>&1 | grep asm-printer
4 ; | grep 35
5
6 define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) {
7 newFuncRoot:
8 br label %bb74
9
10 bb78.exitStub: ; preds = %bb74
11 store i32 %d2.1, i32* %d2.1.out
12 store i32 %d3.1, i32* %d3.1.out
13 store i32 %d0.1, i32* %d0.1.out
14 store i32 %d1.1, i32* %d1.1.out
15 ret void
16
17 bb74: ; preds = %bb26, %newFuncRoot
18 %fp.1.rec = phi i32 [ 0, %newFuncRoot ], [ %tmp71.rec, %bb26 ] ; [#uses=3]
19 %fm.1.in = phi i32* [ %tmp71, %bb26 ], [ %tmp1011, %newFuncRoot ] ; [#uses=1]
20 %d0.1 = phi i32 [ %tmp44, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
21 %d1.1 = phi i32 [ %tmp54, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
22 %d2.1 = phi i32 [ %tmp64, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
23 %d3.1 = phi i32 [ %tmp69, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
24 %fm.1 = load i32* %fm.1.in ; [#uses=4]
25 icmp eq i32 %fp.1.rec, %tmp8 ; :0 [#uses=1]
26 br i1 %0, label %bb78.exitStub, label %bb26
27
28 bb26: ; preds = %bb74
29 %tmp28 = getelementptr i32** %tmp1, i32 %fp.1.rec ; [#uses=1]
30 %tmp30 = load i32** %tmp28 ; [#uses=4]
31 %tmp33 = getelementptr i32* %tmp30, i32 %i.0196.0.ph ; [#uses=1]
32 %tmp34 = load i32* %tmp33 ; [#uses=1]
33 %tmp38 = getelementptr i32* %tmp30, i32 %tmp36224 ; [#uses=1]
34 %tmp39 = load i32* %tmp38 ; [#uses=1]
35 %tmp42 = mul i32 %tmp34, %fm.1 ; [#uses=1]
36 %tmp44 = add i32 %tmp42, %d0.1 ; [#uses=1]
37 %tmp48 = getelementptr i32* %tmp30, i32 %tmp46223 ; [#uses=1]
38 %tmp49 = load i32* %tmp48 ; [#uses=1]
39 %tmp52 = mul i32 %tmp39, %fm.1 ; [#uses=1]
40 %tmp54 = add i32 %tmp52, %d1.1 ; [#uses=1]
41 %tmp58 = getelementptr i32* %tmp30, i32 %tmp56222 ; [#uses=1]
42 %tmp59 = load i32* %tmp58 ; [#uses=1]
43 %tmp62 = mul i32 %tmp49, %fm.1 ; [#uses=1]
44 %tmp64 = add i32 %tmp62, %d2.1 ; [#uses=1]
45 %tmp67 = mul i32 %tmp59, %fm.1 ; [#uses=1]
46 %tmp69 = add i32 %tmp67, %d3.1 ; [#uses=1]
47 %tmp71.rec = add i32 %fp.1.rec, 1 ; [#uses=2]
48 %tmp71 = getelementptr i32* %tmp1011, i32 %tmp71.rec ; [#uses=1]
49 br label %bb74
50 }
+0
-48
test/CodeGen/ARM/Stats/2011-12-14-machine-sink.ll less more
None ; RUN: llc < %s -o /dev/null -stats 2>&1 | FileCheck %s -check-prefix=STATS
1 ; Radar 10266272
2 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
3 target triple = "thumbv7-apple-ios4.0.0"
4 ; STATS-NOT: machine-sink
5
6 define i32 @foo(i32 %h) nounwind readonly ssp {
7 entry:
8 br label %for.cond
9
10 for.cond: ; preds = %for.body, %entry
11 %cmp = icmp slt i32 0, %h
12 br i1 %cmp, label %for.body, label %if.end299
13
14 for.body: ; preds = %for.cond
15 %v.5 = select i1 undef, i32 undef, i32 0
16 %0 = load i8* undef, align 1, !tbaa !0
17 %conv88 = zext i8 %0 to i32
18 %sub89 = sub nsw i32 0, %conv88
19 %v.8 = select i1 undef, i32 undef, i32 %sub89
20 %1 = load i8* null, align 1, !tbaa !0
21 %conv108 = zext i8 %1 to i32
22 %2 = load i8* undef, align 1, !tbaa !0
23 %conv110 = zext i8 %2 to i32
24 %sub111 = sub nsw i32 %conv108, %conv110
25 %cmp112 = icmp slt i32 %sub111, 0
26 %sub115 = sub nsw i32 0, %sub111
27 %v.10 = select i1 %cmp112, i32 %sub115, i32 %sub111
28 %add62 = add i32 0, %v.5
29 %add73 = add i32 %add62, 0
30 %add84 = add i32 %add73, 0
31 %add95 = add i32 %add84, %v.8
32 %add106 = add i32 %add95, 0
33 %add117 = add i32 %add106, %v.10
34 %add128 = add i32 %add117, 0
35 %add139 = add i32 %add128, 0
36 %add150 = add i32 %add139, 0
37 %add161 = add i32 %add150, 0
38 %add172 = add i32 %add161, 0
39 br i1 undef, label %for.cond, label %if.end299
40
41 if.end299: ; preds = %for.body, %for.cond
42 %s.10 = phi i32 [ %add172, %for.body ], [ 0, %for.cond ]
43 ret i32 %s.10
44 }
45
46 !0 = metadata !{metadata !"omnipotent char", metadata !1}
47 !1 = metadata !{metadata !"Simple C/C++ TBAA", null}
+0
-15
test/CodeGen/ARM/Stats/addrmode.ll less more
None ; RUN: llc < %s -march=arm -stats 2>&1 | grep asm-printer | grep 4
1
2 define i32 @t1(i32 %a) {
3 %b = mul i32 %a, 9
4 %c = inttoptr i32 %b to i32*
5 %d = load i32* %c
6 ret i32 %d
7 }
8
9 define i32 @t2(i32 %a) {
10 %b = mul i32 %a, -7
11 %c = inttoptr i32 %b to i32*
12 %d = load i32* %c
13 ret i32 %d
14 }
+0
-8
test/CodeGen/ARM/Stats/lit.local.cfg less more
None config.suffixes = ['.ll', '.c', '.cpp']
1
2 targets = set(config.root.targets_to_build.split())
3 if not 'ARM' in targets:
4 config.unsupported = True
5
6 if not config.root.enable_assertions:
7 config.unsupported = True
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=arm -stats 2>&1 | grep asm-printer | grep 4
2
3 define i32 @t1(i32 %a) {
4 %b = mul i32 %a, 9
5 %c = inttoptr i32 %b to i32*
6 %d = load i32* %c
7 ret i32 %d
8 }
9
10 define i32 @t2(i32 %a) {
11 %b = mul i32 %a, -7
12 %c = inttoptr i32 %b to i32*
13 %d = load i32* %c
14 ret i32 %d
15 }
+0
-15
test/CodeGen/PowerPC/Stats/iabs.ll less more
None ; RUN: llc < %s -march=ppc32 -stats 2>&1 | \
1 ; RUN: grep "4 .*Number of machine instrs printed"
2
3 ;; Integer absolute value, should produce something as good as:
4 ;; srawi r2, r3, 31
5 ;; add r3, r3, r2
6 ;; xor r3, r3, r2
7 ;; blr
8 define i32 @test(i32 %a) {
9 %tmp1neg = sub i32 0, %a
10 %b = icmp sgt i32 %a, -1
11 %abs = select i1 %b, i32 %a, i32 %tmp1neg
12 ret i32 %abs
13 }
14
+0
-8
test/CodeGen/PowerPC/Stats/lit.local.cfg less more
None config.suffixes = ['.ll', '.c', '.cpp']
1
2 targets = set(config.root.targets_to_build.split())
3 if not 'PowerPC' in targets:
4 config.unsupported = True
5
6 if not config.root.enable_assertions:
7 config.unsupported = True
+0
-25
test/CodeGen/PowerPC/Stats/rlwimi3.ll less more
None ; RUN: llc < %s -march=ppc32 -stats 2>&1 | \
1 ; RUN: grep "Number of machine instrs printed" | grep 12
2
3 define i16 @Trans16Bit(i32 %srcA, i32 %srcB, i32 %alpha) {
4 %tmp1 = shl i32 %srcA, 15 ; [#uses=1]
5 %tmp2 = and i32 %tmp1, 32505856 ; [#uses=1]
6 %tmp4 = and i32 %srcA, 31775 ; [#uses=1]
7 %tmp5 = or i32 %tmp2, %tmp4 ; [#uses=1]
8 %tmp7 = shl i32 %srcB, 15 ; [#uses=1]
9 %tmp8 = and i32 %tmp7, 32505856 ; [#uses=1]
10 %tmp10 = and i32 %srcB, 31775 ; [#uses=1]
11 %tmp11 = or i32 %tmp8, %tmp10 ; [#uses=1]
12 %tmp14 = mul i32 %tmp5, %alpha ; [#uses=1]
13 %tmp16 = sub i32 32, %alpha ; [#uses=1]
14 %tmp18 = mul i32 %tmp11, %tmp16 ; [#uses=1]
15 %tmp19 = add i32 %tmp18, %tmp14 ; [#uses=2]
16 %tmp21 = lshr i32 %tmp19, 5 ; [#uses=1]
17 %tmp21.upgrd.1 = trunc i32 %tmp21 to i16 ; [#uses=1]
18 %tmp = and i16 %tmp21.upgrd.1, 31775 ; [#uses=1]
19 %tmp23 = lshr i32 %tmp19, 20 ; [#uses=1]
20 %tmp23.upgrd.2 = trunc i32 %tmp23 to i16 ; [#uses=1]
21 %tmp24 = and i16 %tmp23.upgrd.2, 992 ; [#uses=1]
22 %tmp25 = or i16 %tmp, %tmp24 ; [#uses=1]
23 ret i16 %tmp25
24 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=ppc32 -stats 2>&1 | \
2 ; RUN: grep "4 .*Number of machine instrs printed"
3
4 ;; Integer absolute value, should produce something as good as:
5 ;; srawi r2, r3, 31
6 ;; add r3, r3, r2
7 ;; xor r3, r3, r2
8 ;; blr
9 define i32 @test(i32 %a) {
10 %tmp1neg = sub i32 0, %a
11 %b = icmp sgt i32 %a, -1
12 %abs = select i1 %b, i32 %a, i32 %tmp1neg
13 ret i32 %abs
14 }
15
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=ppc32 -stats 2>&1 | \
2 ; RUN: grep "Number of machine instrs printed" | grep 12
3
4 define i16 @Trans16Bit(i32 %srcA, i32 %srcB, i32 %alpha) {
5 %tmp1 = shl i32 %srcA, 15 ; [#uses=1]
6 %tmp2 = and i32 %tmp1, 32505856 ; [#uses=1]
7 %tmp4 = and i32 %srcA, 31775 ; [#uses=1]
8 %tmp5 = or i32 %tmp2, %tmp4 ; [#uses=1]
9 %tmp7 = shl i32 %srcB, 15 ; [#uses=1]
10 %tmp8 = and i32 %tmp7, 32505856 ; [#uses=1]
11 %tmp10 = and i32 %srcB, 31775 ; [#uses=1]
12 %tmp11 = or i32 %tmp8, %tmp10 ; [#uses=1]
13 %tmp14 = mul i32 %tmp5, %alpha ; [#uses=1]
14 %tmp16 = sub i32 32, %alpha ; [#uses=1]
15 %tmp18 = mul i32 %tmp11, %tmp16 ; [#uses=1]
16 %tmp19 = add i32 %tmp18, %tmp14 ; [#uses=2]
17 %tmp21 = lshr i32 %tmp19, 5 ; [#uses=1]
18 %tmp21.upgrd.1 = trunc i32 %tmp21 to i16 ; [#uses=1]
19 %tmp = and i16 %tmp21.upgrd.1, 31775 ; [#uses=1]
20 %tmp23 = lshr i32 %tmp19, 20 ; [#uses=1]
21 %tmp23.upgrd.2 = trunc i32 %tmp23 to i16 ; [#uses=1]
22 %tmp24 = and i16 %tmp23.upgrd.2, 992 ; [#uses=1]
23 %tmp25 = or i16 %tmp, %tmp24 ; [#uses=1]
24 ret i16 %tmp25
25 }
0 ; REQUIRES: asserts
1 ; The old instruction selector used to load all arguments to a call up in
2 ; registers, then start pushing them all onto the stack. This is bad news as
3 ; it makes a ton of annoying overlapping live ranges. This code should not
4 ; cause spills!
5 ;
6 ; RUN: llc < %s -march=x86 -stats 2>&1 | not grep spilled
7
8 target datalayout = "e-p:32:32"
9
10 define i32 @test(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) {
11 ret i32 0
12 }
13
14 define i32 @main() {
15 %X = call i32 @test( i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 ) ; [#uses=1]
16 ret i32 %X
17 }
18
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -stats 2>&1 | \
2 ; RUN: grep asm-printer | grep 7
3
4 define i32 @g(i32 %a, i32 %b) nounwind {
5 %tmp.1 = shl i32 %b, 1 ; [#uses=1]
6 %tmp.3 = add i32 %tmp.1, %a ; [#uses=1]
7 %tmp.5 = mul i32 %tmp.3, %a ; [#uses=1]
8 %tmp.8 = mul i32 %b, %b ; [#uses=1]
9 %tmp.9 = add i32 %tmp.5, %tmp.8 ; [#uses=1]
10 ret i32 %tmp.9
11 }
12
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -mcpu=yonah -stats 2>&1 | \
2 ; RUN: not grep "Number of register spills"
3 ; END.
4
5
6 define i32 @foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) {
7 %tmp44 = load <4 x float>* %a ; <<4 x float>> [#uses=9]
8 %tmp46 = load <4 x float>* %b ; <<4 x float>> [#uses=1]
9 %tmp48 = load <4 x float>* %c ; <<4 x float>> [#uses=1]
10 %tmp50 = load <4 x float>* %d ; <<4 x float>> [#uses=1]
11 %tmp51 = bitcast <4 x float> %tmp44 to <4 x i32> ; <<4 x i32>> [#uses=1]
12 %tmp = shufflevector <4 x i32> %tmp51, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
13 %tmp52 = bitcast <4 x i32> %tmp to <4 x float> ; <<4 x float>> [#uses=1]
14 %tmp60 = xor <4 x i32> %tmp, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
15 %tmp61 = bitcast <4 x i32> %tmp60 to <4 x float> ; <<4 x float>> [#uses=1]
16 %tmp74 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp52, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
17 %tmp75 = bitcast <4 x float> %tmp74 to <4 x i32> ; <<4 x i32>> [#uses=1]
18 %tmp88 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp61, i8 1 ) ; <<4 x float>> [#uses=1]
19 %tmp89 = bitcast <4 x float> %tmp88 to <4 x i32> ; <<4 x i32>> [#uses=1]
20 %tmp98 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp75, <4 x i32> %tmp89 ) ; <<4 x i32>> [#uses=1]
21 %tmp102 = bitcast <8 x i16> %tmp98 to <8 x i16> ; <<8 x i16>> [#uses=1]
22 %tmp.upgrd.1 = shufflevector <8 x i16> %tmp102, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
23 %tmp105 = shufflevector <8 x i16> %tmp.upgrd.1, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
24 %tmp105.upgrd.2 = bitcast <8 x i16> %tmp105 to <4 x float> ; <<4 x float>> [#uses=1]
25 store <4 x float> %tmp105.upgrd.2, <4 x float>* %a
26 %tmp108 = bitcast <4 x float> %tmp46 to <4 x i32> ; <<4 x i32>> [#uses=1]
27 %tmp109 = shufflevector <4 x i32> %tmp108, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
28 %tmp109.upgrd.3 = bitcast <4 x i32> %tmp109 to <4 x float> ; <<4 x float>> [#uses=1]
29 %tmp119 = xor <4 x i32> %tmp109, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
30 %tmp120 = bitcast <4 x i32> %tmp119 to <4 x float> ; <<4 x float>> [#uses=1]
31 %tmp133 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp109.upgrd.3, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
32 %tmp134 = bitcast <4 x float> %tmp133 to <4 x i32> ; <<4 x i32>> [#uses=1]
33 %tmp147 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp120, i8 1 ) ; <<4 x float>> [#uses=1]
34 %tmp148 = bitcast <4 x float> %tmp147 to <4 x i32> ; <<4 x i32>> [#uses=1]
35 %tmp159 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp134, <4 x i32> %tmp148 ) ; <<4 x i32>> [#uses=1]
36 %tmp163 = bitcast <8 x i16> %tmp159 to <8 x i16> ; <<8 x i16>> [#uses=1]
37 %tmp164 = shufflevector <8 x i16> %tmp163, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
38 %tmp166 = shufflevector <8 x i16> %tmp164, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
39 %tmp166.upgrd.4 = bitcast <8 x i16> %tmp166 to <4 x float> ; <<4 x float>> [#uses=1]
40 store <4 x float> %tmp166.upgrd.4, <4 x float>* %b
41 %tmp169 = bitcast <4 x float> %tmp48 to <4 x i32> ; <<4 x i32>> [#uses=1]
42 %tmp170 = shufflevector <4 x i32> %tmp169, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
43 %tmp170.upgrd.5 = bitcast <4 x i32> %tmp170 to <4 x float> ; <<4 x float>> [#uses=1]
44 %tmp180 = xor <4 x i32> %tmp170, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
45 %tmp181 = bitcast <4 x i32> %tmp180 to <4 x float> ; <<4 x float>> [#uses=1]
46 %tmp194 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp170.upgrd.5, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
47 %tmp195 = bitcast <4 x float> %tmp194 to <4 x i32> ; <<4 x i32>> [#uses=1]
48 %tmp208 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp181, i8 1 ) ; <<4 x float>> [#uses=1]
49 %tmp209 = bitcast <4 x float> %tmp208 to <4 x i32> ; <<4 x i32>> [#uses=1]
50 %tmp220 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp195, <4 x i32> %tmp209 ) ; <<4 x i32>> [#uses=1]
51 %tmp224 = bitcast <8 x i16> %tmp220 to <8 x i16> ; <<8 x i16>> [#uses=1]
52 %tmp225 = shufflevector <8 x i16> %tmp224, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
53 %tmp227 = shufflevector <8 x i16> %tmp225, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
54 %tmp227.upgrd.6 = bitcast <8 x i16> %tmp227 to <4 x float> ; <<4 x float>> [#uses=1]
55 store <4 x float> %tmp227.upgrd.6, <4 x float>* %c
56 %tmp230 = bitcast <4 x float> %tmp50 to <4 x i32> ; <<4 x i32>> [#uses=1]
57 %tmp231 = shufflevector <4 x i32> %tmp230, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
58 %tmp231.upgrd.7 = bitcast <4 x i32> %tmp231 to <4 x float> ; <<4 x float>> [#uses=1]
59 %tmp241 = xor <4 x i32> %tmp231, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
60 %tmp242 = bitcast <4 x i32> %tmp241 to <4 x float> ; <<4 x float>> [#uses=1]
61 %tmp255 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp231.upgrd.7, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
62 %tmp256 = bitcast <4 x float> %tmp255 to <4 x i32> ; <<4 x i32>> [#uses=1]
63 %tmp269 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp242, i8 1 ) ; <<4 x float>> [#uses=1]
64 %tmp270 = bitcast <4 x float> %tmp269 to <4 x i32> ; <<4 x i32>> [#uses=1]
65 %tmp281 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp256, <4 x i32> %tmp270 ) ; <<4 x i32>> [#uses=1]
66 %tmp285 = bitcast <8 x i16> %tmp281 to <8 x i16> ; <<8 x i16>> [#uses=1]
67 %tmp286 = shufflevector <8 x i16> %tmp285, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
68 %tmp288 = shufflevector <8 x i16> %tmp286, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
69 %tmp288.upgrd.8 = bitcast <8 x i16> %tmp288 to <4 x float> ; <<4 x float>> [#uses=1]
70 store <4 x float> %tmp288.upgrd.8, <4 x float>* %d
71 ret i32 0
72 }
73
74 declare <4 x float> @llvm.x86.sse.cmp.ps(<4 x float>, <4 x float>, i8)
75
76 declare <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32>, <4 x i32>)
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -relocation-model=static -stats 2>&1 | \
2 ; RUN: grep asm-printer | grep 14
3 ;
4 @size20 = external global i32 ; [#uses=1]
5 @in5 = external global i8* ; [#uses=1]
6
7 define i32 @compare(i8* %a, i8* %b) nounwind {
8 %tmp = bitcast i8* %a to i32* ; [#uses=1]
9 %tmp1 = bitcast i8* %b to i32* ; [#uses=1]
10 %tmp.upgrd.1 = load i32* @size20 ; [#uses=1]
11 %tmp.upgrd.2 = load i8** @in5 ; [#uses=2]
12 %tmp3 = load i32* %tmp1 ; [#uses=1]
13 %gep.upgrd.3 = zext i32 %tmp3 to i64 ; [#uses=1]
14 %tmp4 = getelementptr i8* %tmp.upgrd.2, i64 %gep.upgrd.3 ; [#uses=2]
15 %tmp7 = load i32* %tmp ; [#uses=1]
16 %gep.upgrd.4 = zext i32 %tmp7 to i64 ; [#uses=1]
17 %tmp8 = getelementptr i8* %tmp.upgrd.2, i64 %gep.upgrd.4 ; [#uses=2]
18 %tmp.upgrd.5 = tail call i32 @memcmp( i8* %tmp8, i8* %tmp4, i32 %tmp.upgrd.1 ) ; [#uses=1]
19 ret i32 %tmp.upgrd.5
20 }
21
22 declare i32 @memcmp(i8*, i8*, i32)
23
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -stats 2>&1 | \
2 ; RUN: grep asm-printer | grep 13
3
4 define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) nounwind {
5 newFuncRoot:
6 br label %cond_true456.i
7 bb459.i.exitStub: ; preds = %cond_true456.i
8 store i32 %tmp449.i, i32* %tmp449.i.out
9 ret void
10 cond_true456.i: ; preds = %cond_true456.i, %newFuncRoot
11 %__s441.2.4.i = phi i8* [ %tmp451.i.upgrd.1, %cond_true456.i ], [ %tmp435.i, %newFuncRoot ] ; [#uses=2]
12 %__h.2.4.i = phi i32 [ %tmp449.i, %cond_true456.i ], [ 0, %newFuncRoot ] ; [#uses=1]
13 %tmp446.i = mul i32 %__h.2.4.i, 5 ; [#uses=1]
14 %tmp.i = load i8* %__s441.2.4.i ; [#uses=1]
15 %tmp448.i = sext i8 %tmp.i to i32 ; [#uses=1]
16 %tmp449.i = add i32 %tmp448.i, %tmp446.i ; [#uses=2]
17 %tmp450.i = ptrtoint i8* %__s441.2.4.i to i32 ; [#uses=1]
18 %tmp451.i = add i32 %tmp450.i, 1 ; [#uses=1]
19 %tmp451.i.upgrd.1 = inttoptr i32 %tmp451.i to i8* ; [#uses=2]
20 %tmp45435.i = load i8* %tmp451.i.upgrd.1 ; [#uses=1]
21 %tmp45536.i = icmp eq i8 %tmp45435.i, 0 ; [#uses=1]
22 br i1 %tmp45536.i, label %bb459.i.exitStub, label %cond_true456.i
23 }
24
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -mcpu=penryn -mattr=+sse2 -stats -realign-stack=0 2>&1 | \
2 ; RUN: grep "asm-printer" | grep 35
3
4 target datalayout = "e-p:32:32"
5 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) nounwind {
6 entry:
7 %tmp9 = icmp slt i32 %M, 5 ; [#uses=1]
8 br i1 %tmp9, label %return, label %cond_true
9
10 cond_true: ; preds = %cond_true, %entry
11 %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %cond_true ] ; [#uses=2]
12 %tmp. = shl i32 %indvar, 2 ; [#uses=1]
13 %tmp.10 = add nsw i32 %tmp., 1 ; [#uses=2]
14 %tmp31 = add nsw i32 %tmp.10, -1 ; [#uses=4]
15 %tmp32 = getelementptr i32* %mpp, i32 %tmp31 ; [#uses=1]
16 %tmp34 = bitcast i32* %tmp32 to <16 x i8>* ; [#uses=1]
17 %tmp = load <16 x i8>* %tmp34, align 1
18 %tmp42 = getelementptr i32* %tpmm, i32 %tmp31 ; [#uses=1]
19 %tmp42.upgrd.1 = bitcast i32* %tmp42 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
20 %tmp46 = load <4 x i32>* %tmp42.upgrd.1 ; <<4 x i32>> [#uses=1]
21 %tmp54 = bitcast <16 x i8> %tmp to <4 x i32> ; <<4 x i32>> [#uses=1]
22 %tmp55 = add <4 x i32> %tmp54, %tmp46 ; <<4 x i32>> [#uses=2]
23 %tmp55.upgrd.2 = bitcast <4 x i32> %tmp55 to <2 x i64> ; <<2 x i64>> [#uses=1]
24 %tmp62 = getelementptr i32* %ip, i32 %tmp31 ; [#uses=1]
25 %tmp65 = bitcast i32* %tmp62 to <16 x i8>* ; [#uses=1]
26 %tmp66 = load <16 x i8>* %tmp65, align 1
27 %tmp73 = getelementptr i32* %tpim, i32 %tmp31 ; [#uses=1]
28 %tmp73.upgrd.3 = bitcast i32* %tmp73 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
29 %tmp77 = load <4 x i32>* %tmp73.upgrd.3 ; <<4 x i32>> [#uses=1]
30 %tmp87 = bitcast <16 x i8> %tmp66 to <4 x i32> ; <<4 x i32>> [#uses=1]
31 %tmp88 = add <4 x i32> %tmp87, %tmp77 ; <<4 x i32>> [#uses=2]
32 %tmp88.upgrd.4 = bitcast <4 x i32> %tmp88 to <2 x i64> ; <<2 x i64>> [#uses=1]
33 %tmp99 = tail call <4 x i32> @llvm.x86.sse2.psra.d( <4 x i32> %tmp88, <4 x i32> %tmp55 ) ; <<4 x i32>> [#uses=1]
34 %tmp99.upgrd.5 = bitcast <4 x i32> %tmp99 to <2 x i64> ; <<2 x i64>> [#uses=2]
35 %tmp110 = xor <2 x i64> %tmp99.upgrd.5, < i64 -1, i64 -1 > ; <<2 x i64>> [#uses=1]
36 %tmp111 = and <2 x i64> %tmp110, %tmp55.upgrd.2 ; <<2 x i64>> [#uses=1]
37 %tmp121 = and <2 x i64> %tmp99.upgrd.5, %tmp88.upgrd.4 ; <<2 x i64>> [#uses=1]
38 %tmp131 = or <2 x i64> %tmp121, %tmp111 ; <<2 x i64>> [#uses=1]
39 %tmp137 = getelementptr i32* %mc, i32 %tmp.10 ; [#uses=1]
40 %tmp137.upgrd.7 = bitcast i32* %tmp137 to <2 x i64>* ; <<2 x i64>*> [#uses=1]
41 store <2 x i64> %tmp131, <2 x i64>* %tmp137.upgrd.7
42 %tmp147 = add nsw i32 %tmp.10, 8 ; [#uses=1]
43 %tmp.upgrd.8 = icmp ne i32 %tmp147, %M ; [#uses=1]
44 %indvar.next = add i32 %indvar, 1 ; [#uses=1]
45 br i1 %tmp.upgrd.8, label %cond_true, label %return
46
47 return: ; preds = %cond_true, %entry
48 ret void
49 }
50
51 declare <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32>, <4 x i32>)
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -mcpu=yonah -stats 2>&1 | grep "Number of block tails merged" | grep 16
2 ; PR1909
3
4 @.str = internal constant [48 x i8] c"transformed bounds: (%.2f, %.2f), (%.2f, %.2f)\0A\00" ; <[48 x i8]*> [#uses=1]
5
6 define void @minmax(float* %result) nounwind optsize {
7 entry:
8 %tmp2 = load float* %result, align 4 ; [#uses=6]
9 %tmp4 = getelementptr float* %result, i32 2 ; [#uses=5]
10 %tmp5 = load float* %tmp4, align 4 ; [#uses=10]
11 %tmp7 = getelementptr float* %result, i32 4 ; [#uses=5]
12 %tmp8 = load float* %tmp7, align 4 ; [#uses=8]
13 %tmp10 = getelementptr float* %result, i32 6 ; [#uses=3]
14 %tmp11 = load float* %tmp10, align 4 ; [#uses=8]
15 %tmp12 = fcmp olt float %tmp8, %tmp11 ; [#uses=5]
16 br i1 %tmp12, label %bb, label %bb21
17
18 bb: ; preds = %entry
19 %tmp23469 = fcmp olt float %tmp5, %tmp8 ; [#uses=1]
20 br i1 %tmp23469, label %bb26, label %bb30
21
22 bb21: ; preds = %entry
23 %tmp23 = fcmp olt float %tmp5, %tmp11 ; [#uses=1]
24 br i1 %tmp23, label %bb26, label %bb30
25
26 bb26: ; preds = %bb21, %bb
27 %tmp52471 = fcmp olt float %tmp2, %tmp5 ; [#uses=1]
28 br i1 %tmp52471, label %bb111, label %bb59
29
30 bb30: ; preds = %bb21, %bb
31 br i1 %tmp12, label %bb40, label %bb50
32
33 bb40: ; preds = %bb30
34 %tmp52473 = fcmp olt float %tmp2, %tmp8 ; [#uses=1]
35 br i1 %tmp52473, label %bb111, label %bb59
36
37 bb50: ; preds = %bb30
38 %tmp52 = fcmp olt float %tmp2, %tmp11 ; [#uses=1]
39 br i1 %tmp52, label %bb111, label %bb59
40
41 bb59: ; preds = %bb50, %bb40, %bb26
42 br i1 %tmp12, label %bb72, label %bb80
43
44 bb72: ; preds = %bb59
45 %tmp82475 = fcmp olt float %tmp5, %tmp8 ; [#uses=2]
46 %brmerge786 = or i1 %tmp82475, %tmp12 ; [#uses=1]
47 %tmp4.mux787 = select i1 %tmp82475, float* %tmp4, float* %tmp7 ; [#uses=1]
48 br i1 %brmerge786, label %bb111, label %bb103
49
50 bb80: ; preds = %bb59
51 %tmp82 = fcmp olt float %tmp5, %tmp11 ; [#uses=2]
52 %brmerge = or i1 %tmp82, %tmp12 ; [#uses=1]
53 %tmp4.mux = select i1 %tmp82, float* %tmp4, float* %tmp7 ; [#uses=1]
54 br i1 %brmerge, label %bb111, label %bb103
55
56 bb103: ; preds = %bb80, %bb72
57 br label %bb111
58
59 bb111: ; preds = %bb103, %bb80, %bb72, %bb50, %bb40, %bb26
60 %iftmp.0.0.in = phi float* [ %tmp10, %bb103 ], [ %result, %bb26 ], [ %result, %bb40 ], [ %result, %bb50 ], [ %tmp4.mux, %bb80 ], [ %tmp4.mux787, %bb72 ] ; [#uses=1]
61 %iftmp.0.0 = load float* %iftmp.0.0.in ; [#uses=1]
62 %tmp125 = fcmp ogt float %tmp8, %tmp11 ; [#uses=5]
63 br i1 %tmp125, label %bb128, label %bb136
64
65 bb128: ; preds = %bb111
66 %tmp138477 = fcmp ogt float %tmp5, %tmp8 ; [#uses=1]
67 br i1 %tmp138477, label %bb141, label %bb145
68
69 bb136: ; preds = %bb111
70 %tmp138 = fcmp ogt float %tmp5, %tmp11 ; [#uses=1]
71 br i1 %tmp138, label %bb141, label %bb145
72
73 bb141: ; preds = %bb136, %bb128
74 %tmp167479 = fcmp ogt float %tmp2, %tmp5 ; [#uses=1]
75 br i1 %tmp167479, label %bb226, label %bb174
76
77 bb145: ; preds = %bb136, %bb128
78 br i1 %tmp125, label %bb155, label %bb165
79
80 bb155: ; preds = %bb145
81 %tmp167481 = fcmp ogt float %tmp2, %tmp8 ; [#uses=1]
82 br i1 %tmp167481, label %bb226, label %bb174
83
84 bb165: ; preds = %bb145
85 %tmp167 = fcmp ogt float %tmp2, %tmp11 ; [#uses=1]
86 br i1 %tmp167, label %bb226, label %bb174
87
88 bb174: ; preds = %bb165, %bb155, %bb141
89 br i1 %tmp125, label %bb187, label %bb195
90
91 bb187: ; preds = %bb174
92 %tmp197483 = fcmp ogt float %tmp5, %tmp8 ; [#uses=2]
93 %brmerge790 = or i1 %tmp197483, %tmp125 ; [#uses=1]
94 %tmp4.mux791 = select i1 %tmp197483, float* %tmp4, float* %tmp7 ; [#uses=1]
95 br i1 %brmerge790, label %bb226, label %bb218
96
97 bb195: ; preds = %bb174
98 %tmp197 = fcmp ogt float %tmp5, %tmp11 ; [#uses=2]
99 %brmerge788 = or i1 %tmp197, %tmp125 ; [#uses=1]
100 %tmp4.mux789 = select i1 %tmp197, float* %tmp4, float* %tmp7 ; [#uses=1]
101 br i1 %brmerge788, label %bb226, label %bb218
102
103 bb218: ; preds = %bb195, %bb187
104 br label %bb226
105
106 bb226: ; preds = %bb218, %bb195, %bb187, %bb165, %bb155, %bb141
107 %iftmp.7.0.in = phi float* [ %tmp10, %bb218 ], [ %result, %bb141 ], [ %result, %bb155 ], [ %result, %bb165 ], [ %tmp4.mux789, %bb195 ], [ %tmp4.mux791, %bb187 ] ; [#uses=1]
108 %iftmp.7.0 = load float* %iftmp.7.0.in ; [#uses=1]
109 %tmp229 = getelementptr float* %result, i32 1 ; [#uses=7]
110 %tmp230 = load float* %tmp229, align 4 ; [#uses=6]
111 %tmp232 = getelementptr float* %result, i32 3 ; [#uses=5]
112 %tmp233 = load float* %tmp232, align 4 ; [#uses=10]
113 %tmp235 = getelementptr float* %result, i32 5 ; [#uses=5]
114 %tmp236 = load float* %tmp235, align 4 ; [#uses=8]
115 %tmp238 = getelementptr float* %result, i32 7 ; [#uses=3]
116 %tmp239 = load float* %tmp238, align 4 ; [#uses=8]
117 %tmp240 = fcmp olt float %tmp236, %tmp239 ; [#uses=5]
118 br i1 %tmp240, label %bb243, label %bb251
119
120 bb243: ; preds = %bb226
121 %tmp253485 = fcmp olt float %tmp233, %tmp236 ; [#uses=1]
122 br i1 %tmp253485, label %bb256, label %bb260
123
124 bb251: ; preds = %bb226
125 %tmp253 = fcmp olt float %tmp233, %tmp239 ; [#uses=1]
126 br i1 %tmp253, label %bb256, label %bb260
127
128 bb256: ; preds = %bb251, %bb243
129 %tmp282487 = fcmp olt float %tmp230, %tmp233 ; [#uses=1]
130 br i1 %tmp282487, label %bb341, label %bb289
131
132 bb260: ; preds = %bb251, %bb243
133 br i1 %tmp240, label %bb270, label %bb280
134
135 bb270: ; preds = %bb260
136 %tmp282489 = fcmp olt float %tmp230, %tmp236 ; [#uses=1]
137 br i1 %tmp282489, label %bb341, label %bb289
138
139 bb280: ; preds = %bb260
140 %tmp282 = fcmp olt float %tmp230, %tmp239 ; [#uses=1]
141 br i1 %tmp282, label %bb341, label %bb289
142
143 bb289: ; preds = %bb280, %bb270, %bb256
144 br i1 %tmp240, label %bb302, label %bb310
145
146 bb302: ; preds = %bb289
147 %tmp312491 = fcmp olt float %tmp233, %tmp236 ; [#uses=2]
148 %brmerge793 = or i1 %tmp312491, %tmp240 ; [#uses=1]
149 %tmp232.mux794 = select i1 %tmp312491, float* %tmp232, float* %tmp235 ; [#uses=1]
150 br i1 %brmerge793, label %bb341, label %bb333
151
152 bb310: ; preds = %bb289
153 %tmp312 = fcmp olt float %tmp233, %tmp239 ; [#uses=2]
154 %brmerge792 = or i1 %tmp312, %tmp240 ; [#uses=1]
155 %tmp232.mux = select i1 %tmp312, float* %tmp232, float* %tmp235 ; [#uses=1]
156 br i1 %brmerge792, label %bb341, label %bb333
157
158 bb333: ; preds = %bb310, %bb302
159 br label %bb341
160
161 bb341: ; preds = %bb333, %bb310, %bb302, %bb280, %bb270, %bb256
162 %iftmp.14.0.in = phi float* [ %tmp238, %bb333 ], [ %tmp229, %bb280 ], [ %tmp229, %bb270 ], [ %tmp229, %bb256 ], [ %tmp232.mux, %bb310 ], [ %tmp232.mux794, %bb302 ] ; [#uses=1]
163 %iftmp.14.0 = load float* %iftmp.14.0.in ; [#uses=1]
164 %tmp355 = fcmp ogt float %tmp236, %tmp239 ; [#uses=5]
165 br i1 %tmp355, label %bb358, label %bb366
166
167 bb358: ; preds = %bb341
168 %tmp368493 = fcmp ogt float %tmp233, %tmp236 ; [#uses=1]
169 br i1 %tmp368493, label %bb371, label %bb375
170
171 bb366: ; preds = %bb341
172 %tmp368 = fcmp ogt float %tmp233, %tmp239 ; [#uses=1]
173 br i1 %tmp368, label %bb371, label %bb375
174
175 bb371: ; preds = %bb366, %bb358
176 %tmp397495 = fcmp ogt float %tmp230, %tmp233 ; [#uses=1]
177 br i1 %tmp397495, label %bb456, label %bb404
178
179 bb375: ; preds = %bb366, %bb358
180 br i1 %tmp355, label %bb385, label %bb395
181
182 bb385: ; preds = %bb375
183 %tmp397497 = fcmp ogt float %tmp230, %tmp236 ; [#uses=1]
184 br i1 %tmp397497, label %bb456, label %bb404
185
186 bb395: ; preds = %bb375
187 %tmp397 = fcmp ogt float %tmp230, %tmp239 ; [#uses=1]
188 br i1 %tmp397, label %bb456, label %bb404
189
190 bb404: ; preds = %bb395, %bb385, %bb371
191 br i1 %tmp355, label %bb417, label %bb425
192
193 bb417: ; preds = %bb404
194 %tmp427499 = fcmp ogt float %tmp233, %tmp236 ; [#uses=2]
195 %brmerge797 = or i1 %tmp427499, %tmp355 ; [#uses=1]
196 %tmp232.mux798 = select i1 %tmp427499, float* %tmp232, float* %tmp235 ; [#uses=1]
197 br i1 %brmerge797, label %bb456, label %bb448
198
199 bb425: ; preds = %bb404
200 %tmp427 = fcmp ogt float %tmp233, %tmp239 ; [#uses=2]
201 %brmerge795 = or i1 %tmp427, %tmp355 ; [#uses=1]
202 %tmp232.mux796 = select i1 %tmp427, float* %tmp232, float* %tmp235 ; [#uses=1]
203 br i1 %brmerge795, label %bb456, label %bb448
204
205 bb448: ; preds = %bb425, %bb417
206 br label %bb456
207
208 bb456: ; preds = %bb448, %bb425, %bb417, %bb395, %bb385, %bb371
209 %iftmp.21.0.in = phi float* [ %tmp238, %bb448 ], [ %tmp229, %bb395 ], [ %tmp229, %bb385 ], [ %tmp229, %bb371 ], [ %tmp232.mux796, %bb425 ], [ %tmp232.mux798, %bb417 ] ; [#uses=1]
210 %iftmp.21.0 = load float* %iftmp.21.0.in ; [#uses=1]
211 %tmp458459 = fpext float %iftmp.21.0 to double ; [#uses=1]
212 %tmp460461 = fpext float %iftmp.7.0 to double ; [#uses=1]
213 %tmp462463 = fpext float %iftmp.14.0 to double ; [#uses=1]
214 %tmp464465 = fpext float %iftmp.0.0 to double ; [#uses=1]
215 %tmp467 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([48 x i8]* @.str, i32 0, i32 0), double %tmp464465, double %tmp462463, double %tmp460461, double %tmp458459 ) nounwind ; [#uses=0]
216 ret void
217 }
218
219 declare i32 @printf(i8*, ...) nounwind
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -stats 2>&1 | FileCheck %s
2 ; Now this test spills one register. But a reload in the loop is cheaper than
3 ; the divsd so it's a win.
4
5 define fastcc void @fourn(double* %data, i32 %isign) nounwind {
6 ; CHECK: fourn
7 entry:
8 br label %bb
9
10 bb: ; preds = %bb, %entry
11 %indvar93 = phi i32 [ 0, %entry ], [ %idim.030, %bb ] ; [#uses=2]
12 %idim.030 = add i32 %indvar93, 1 ; [#uses=1]
13 %0 = add i32 %indvar93, 2 ; [#uses=1]
14 %1 = icmp sgt i32 %0, 2 ; [#uses=1]
15 br i1 %1, label %bb30.loopexit, label %bb
16
17 ; CHECK: %bb30.loopexit
18 ; CHECK: divsd %xmm0
19 ; CHECK: movsd %xmm0, 16(%esp)
20 ; CHECK: %bb3
21 bb3: ; preds = %bb30.loopexit, %bb25, %bb3
22 %2 = load i32* null, align 4 ; [#uses=1]
23 %3 = mul i32 %2, 0 ; [#uses=1]
24 %4 = icmp slt i32 0, %3 ; [#uses=1]
25 br i1 %4, label %bb18, label %bb3
26
27 bb18: ; preds = %bb3
28 %5 = fdiv double %11, 0.000000e+00 ; [#uses=1]
29 %6 = tail call double @sin(double %5) nounwind readonly ; [#uses=1]
30 br label %bb24.preheader
31
32 bb22.preheader: ; preds = %bb24.preheader, %bb22.preheader
33 br label %bb22.preheader
34
35 bb25: ; preds = %bb24.preheader
36 %7 = fmul double 0.000000e+00, %6 ; [#uses=0]
37 %8 = add i32 %i3.122100, 0 ; [#uses=1]
38 %9 = icmp sgt i32 %8, 0 ; [#uses=1]
39 br i1 %9, label %bb3, label %bb24.preheader
40
41 bb24.preheader: ; preds = %bb25, %bb18
42 %i3.122100 = or i32 0, 1 ; [#uses=2]
43 %10 = icmp slt i32 0, %i3.122100 ; [#uses=1]
44 br i1 %10, label %bb25, label %bb22.preheader
45
46 bb30.loopexit: ; preds = %bb
47 %11 = fmul double 0.000000e+00, 0x401921FB54442D1C ; [#uses=1]
48 br label %bb3
49 }
50
51 declare double @sin(double) nounwind readonly
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -stats 2>&1 | not grep commuted
2 ; rdar://6608609
3
4 define <2 x double> @t(<2 x double> %A, <2 x double> %B, <2 x double> %C) nounwind readnone {
5 entry:
6 %tmp.i2 = bitcast <2 x double> %B to <2 x i64> ; <<2 x i64>> [#uses=1]
7 %tmp2.i = or <2 x i64> %tmp.i2, ; <<2 x i64>> [#uses=1]
8 %tmp3.i = bitcast <2 x i64> %tmp2.i to <2 x double> ; <<2 x double>> [#uses=1]
9 %0 = tail call <2 x double> @llvm.x86.sse2.add.sd(<2 x double> %A, <2 x double> %tmp3.i) nounwind readnone ; <<2 x double>> [#uses=1]
10 %tmp.i = fadd <2 x double> %0, %C ; <<2 x double>> [#uses=1]
11 ret <2 x double> %tmp.i
12 }
13
14 declare <2 x double> @llvm.x86.sse2.add.sd(<2 x double>, <2 x double>) nounwind readnone
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -mcpu=penryn -stats 2>&1 | grep "5 machine-licm"
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -mcpu=penryn | FileCheck %s
3 ; rdar://6627786
4 ; rdar://7792037
5
6 target triple = "x86_64-apple-darwin10.0"
7 %struct.Key = type { i64 }
8 %struct.__Rec = type opaque
9 %struct.__vv = type { }
10
11 define %struct.__vv* @t(%struct.Key* %desc, i64 %p) nounwind ssp {
12 entry:
13 br label %bb4
14
15 bb4: ; preds = %bb.i, %bb26, %bb4, %entry
16 ; CHECK: %bb4
17 ; CHECK: xorb
18 ; CHECK: callq
19 ; CHECK: movq
20 ; CHECK: xorl
21 ; CHECK: xorb
22
23 %0 = call i32 (...)* @xxGetOffsetForCode(i32 undef) nounwind ; [#uses=0]
24 %ins = or i64 %p, 2097152 ; [#uses=1]
25 %1 = call i32 (...)* @xxCalculateMidType(%struct.Key* %desc, i32 0) nounwind ; [#uses=1]
26 %cond = icmp eq i32 %1, 1 ; [#uses=1]
27 br i1 %cond, label %bb26, label %bb4
28
29 bb26: ; preds = %bb4
30 %2 = and i64 %ins, 15728640 ; [#uses=1]
31 %cond.i = icmp eq i64 %2, 1048576 ; [#uses=1]
32 br i1 %cond.i, label %bb.i, label %bb4
33
34 bb.i: ; preds = %bb26
35 %3 = load i32* null, align 4 ; [#uses=1]
36 %4 = uitofp i32 %3 to float ; [#uses=1]
37 %.sum13.i = add i64 0, 4 ; [#uses=1]
38 %5 = getelementptr i8* null, i64 %.sum13.i ; [#uses=1]
39 %6 = bitcast i8* %5 to i32* ; [#uses=1]
40 %7 = load i32* %6, align 4 ; [#uses=1]
41 %8 = uitofp i32 %7 to float ; [#uses=1]
42 %.sum.i = add i64 0, 8 ; [#uses=1]
43 %9 = getelementptr i8* null, i64 %.sum.i ; [#uses=1]
44 %10 = bitcast i8* %9 to i32* ; [#uses=1]
45 %11 = load i32* %10, align 4 ; [#uses=1]
46 %12 = uitofp i32 %11 to float ; [#uses=1]
47 %13 = insertelement <4 x float> undef, float %4, i32 0 ; <<4 x float>> [#uses=1]
48 %14 = insertelement <4 x float> %13, float %8, i32 1 ; <<4 x float>> [#uses=1]
49 %15 = insertelement <4 x float> %14, float %12, i32 2 ; <<4 x float>> [#uses=1]
50 store <4 x float> %15, <4 x float>* null, align 16
51 br label %bb4
52 }
53
54 declare i32 @xxGetOffsetForCode(...)
55
56 declare i32 @xxCalculateMidType(...)
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=x86_64-linux -relocation-model=static -o /dev/null -stats -info-output-file - > %t
2 ; RUN: not grep spill %t
3 ; RUN: not grep "%rsp" %t
4 ; RUN: not grep "%rbp" %t
5
6 ; The register-pressure scheduler should be able to schedule this in a
7 ; way that does not require spills.
8
9 @X = external global i64 ; [#uses=25]
10
11 define fastcc i64 @foo() nounwind {
12 %tmp = load volatile i64* @X ; [#uses=7]
13 %tmp1 = load volatile i64* @X ; [#uses=5]
14 %tmp2 = load volatile i64* @X ; [#uses=3]
15 %tmp3 = load volatile i64* @X ; [#uses=1]
16 %tmp4 = load volatile i64* @X ; [#uses=5]
17 %tmp5 = load volatile i64* @X ; [#uses=3]
18 %tmp6 = load volatile i64* @X ; [#uses=2]
19 %tmp7 = load volatile i64* @X ; [#uses=1]
20 %tmp8 = load volatile i64* @X ; [#uses=1]
21 %tmp9 = load volatile i64* @X ; [#uses=1]
22 %tmp10 = load volatile i64* @X ; [#uses=1]
23 %tmp11 = load volatile i64* @X ; [#uses=1]
24 %tmp12 = load volatile i64* @X ; [#uses=1]
25 %tmp13 = load volatile i64* @X ; [#uses=1]
26 %tmp14 = load volatile i64* @X ; [#uses=1]
27 %tmp15 = load volatile i64* @X ; [#uses=1]
28 %tmp16 = load volatile i64* @X ; [#uses=1]
29 %tmp17 = load volatile i64* @X ; [#uses=1]
30 %tmp18 = load volatile i64* @X ; [#uses=1]
31 %tmp19 = load volatile i64* @X ; [#uses=1]
32 %tmp20 = load volatile i64* @X ; [#uses=1]
33 %tmp21 = load volatile i64* @X ; [#uses=1]
34 %tmp22 = load volatile i64* @X ; [#uses=1]
35 %tmp23 = load volatile i64* @X ; [#uses=1]
36 %tmp24 = call i64 @llvm.bswap.i64(i64 %tmp8) ; [#uses=1]
37 %tmp25 = add i64 %tmp6, %tmp5 ; [#uses=1]
38 %tmp26 = add i64 %tmp25, %tmp4 ; [#uses=1]
39 %tmp27 = add i64 %tmp7, %tmp4 ; [#uses=1]
40 %tmp28 = add i64 %tmp27, %tmp26 ; [#uses=1]
41 %tmp29 = add i64 %tmp28, %tmp24 ; [#uses=2]
42 %tmp30 = add i64 %tmp2, %tmp1 ; [#uses=1]
43 %tmp31 = add i64 %tmp30, %tmp ; [#uses=1]
44 %tmp32 = add i64 %tmp2, %tmp1 ; [#uses=1]
45 %tmp33 = add i64 %tmp31, %tmp32 ; [#uses=1]
46 %tmp34 = add i64 %tmp29, %tmp3 ; [#uses=5]
47 %tmp35 = add i64 %tmp33, %tmp ; [#uses=1]
48 %tmp36 = add i64 %tmp35, %tmp29 ; [#uses=7]
49 %tmp37 = call i64 @llvm.bswap.i64(i64 %tmp9) ; [#uses=1]
50 %tmp38 = add i64 %tmp4, %tmp5 ; [#uses=1]
51 %tmp39 = add i64 %tmp38, %tmp34 ; [#uses=1]
52 %tmp40 = add i64 %tmp6, %tmp37 ; [#uses=1]
53 %tmp41 = add i64 %tmp40, %tmp39 ; [#uses=1]
54 %tmp42 = add i64 %tmp41, %tmp34 ; [#uses=2]
55 %tmp43 = add i64 %tmp1, %tmp ; [#uses=1]
56 %tmp44 = add i64 %tmp36, %tmp43 ; [#uses=1]
57 %tmp45 = add i64 %tmp1, %tmp ; [#uses=1]
58 %tmp46 = add i64 %tmp44, %tmp45 ; [#uses=1]
59 %tmp47 = add i64 %tmp42, %tmp2 ; [#uses=5]
60 %tmp48 = add i64 %tmp36, %tmp46 ; [#uses=1]
61 %tmp49 = add i64 %tmp48, %tmp42 ; [#uses=7]
62 %tmp50 = call i64 @llvm.bswap.i64(i64 %tmp10) ; [#uses=1]
63 %tmp51 = add i64 %tmp34, %tmp4 ; [#uses=1]
64 %tmp52 = add i64 %tmp51, %tmp47 ; [#uses=1]
65 %tmp53 = add i64 %tmp5, %tmp50 ; [#uses=1]
66 %tmp54 = add i64 %tmp53, %tmp52 ; [#uses=1]
67 %tmp55 = add i64 %tmp54, %tmp47 ; [#uses=2]
68 %tmp56 = add i64 %tmp36, %tmp ; [#uses=1]
69 %tmp57 = add i64 %tmp49, %tmp56 ; [#uses=1]
70 %tmp58 = add i64 %tmp36, %tmp ; [#uses=1]
71 %tmp59 = add i64 %tmp57, %tmp58 ; [#uses=1]
72 %tmp60 = add i64 %tmp55, %tmp1 ; [#uses=5]
73 %tmp61 = add i64 %tmp49, %tmp59 ; [#uses=1]
74 %tmp62 = add i64 %tmp61, %tmp55 ; [#uses=7]
75 %tmp63 = call i64 @llvm.bswap.i64(i64 %tmp11) ; [#uses=1]
76 %tmp64 = add i64 %tmp47, %tmp34 ; [#uses=1]
77 %tmp65 = add i64 %tmp64, %tmp60 ; [#uses=1]
78 %tmp66 = add i64 %tmp4, %tmp63 ; [#uses=1]
79 %tmp67 = add i64 %tmp66, %tmp65 ; [#uses=1]
80 %tmp68 = add i64 %tmp67, %tmp60 ; [#uses=2]
81 %tmp69 = add i64 %tmp49, %tmp36 ; [#uses=1]
82 %tmp70 = add i64 %tmp62, %tmp69 ; [#uses=1]
83 %tmp71 = add i64 %tmp49, %tmp36 ; [#uses=1]
84 %tmp72 = add i64 %tmp70, %tmp71 ; [#uses=1]
85 %tmp73 = add i64 %tmp68, %tmp ; [#uses=5]
86 %tmp74 = add i64 %tmp62, %tmp72 ; [#uses=1]
87 %tmp75 = add i64 %tmp74, %tmp68 ; [#uses=7]
88 %tmp76 = call i64 @llvm.bswap.i64(i64 %tmp12) ; [#uses=1]
89 %tmp77 = add i64 %tmp60, %tmp47 ; [#uses=1]
90 %tmp78 = add i64 %tmp77, %tmp73 ; [#uses=1]
91 %tmp79 = add i64 %tmp34, %tmp76 ; [#uses=1]
92 %tmp80 = add i64 %tmp79, %tmp78 ; [#uses=1]
93 %tmp81 = add i64 %tmp80, %tmp73 ; [#uses=2]
94 %tmp82 = add i64 %tmp62, %tmp49 ; [#uses=1]
95 %tmp83 = add i64 %tmp75, %tmp82 ; [#uses=1]
96 %tmp84 = add i64 %tmp62, %tmp49 ; [#uses=1]
97 %tmp85 = add i64 %tmp83, %tmp84 ; [#uses=1]
98 %tmp86 = add i64 %tmp81, %tmp36 ; [#uses=5]
99 %tmp87 = add i64 %tmp75, %tmp85 ; [#uses=1]
100 %tmp88 = add i64 %tmp87, %tmp81 ; [#uses=7]
101 %tmp89 = call i64 @llvm.bswap.i64(i64 %tmp13) ; [#uses=1]
102 %tmp90 = add i64 %tmp73, %tmp60 ; [#uses=1]
103 %tmp91 = add i64 %tmp90, %tmp86 ; [#uses=1]
104 %tmp92 = add i64 %tmp47, %tmp89 ; [#uses=1]
105 %tmp93 = add i64 %tmp92, %tmp91 ; [#uses=1]
106 %tmp94 = add i64 %tmp93, %tmp86 ; [#uses=2]
107 %tmp95 = add i64 %tmp75, %tmp62 ; [#uses=1]
108 %tmp96 = add i64 %tmp88, %tmp95 ; [#uses=1]
109 %tmp97 = add i64 %tmp75, %tmp62 ; [#uses=1]
110 %tmp98 = add i64 %tmp96, %tmp97 ; [#uses=1]
111 %tmp99 = add i64 %tmp94, %tmp49 ; [#uses=5]
112 %tmp100 = add i64 %tmp88, %tmp98 ; [#uses=1]
113 %tmp101 = add i64 %tmp100, %tmp94 ; [#uses=7]
114 %tmp102 = call i64 @llvm.bswap.i64(i64 %tmp14) ; [#uses=1]
115 %tmp103 = add i64 %tmp86, %tmp73 ; [#uses=1]
116 %tmp104 = add i64 %tmp103, %tmp99 ; [#uses=1]
117 %tmp105 = add i64 %tmp102, %tmp60 ; [#uses=1]
118 %tmp106 = add i64 %tmp105, %tmp104 ; [#uses=1]
119 %tmp107 = add i64 %tmp106, %tmp99 ; [#uses=2]
120 %tmp108 = add i64 %tmp88, %tmp75 ; [#uses=1]
121 %tmp109 = add i64 %tmp101, %tmp108 ; [#uses=1]
122 %tmp110 = add i64 %tmp88, %tmp75 ; [#uses=1]
123 %tmp111 = add i64 %tmp109, %tmp110 ; [#uses=1]
124 %tmp112 = add i64 %tmp107, %tmp62 ; [#uses=5]
125 %tmp113 = add i64 %tmp101, %tmp111 ; [#uses=1]
126 %tmp114 = add i64 %tmp113, %tmp107 ; [#uses=7]
127 %tmp115 = call i64 @llvm.bswap.i64(i64 %tmp15) ; [#uses=1]
128 %tmp116 = add i64 %tmp99, %tmp86 ; [#uses=1]
129 %tmp117 = add i64 %tmp116, %tmp112 ; [#uses=1]
130 %tmp118 = add i64 %tmp115, %tmp73 ; [#uses=1]
131 %tmp119 = add i64 %tmp118, %tmp117 ; [#uses=1]
132 %tmp120 = add i64 %tmp119, %tmp112 ; [#uses=2]
133 %tmp121 = add i64 %tmp101, %tmp88 ; [#uses=1]
134 %tmp122 = add i64 %tmp114, %tmp121 ; [#uses=1]
135 %tmp123 = add i64 %tmp101, %tmp88 ; [#uses=1]
136 %tmp124 = add i64 %tmp122, %tmp123 ; [#uses=1]
137 %tmp125 = add i64 %tmp120, %tmp75 ; [#uses=5]
138 %tmp126 = add i64 %tmp114, %tmp124 ; [#uses=1]
139 %tmp127 = add i64 %tmp126, %tmp120 ; [#uses=7]
140 %tmp128 = call i64 @llvm.bswap.i64(i64 %tmp16) ; [#uses=1]
141 %tmp129 = add i64 %tmp112, %tmp99 ; [#uses=1]
142 %tmp130 = add i64 %tmp129, %tmp125 ; [#uses=1]
143 %tmp131 = add i64 %tmp128, %tmp86 ; [#uses=1]
144 %tmp132 = add i64 %tmp131, %tmp130 ; [#uses=1]
145 %tmp133 = add i64 %tmp132, %tmp125 ; [#uses=2]
146 %tmp134 = add i64 %tmp114, %tmp101 ; [#uses=1]
147 %tmp135 = add i64 %tmp127, %tmp134 ; [#uses=1]
148 %tmp136 = add i64 %tmp114, %tmp101 ; [#uses=1]
149 %tmp137 = add i64 %tmp135, %tmp136 ; [#uses=1]
150 %tmp138 = add i64 %tmp133, %tmp88 ; [#uses=5]
151 %tmp139 = add i64 %tmp127, %tmp137 ; [#uses=1]
152 %tmp140 = add i64 %tmp139, %tmp133 ; [#uses=7]
153 %tmp141 = call i64 @llvm.bswap.i64(i64 %tmp17) ; [#uses=1]
154 %tmp142 = add i64 %tmp125, %tmp112 ; [#uses=1]
155 %tmp143 = add i64 %tmp142, %tmp138 ; [#uses=1]
156 %tmp144 = add i64 %tmp141, %tmp99 ; [#uses=1]
157 %tmp145 = add i64 %tmp144, %tmp143 ; [#uses=1]
158 %tmp146 = add i64 %tmp145, %tmp138 ; [#uses=2]
159 %tmp147 = add i64 %tmp127, %tmp114 ; [#uses=1]
160 %tmp148 = add i64 %tmp140, %tmp147 ; [#uses=1]
161 %tmp149 = add i64 %tmp127, %tmp114 ; [#uses=1]
162 %tmp150 = add i64 %tmp148, %tmp149 ; [#uses=1]
163 %tmp151 = add i64 %tmp146, %tmp101 ; [#uses=5]
164 %tmp152 = add i64 %tmp140, %tmp150 ; [#uses=1]
165 %tmp153 = add i64 %tmp152, %tmp146 ; [#uses=7]
166 %tmp154 = call i64 @llvm.bswap.i64(i64 %tmp18) ; [#uses=1]
167 %tmp155 = add i64 %tmp138, %tmp125 ; [#uses=1]
168 %tmp156 = add i64 %tmp155, %tmp151 ; [#uses=1]
169 %tmp157 = add i64 %tmp154, %tmp112 ; [#uses=1]
170 %tmp158 = add i64 %tmp157, %tmp156 ; [#uses=1]
171 %tmp159 = add i64 %tmp158, %tmp151 ; [#uses=2]
172 %tmp160 = add i64 %tmp140, %tmp127 ; [#uses=1]
173 %tmp161 = add i64 %tmp153, %tmp160 ; [#uses=1]
174 %tmp162 = add i64 %tmp140, %tmp127 ; [#uses=1]
175 %tmp163 = add i64 %tmp161, %tmp162 ; [#uses=1]
176 %tmp164 = add i64 %tmp159, %tmp114 ; [#uses=5]
177 %tmp165 = add i64 %tmp153, %tmp163 ; [#uses=1]
178 %tmp166 = add i64 %tmp165, %tmp159 ; [#uses=7]
179 %tmp167 = call i64 @llvm.bswap.i64(i64 %tmp19) ; [#uses=1]
180 %tmp168 = add i64 %tmp151, %tmp138 ; [#uses=1]
181 %tmp169 = add i64 %tmp168, %tmp164 ; [#uses=1]
182 %tmp170 = add i64 %tmp167, %tmp125 ; [#uses=1]
183 %tmp171 = add i64 %tmp170, %tmp169 ; [#uses=1]
184 %tmp172 = add i64 %tmp171, %tmp164 ; [#uses=2]
185 %tmp173 = add i64 %tmp153, %tmp140 ; [#uses=1]
186 %tmp174 = add i64 %tmp166, %tmp173 ; [#uses=1]
187 %tmp175 = add i64 %tmp153, %tmp140 ; [#uses=1]
188 %tmp176 = add i64 %tmp174, %tmp175 ; [#uses=1]
189 %tmp177 = add i64 %tmp172, %tmp127 ; [#uses=5]
190 %tmp178 = add i64 %tmp166, %tmp176 ; [#uses=1]
191 %tmp179 = add i64 %tmp178, %tmp172 ; [#uses=6]
192 %tmp180 = call i64 @llvm.bswap.i64(i64 %tmp20) ; [#uses=1]
193 %tmp181 = add i64 %tmp164, %tmp151 ; [#uses=1]
194 %tmp182 = add i64 %tmp181, %tmp177 ; [#uses=1]
195 %tmp183 = add i64 %tmp180, %tmp138 ; [#uses=1]
196 %tmp184 = add i64 %tmp183, %tmp182 ; [#uses=1]
197 %tmp185 = add i64 %tmp184, %tmp177 ; [#uses=2]
198 %tmp186 = add i64 %tmp166, %tmp153 ; [#uses=1]
199 %tmp187 = add i64 %tmp179, %tmp186 ; [#uses=1]
200 %tmp188 = add i64 %tmp166, %tmp153 ; [#uses=1]
201 %tmp189 = add i64 %tmp187, %tmp188 ; [#uses=1]
202 %tmp190 = add i64 %tmp185, %tmp140 ; [#uses=4]
203 %tmp191 = add i64 %tmp179, %tmp189 ; [#uses=1]
204 %tmp192 = add i64 %tmp191, %tmp185 ; [#uses=4]
205 %tmp193 = call i64 @llvm.bswap.i64(i64 %tmp21) ; [#uses=1]
206 %tmp194 = add i64 %tmp177, %tmp164 ; [#uses=1]
207 %tmp195 = add i64 %tmp194, %tmp190 ; [#uses=1]
208 %tmp196 = add i64 %tmp193, %tmp151 ; [#uses=1]
209 %tmp197 = add i64 %tmp196, %tmp195 ; [#uses=1]
210 %tmp198 = add i64 %tmp197, %tmp190 ; [#uses=2]
211 %tmp199 = add i64 %tmp179, %tmp166 ; [#uses=1]
212 %tmp200 = add i64 %tmp192, %tmp199 ; [#uses=1]
213 %tmp201 = add i64 %tmp179, %tmp166 ; [#uses=1]
214 %tmp202 = add i64 %tmp200, %tmp201 ; [#uses=1]
215 %tmp203 = add i64 %tmp198, %tmp153 ; [#uses=3]
216 %tmp204 = add i64 %tmp192, %tmp202 ; [#uses=1]
217 %tmp205 = add i64 %tmp204, %tmp198 ; [#uses=2]
218 %tmp206 = call i64 @llvm.bswap.i64(i64 %tmp22) ; [#uses=1]
219 %tmp207 = add i64 %tmp190, %tmp177 ; [#uses=1]
220 %tmp208 = add i64 %tmp207, %tmp203 ; [#uses=1]
221 %tmp209 = add i64 %tmp206, %tmp164 ; [#uses=1]
222 %tmp210 = add i64 %tmp209, %tmp208 ; [#uses=1]
223 %tmp211 = add i64 %tmp210, %tmp203 ; [#uses=2]
224 %tmp212 = add i64 %tmp192, %tmp179 ; [#uses=1]
225 %tmp213 = add i64 %tmp205, %tmp212 ; [#uses=1]
226 %tmp214 = add i64 %tmp192, %tmp179 ; [#uses=1]
227 %tmp215 = add i64 %tmp213, %tmp214 ; [#uses=1]
228 %tmp216 = add i64 %tmp211, %tmp166 ; [#uses=2]
229 %tmp217 = add i64 %tmp205, %tmp215 ; [#uses=1]
230 %tmp218 = add i64 %tmp217, %tmp211 ; [#uses=1]
231 %tmp219 = call i64 @llvm.bswap.i64(i64 %tmp23) ; [#uses=2]
232 store volatile i64 %tmp219, i64* @X, align 8
233 %tmp220 = add i64 %tmp203, %tmp190 ; [#uses=1]
234 %tmp221 = add i64 %tmp220, %tmp216 ; [#uses=1]
235 %tmp222 = add i64 %tmp219, %tmp177 ; [#uses=1]
236 %tmp223 = add i64 %tmp222, %tmp221 ; [#uses=1]
237 %tmp224 = add i64 %tmp223, %tmp216 ; [#uses=1]
238 %tmp225 = add i64 %tmp224, %tmp218 ; [#uses=1]
239 ret i64 %tmp225
240 }
241
242 declare i64 @llvm.bswap.i64(i64) nounwind readnone
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats 2>&1 | grep "Number of modref unfolded"
2 ; XFAIL: *
3 ; 69408 removed the opportunity for this optimization to work
4
5 %struct.SHA512_CTX = type { [8 x i64], i64, i64, %struct.anon, i32, i32 }
6 %struct.anon = type { [16 x i64] }
7 @K512 = external constant [80 x i64], align 32 ; <[80 x i64]*> [#uses=2]
8
9 define fastcc void @sha512_block_data_order(%struct.SHA512_CTX* nocapture %ctx, i8* nocapture %in, i64 %num) nounwind ssp {
10 entry:
11 br label %bb349
12
13 bb349: ; preds = %bb349, %entry
14 %e.0489 = phi i64 [ 0, %entry ], [ %e.0, %bb349 ] ; [#uses=3]
15 %b.0472 = phi i64 [ 0, %entry ], [ %87, %bb349 ] ; [#uses=2]
16 %asmtmp356 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 41, i64 %e.0489) nounwind ; [#uses=1]
17 %0 = xor i64 0, %asmtmp356 ; [#uses=1]
18 %1 = add i64 0, %0 ; [#uses=1]
19 %2 = add i64 %1, 0 ; [#uses=1]
20 %3 = add i64 %2, 0 ; [#uses=1]
21 %4 = add i64 %3, 0 ; [#uses=5]
22 %asmtmp372 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 34, i64 %4) nounwind ; [#uses=1]
23 %asmtmp373 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 39, i64 %4) nounwind ; [#uses=0]
24 %5 = xor i64 %asmtmp372, 0 ; [#uses=0]
25 %6 = xor i64 0, %b.0472 ; [#uses=1]
26 %7 = and i64 %4, %6 ; [#uses=1]
27 %8 = xor i64 %7, 0 ; [#uses=1]
28 %9 = add i64 0, %8 ; [#uses=1]
29 %10 = add i64 %9, 0 ; [#uses=2]
30 %asmtmp377 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 61, i64 0) nounwind ; [#uses=1]
31 %11 = xor i64 0, %asmtmp377 ; [#uses=1]
32 %12 = add i64 0, %11 ; [#uses=1]
33 %13 = add i64 %12, 0 ; [#uses=1]
34 %not381 = xor i64 0, -1 ; [#uses=1]
35 %14 = and i64 %e.0489, %not381 ; [#uses=1]
36 %15 = xor i64 0, %14 ; [#uses=1]
37 %16 = add i64 %15, 0 ; [#uses=1]
38 %17 = add i64 %16, %13 ; [#uses=1]
39 %18 = add i64 %17, 0 ; [#uses=1]
40 %19 = add i64 %18, 0 ; [#uses=2]
41 %20 = add i64 %19, %b.0472 ; [#uses=3]
42 %21 = add i64 %19, 0 ; [#uses=1]
43 %22 = add i64 %21, 0 ; [#uses=1]
44 %23 = add i32 0, 12 ; [#uses=1]
45 %24 = and i32 %23, 12 ; [#uses=1]
46 %25 = zext i32 %24 to i64 ; [#uses=1]
47 %26 = getelementptr [16 x i64]* null, i64 0, i64 %25 ; [#uses=0]
48 %27 = add i64 0, %e.0489 ; [#uses=1]
49 %28 = add i64 %27, 0 ; [#uses=1]
50 %29 = add i64 %28, 0 ; [#uses=1]
51 %30 = add i64 %29, 0 ; [#uses=2]
52 %31 = and i64 %10, %4 ; [#uses=1]
53 %32 = xor i64 0, %31 ; [#uses=1]
54 %33 = add i64 %30, 0 ; [#uses=3]
55 %34 = add i64 %30, %32 ; [#uses=1]
56 %35 = add i64 %34, 0 ; [#uses=1]
57 %36 = and i64 %33, %20 ; [#uses=1]
58 %37 = xor i64 %36, 0 ; [#uses=1]
59 %38 = add i64 %37, 0 ; [#uses=1]
60 %39 = add i64 %38, 0 ; [#uses=1]
61 %40 = add i64 %39, 0 ; [#uses=1]
62 %41 = add i64 %40, 0 ; [#uses=1]
63 %42 = add i64 %41, %4 ; [#uses=3]
64 %43 = or i32 0, 6 ; [#uses=1]
65 %44 = and i32 %43, 14 ; [#uses=1]
66 %45 = zext i32 %44 to i64 ; [#uses=1]
67 %46 = getelementptr [16 x i64]* null, i64 0, i64 %45 ; [#uses=1]
68 %not417 = xor i64 %42, -1 ; [#uses=1]
69 %47 = and i64 %20, %not417 ; [#uses=1]
70 %48 = xor i64 0, %47 ; [#uses=1]
71 %49 = getelementptr [80 x i64]* @K512, i64 0, i64 0 ; [#uses=1]
72 %50 = load i64* %49, align 8 ; [#uses=1]
73 %51 = add i64 %48, 0 ; [#uses=1]
74 %52 = add i64 %51, 0 ; [#uses=1]
75 %53 = add i64 %52, 0 ; [#uses=1]
76 %54 = add i64 %53, %50 ; [#uses=2]
77 %asmtmp420 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 34, i64 0) nounwind ; [#uses=1]
78 %asmtmp421 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 39, i64 0) nounwind ; [#uses=1]
79 %55 = xor i64 %asmtmp420, 0 ; [#uses=1]
80 %56 = xor i64 %55, %asmtmp421 ; [#uses=1]
81 %57 = add i64 %54, %10 ; [#uses=5]
82 %58 = add i64 %54, 0 ; [#uses=1]
83 %59 = add i64 %58, %56 ; [#uses=2]
84 %60 = or i32 0, 7 ; [#uses=1]
85 %61 = and i32 %60, 15 ; [#uses=1]
86 %62 = zext i32 %61 to i64 ; [#uses=1]
87 %63 = getelementptr [16 x i64]* null, i64 0, i64 %62 ; [#uses=2]
88 %64 = load i64* null, align 8 ; [#uses=1]
89 %65 = lshr i64 %64, 6 ; [#uses=1]
90 %66 = xor i64 0, %65 ; [#uses=1]
91 %67 = xor i64 %66, 0 ; [#uses=1]
92 %68 = load i64* %46, align 8 ; [#uses=1]
93 %69 = load i64* null, align 8 ; [#uses=1]
94 %70 = add i64 %68, 0 ; [#uses=1]
95 %71 = add i64 %70, %67 ; [#uses=1]
96 %72 = add i64 %71, %69 ; [#uses=1]
97 %asmtmp427 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 18, i64 %57) nounwind ; [#uses=1]
98 %asmtmp428 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 41, i64 %57) nounwind ; [#uses=1]
99 %73 = xor i64 %asmtmp427, 0 ; [#uses=1]
100 %74 = xor i64 %73, %asmtmp428 ; [#uses=1]
101 %75 = and i64 %57, %42 ; [#uses=1]
102 %not429 = xor i64 %57, -1 ; [#uses=1]
103 %76 = and i64 %33, %not429 ; [#uses=1]
104 %77 = xor i64 %75, %76 ; [#uses=1]
105 %78 = getelementptr [80 x i64]* @K512, i64 0, i64 0 ; [#uses=1]
106 %79 = load i64* %78, align 16 ; [#uses=1]
107 %80 = add i64 %77, %20 ; [#uses=1]
108 %81 = add i64 %80, %72 ; [#uses=1]
109 %82 = add i64 %81, %74 ; [#uses=1]
110 %83 = add i64 %82, %79 ; [#uses=1]
111 %asmtmp432 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 34, i64 %59) nounwind ; [#uses=1]
112 %asmtmp433 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 39, i64 %59) nounwind ; [#uses=1]
113 %84 = xor i64 %asmtmp432, 0 ; [#uses=1]
114 %85 = xor i64 %84, %asmtmp433 ; [#uses=1]
115 %86 = add i64 %83, %22 ; [#uses=2]
116 %87 = add i64 0, %85 ; [#uses=1]
117 %asmtmp435 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 8, i64 0) nounwind ; [#uses=1]
118 %88 = xor i64 0, %asmtmp435 ; [#uses=1]
119 %89 = load i64* null, align 8 ; [#uses=3]
120 %asmtmp436 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 19, i64 %89) nounwind ; [#uses=1]
121 %asmtmp437 = call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 61, i64 %89) nounwind ; [#uses=1]
122 %90 = lshr i64 %89, 6 ; [#uses=1]
123 %91 = xor i64 %asmtmp436, %90 ; [#uses=1]
124 %92 = xor i64 %91, %asmtmp437 ; [#uses=1]
125 %93 = load i64* %63, align 8 ; [#uses=1]
126 %94 = load i64* null, align 8 ; [#uses=1]
127 %95 = add i64 %93, %88 ; [#uses=1]
128 %96 = add i64 %95, %92 ; [#uses=1]
129 %97 = add i64 %96, %94 ; [#uses=2]
130 store i64 %97, i64* %63, align 8
131 %98 = and i64 %86, %57 ; [#uses=1]
132 %not441 = xor i64 %86, -1 ; [#uses=1]
133 %99 = and i64 %42, %not441 ; [#uses=1]
134 %100 = xor i64 %98, %99 ; [#uses=1]
135 %101 = add i64 %100, %33 ; [#uses=1]
136 %102 = add i64 %101, %97 ; [#uses=1]
137 %103 = add i64 %102, 0 ; [#uses=1]
138 %104 = add i64 %103, 0 ; [#uses=1]
139 %e.0 = add i64 %104, %35 ; [#uses=1]
140 br label %bb349
141 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin11 -relocation-model=pic -disable-fp-elim -stats 2>&1 | not grep ext-opt
2
3 define fastcc i8* @S_scan_str(i8* %start, i32 %keep_quoted, i32 %keep_delims) nounwind ssp {
4 entry:
5 switch i8 undef, label %bb6 [
6 i8 9, label %bb5
7 i8 32, label %bb5
8 i8 10, label %bb5
9 i8 13, label %bb5
10 i8 12, label %bb5
11 ]
12
13 bb5: ; preds = %entry, %entry, %entry, %entry, %entry
14 br label %bb6
15
16 bb6: ; preds = %bb5, %entry
17 br i1 undef, label %bb7, label %bb9
18
19 bb7: ; preds = %bb6
20 unreachable
21
22 bb9: ; preds = %bb6
23 %0 = load i8* undef, align 1 ; [#uses=3]
24 br i1 undef, label %bb12, label %bb10
25
26 bb10: ; preds = %bb9
27 br i1 undef, label %bb12, label %bb11
28
29 bb11: ; preds = %bb10
30 unreachable
31
32 bb12: ; preds = %bb10, %bb9
33 br i1 undef, label %bb13, label %bb14
34
35 bb13: ; preds = %bb12
36 store i8 %0, i8* undef, align 1
37 %1 = zext i8 %0 to i32 ; [#uses=1]
38 br label %bb18
39
40 bb14: ; preds = %bb12
41 br label %bb18
42
43 bb18: ; preds = %bb14, %bb13
44 %termcode.0 = phi i32 [ %1, %bb13 ], [ undef, %bb14 ] ; [#uses=2]
45 %2 = icmp eq i8 %0, 0 ; [#uses=1]
46 br i1 %2, label %bb21, label %bb19
47
48 bb19: ; preds = %bb18
49 br i1 undef, label %bb21, label %bb20
50
51 bb20: ; preds = %bb19
52 br label %bb21
53
54 bb21: ; preds = %bb20, %bb19, %bb18
55 %termcode.1 = phi i32 [ %termcode.0, %bb18 ], [ %termcode.0, %bb19 ], [ undef, %bb20 ] ; [#uses=0]
56 unreachable
57 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -O0 -disable-fp-elim -relocation-model=pic -stats 2>&1 | FileCheck %s
2 ;
3 ; This test should not cause any spilling with RAFast.
4 ;
5 ; CHECK: Number of copies coalesced
6 ; CHECK-NOT: Number of stores added
7 ;
8 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
9 target triple = "x86_64-apple-darwin10.0.0"
10
11 %0 = type { i64, i64, i8*, i8* }
12 %1 = type opaque
13 %2 = type opaque
14 %3 = type <{ i8*, i32, i32, void (%4*)*, i8*, i64 }>
15 %4 = type { i8**, i32, i32, i8**, %5*, i64 }
16 %5 = type { i64, i64 }
17 %6 = type { i8*, i32, i32, i8*, %5* }
18
19 @0 = external hidden constant %0
20
21 define hidden void @f() ssp {
22 bb:
23 %tmp5 = alloca i64, align 8
24 %tmp6 = alloca void ()*, align 8
25 %tmp7 = alloca %3, align 8
26 store i64 0, i64* %tmp5, align 8
27 br label %bb8
28
29 bb8: ; preds = %bb23, %bb
30 %tmp15 = getelementptr inbounds %3* %tmp7, i32 0, i32 4
31 store i8* bitcast (%0* @0 to i8*), i8** %tmp15
32 %tmp16 = bitcast %3* %tmp7 to void ()*
33 store void ()* %tmp16, void ()** %tmp6, align 8
34 %tmp17 = load void ()** %tmp6, align 8
35 %tmp18 = bitcast void ()* %tmp17 to %6*
36 %tmp19 = getelementptr inbounds %6* %tmp18, i32 0, i32 3
37 %tmp20 = bitcast %6* %tmp18 to i8*
38 %tmp21 = load i8** %tmp19
39 %tmp22 = bitcast i8* %tmp21 to void (i8*)*
40 call void %tmp22(i8* %tmp20)
41 br label %bb23
42
43 bb23: ; preds = %bb8
44 %tmp24 = load i64* %tmp5, align 8
45 %tmp25 = add i64 %tmp24, 1
46 store i64 %tmp25, i64* %tmp5, align 8
47 %tmp26 = icmp ult i64 %tmp25, 10
48 br i1 %tmp26, label %bb8, label %bb27
49
50 bb27: ; preds = %bb23
51 ret void
52 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -stats 2>&1 | \
2 ; RUN: not grep "Number of machine instructions hoisted out of loops post regalloc"
3
4 ; rdar://11095580
5
6 %struct.ref_s = type { %union.color_sample, i16, i16 }
7 %union.color_sample = type { i64 }
8
9 @table = external global [3891 x i64]
10
11 declare i32 @foo()
12
13 define i32 @zarray(%struct.ref_s* nocapture %op) nounwind ssp {
14 entry:
15 %call = tail call i32 @foo()
16 %tmp = ashr i32 %call, 31
17 %0 = and i32 %tmp, 1396
18 %index9 = add i32 %0, 2397
19 indirectbr i8* undef, [label %return, label %if.end]
20
21 if.end: ; preds = %entry
22 %size5 = getelementptr inbounds %struct.ref_s* %op, i64 0, i32 2
23 %tmp6 = load i16* %size5, align 2
24 %tobool1 = icmp eq i16 %tmp6, 0
25 %1 = select i1 %tobool1, i32 1396, i32 -1910
26 %index10 = add i32 %index9, %1
27 indirectbr i8* undef, [label %return, label %while.body.lr.ph]
28
29 while.body.lr.ph: ; preds = %if.end
30 %refs = bitcast %struct.ref_s* %op to %struct.ref_s**
31 %tmp9 = load %struct.ref_s** %refs, align 8
32 %tmp4 = zext i16 %tmp6 to i64
33 %index13 = add i32 %index10, 1658
34 %2 = sext i32 %index13 to i64
35 %3 = getelementptr [3891 x i64]* @table, i64 0, i64 %2
36 %blockaddress14 = load i64* %3, align 8
37 %4 = inttoptr i64 %blockaddress14 to i8*
38 indirectbr i8* %4, [label %while.body]
39
40 while.body: ; preds = %while.body, %while.body.lr.ph
41 %index7 = phi i32 [ %index15, %while.body ], [ %index13, %while.body.lr.ph ]
42 %indvar = phi i64 [ %indvar.next, %while.body ], [ 0, %while.body.lr.ph ]
43 %type_attrs = getelementptr %struct.ref_s* %tmp9, i64 %indvar, i32 1
44 store i16 32, i16* %type_attrs, align 2
45 %indvar.next = add i64 %indvar, 1
46 %exitcond5 = icmp eq i64 %indvar.next, %tmp4
47 %tmp7 = select i1 %exitcond5, i32 1648, i32 0
48 %index15 = add i32 %index7, %tmp7
49 %tmp8 = select i1 %exitcond5, i64 13, i64 0
50 %5 = sext i32 %index15 to i64
51 %6 = getelementptr [3891 x i64]* @table, i64 0, i64 %5
52 %blockaddress16 = load i64* %6, align 8
53 %7 = inttoptr i64 %blockaddress16 to i8*
54 indirectbr i8* %7, [label %return, label %while.body]
55
56 return: ; preds = %while.body, %if.end, %entry
57 %retval.0 = phi i32 [ %call, %entry ], [ 0, %if.end ], [ 0, %while.body ]
58 ret i32 %retval.0
59 }
0 ; REQUIRES: asserts
1 ; RUN: llc < %s -mtriple=x86_64-appel-darwin -disable-cgp-branch-opts -stats 2>&1 | grep "machine-sink"
2
3 define fastcc void @t() nounwind ssp {
4 entry:
5 br i1 undef, label %bb, label %bb4
6
7 bb: ; preds = %entry
8 br i1 undef, label %return, label %bb3
9
10 bb3: ; preds = %bb
11 unreachable
12
13 bb4: ; preds = %entry
14 br i1 undef, label %bb.nph, label %return
15
16 bb.nph: ; preds = %bb4
17 br label %bb5
18
19 bb5: ; preds = %bb9, %bb.nph
20 %indvar = phi i64 [ 0, %bb.nph ], [ %tmp12, %bb9 ] ; [#uses=1]
21 %tmp12 = add i64 %indvar, 1 ; [#uses=2]
22 %tmp13 = trunc i64 %tmp12 to i32 ; [#uses=0]
23 br i1 undef, label %bb9, label %bb6
24
25 bb6: ; preds = %bb5
26 br i1 undef, label %bb9, label %bb7
27
28 bb7: ; preds = %bb6
29 br i1 undef, label %bb9, label %bb8
30
31 bb8: ; preds = %bb7
32 unreachable
33
34 bb9: ; preds = %bb7, %bb6, %bb5
35 br i1 undef, label %bb5, label %return
36
37 return: ; preds = %bb9, %bb4, %bb
38 ret void
39 }
+0
-18
test/CodeGen/X86/Stats/2003-08-03-CallArgLiveRanges.ll less more
None ; The old instruction selector used to load all arguments to a call up in
1 ; registers, then start pushing them all onto the stack. This is bad news as
2 ; it makes a ton of annoying overlapping live ranges. This code should not
3 ; cause spills!
4 ;
5 ; RUN: llc < %s -march=x86 -stats 2>&1 | not grep spilled
6
7 target datalayout = "e-p:32:32"
8
9 define i32 @test(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) {
10 ret i32 0
11 }
12
13 define i32 @main() {
14 %X = call i32 @test( i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 ) ; [#uses=1]
15 ret i32 %X
16 }
17
+0
-12
test/CodeGen/X86/Stats/2006-03-02-InstrSchedBug.ll less more
None ; RUN: llc < %s -march=x86 -stats 2>&1 | \
1 ; RUN: grep asm-printer | grep 7
2
3 define i32 @g(i32 %a, i32 %b) nounwind {
4 %tmp.1 = shl i32 %b, 1 ; [#uses=1]
5 %tmp.3 = add i32 %tmp.1, %a ; [#uses=1]
6 %tmp.5 = mul i32 %tmp.3, %a ; [#uses=1]
7 %tmp.8 = mul i32 %b, %b ; [#uses=1]
8 %tmp.9 = add i32 %tmp.5, %tmp.8 ; [#uses=1]
9 ret i32 %tmp.9
10 }
11
+0
-76
test/CodeGen/X86/Stats/2006-05-01-SchedCausingSpills.ll less more
None ; RUN: llc < %s -march=x86 -mcpu=yonah -stats 2>&1 | \
1 ; RUN: not grep "Number of register spills"
2 ; END.
3
4
5 define i32 @foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) {
6 %tmp44 = load <4 x float>* %a ; <<4 x float>> [#uses=9]
7 %tmp46 = load <4 x float>* %b ; <<4 x float>> [#uses=1]
8 %tmp48 = load <4 x float>* %c ; <<4 x float>> [#uses=1]
9 %tmp50 = load <4 x float>* %d ; <<4 x float>> [#uses=1]
10 %tmp51 = bitcast <4 x float> %tmp44 to <4 x i32> ; <<4 x i32>> [#uses=1]
11 %tmp = shufflevector <4 x i32> %tmp51, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
12 %tmp52 = bitcast <4 x i32> %tmp to <4 x float> ; <<4 x float>> [#uses=1]
13 %tmp60 = xor <4 x i32> %tmp, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
14 %tmp61 = bitcast <4 x i32> %tmp60 to <4 x float> ; <<4 x float>> [#uses=1]
15 %tmp74 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp52, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
16 %tmp75 = bitcast <4 x float> %tmp74 to <4 x i32> ; <<4 x i32>> [#uses=1]
17 %tmp88 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp61, i8 1 ) ; <<4 x float>> [#uses=1]
18 %tmp89 = bitcast <4 x float> %tmp88 to <4 x i32> ; <<4 x i32>> [#uses=1]
19 %tmp98 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp75, <4 x i32> %tmp89 ) ; <<4 x i32>> [#uses=1]
20 %tmp102 = bitcast <8 x i16> %tmp98 to <8 x i16> ; <<8 x i16>> [#uses=1]
21 %tmp.upgrd.1 = shufflevector <8 x i16> %tmp102, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
22 %tmp105 = shufflevector <8 x i16> %tmp.upgrd.1, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
23 %tmp105.upgrd.2 = bitcast <8 x i16> %tmp105 to <4 x float> ; <<4 x float>> [#uses=1]
24 store <4 x float> %tmp105.upgrd.2, <4 x float>* %a
25 %tmp108 = bitcast <4 x float> %tmp46 to <4 x i32> ; <<4 x i32>> [#uses=1]
26 %tmp109 = shufflevector <4 x i32> %tmp108, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
27 %tmp109.upgrd.3 = bitcast <4 x i32> %tmp109 to <4 x float> ; <<4 x float>> [#uses=1]
28 %tmp119 = xor <4 x i32> %tmp109, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
29 %tmp120 = bitcast <4 x i32> %tmp119 to <4 x float> ; <<4 x float>> [#uses=1]
30 %tmp133 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp109.upgrd.3, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
31 %tmp134 = bitcast <4 x float> %tmp133 to <4 x i32> ; <<4 x i32>> [#uses=1]
32 %tmp147 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp120, i8 1 ) ; <<4 x float>> [#uses=1]
33 %tmp148 = bitcast <4 x float> %tmp147 to <4 x i32> ; <<4 x i32>> [#uses=1]
34 %tmp159 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp134, <4 x i32> %tmp148 ) ; <<4 x i32>> [#uses=1]
35 %tmp163 = bitcast <8 x i16> %tmp159 to <8 x i16> ; <<8 x i16>> [#uses=1]
36 %tmp164 = shufflevector <8 x i16> %tmp163, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
37 %tmp166 = shufflevector <8 x i16> %tmp164, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
38 %tmp166.upgrd.4 = bitcast <8 x i16> %tmp166 to <4 x float> ; <<4 x float>> [#uses=1]
39 store <4 x float> %tmp166.upgrd.4, <4 x float>* %b
40 %tmp169 = bitcast <4 x float> %tmp48 to <4 x i32> ; <<4 x i32>> [#uses=1]
41 %tmp170 = shufflevector <4 x i32> %tmp169, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
42 %tmp170.upgrd.5 = bitcast <4 x i32> %tmp170 to <4 x float> ; <<4 x float>> [#uses=1]
43 %tmp180 = xor <4 x i32> %tmp170, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
44 %tmp181 = bitcast <4 x i32> %tmp180 to <4 x float> ; <<4 x float>> [#uses=1]
45 %tmp194 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp170.upgrd.5, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
46 %tmp195 = bitcast <4 x float> %tmp194 to <4 x i32> ; <<4 x i32>> [#uses=1]
47 %tmp208 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp181, i8 1 ) ; <<4 x float>> [#uses=1]
48 %tmp209 = bitcast <4 x float> %tmp208 to <4 x i32> ; <<4 x i32>> [#uses=1]
49 %tmp220 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp195, <4 x i32> %tmp209 ) ; <<4 x i32>> [#uses=1]
50 %tmp224 = bitcast <8 x i16> %tmp220 to <8 x i16> ; <<8 x i16>> [#uses=1]
51 %tmp225 = shufflevector <8 x i16> %tmp224, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
52 %tmp227 = shufflevector <8 x i16> %tmp225, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
53 %tmp227.upgrd.6 = bitcast <8 x i16> %tmp227 to <4 x float> ; <<4 x float>> [#uses=1]
54 store <4 x float> %tmp227.upgrd.6, <4 x float>* %c
55 %tmp230 = bitcast <4 x float> %tmp50 to <4 x i32> ; <<4 x i32>> [#uses=1]
56 %tmp231 = shufflevector <4 x i32> %tmp230, <4 x i32> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x i32>> [#uses=2]
57 %tmp231.upgrd.7 = bitcast <4 x i32> %tmp231 to <4 x float> ; <<4 x float>> [#uses=1]
58 %tmp241 = xor <4 x i32> %tmp231, < i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648 > ; <<4 x i32>> [#uses=1]
59 %tmp242 = bitcast <4 x i32> %tmp241 to <4 x float> ; <<4 x float>> [#uses=1]
60 %tmp255 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp231.upgrd.7, <4 x float> %tmp44, i8 1 ) ; <<4 x float>> [#uses=1]
61 %tmp256 = bitcast <4 x float> %tmp255 to <4 x i32> ; <<4 x i32>> [#uses=1]
62 %tmp269 = tail call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp242, i8 1 ) ; <<4 x float>> [#uses=1]
63 %tmp270 = bitcast <4 x float> %tmp269 to <4 x i32> ; <<4 x i32>> [#uses=1]
64 %tmp281 = tail call <8 x i16> @llvm.x86.sse2.packssdw.128( <4 x i32> %tmp256, <4 x i32> %tmp270 ) ; <<4 x i32>> [#uses=1]
65 %tmp285 = bitcast <8 x i16> %tmp281 to <8 x i16> ; <<8 x i16>> [#uses=1]
66 %tmp286 = shufflevector <8 x i16> %tmp285, <8 x i16> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 6, i32 5, i32 4, i32 7 > ; <<8 x i16>> [#uses=1]
67 %tmp288 = shufflevector <8 x i16> %tmp286, <8 x i16> undef, <8 x i32> < i32 2, i32 1, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7 > ; <<8 x i16>> [#uses=1]
68 %tmp288.upgrd.8 = bitcast <8 x i16> %tmp288 to <4 x float> ; <<4 x float>> [#uses=1]
69 store <4 x float> %tmp288.upgrd.8, <4 x float>* %d
70 ret i32 0
71 }
72
73 declare <4 x float> @llvm.x86.sse.cmp.ps(<4 x float>, <4 x float>, i8)
74
75 declare <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32>, <4 x i32>)
+0
-23
test/CodeGen/X86/Stats/2006-05-02-InstrSched1.ll less more
None ; RUN: llc < %s -march=x86 -relocation-model=static -stats 2>&1 | \
1 ; RUN: grep asm-printer | grep 14
2 ;
3 @size20 = external global i32 ; [#uses=1]
4 @in5 = external global i8* ; [#uses=1]
5
6 define i32 @compare(i8* %a, i8* %b) nounwind {
7 %tmp = bitcast i8* %a to i32* ; [#uses=1]
8 %tmp1 = bitcast i8* %b to i32* ; [#uses=1]
9 %tmp.upgrd.1 = load i32* @size20 ; [#uses=1]
10 %tmp.upgrd.2 = load i8** @in5 ; [#uses=2]
11 %tmp3 = load i32* %tmp1 ; [#uses=1]
12 %gep.upgrd.3 = zext i32 %tmp3 to i64 ; [#uses=1]
13 %tmp4 = getelementptr i8* %tmp.upgrd.2, i64 %gep.upgrd.3 ; [#uses=2]
14 %tmp7 = load i32* %tmp ; [#uses=1]
15 %gep.upgrd.4 = zext i32 %tmp7 to i64 ; [#uses=1]
16 %tmp8 = getelementptr i8* %tmp.upgrd.2, i64 %gep.upgrd.4 ; [#uses=2]
17 %tmp.upgrd.5 = tail call i32 @memcmp( i8* %tmp8, i8* %tmp4, i32 %tmp.upgrd.1 ) ; [#uses=1]
18 ret i32 %tmp.upgrd.5
19 }
20
21 declare i32 @memcmp(i8*, i8*, i32)
22
+0
-24
test/CodeGen/X86/Stats/2006-05-02-InstrSched2.ll less more
None ; RUN: llc < %s -march=x86 -stats 2>&1 | \
1 ; RUN: grep asm-printer | grep 13
2
3 define void @_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(i8* %tmp435.i, i32* %tmp449.i.out) nounwind {
4 newFuncRoot:
5 br label %cond_true456.i
6 bb459.i.exitStub: ; preds = %cond_true456.i
7 store i32 %tmp449.i, i32* %tmp449.i.out
8 ret void
9 cond_true456.i: ; preds = %cond_true456.i, %newFuncRoot
10 %__s441.2.4.i = phi i8* [ %tmp451.i.upgrd.1, %cond_true456.i ], [ %tmp435.i, %newFuncRoot ] ; [#uses=2]
11 %__h.2.4.i = phi i32 [ %tmp449.i, %cond_true456.i ], [ 0, %newFuncRoot ] ; [#uses=1]
12 %tmp446.i = mul i32 %__h.2.4.i, 5 ; [#uses=1]
13 %tmp.i = load i8* %__s441.2.4.i ; [#uses=1]
14 %tmp448.i = sext i8 %tmp.i to i32 ; [#uses=1]
15 %tmp449.i = add i32 %tmp448.i, %tmp446.i ; [#uses=2]
16 %tmp450.i = ptrtoint i8* %__s441.2.4.i to i32 ; [#uses=1]
17 %tmp451.i = add i32 %tmp450.i, 1 ; [#uses=1]
18 %tmp451.i.upgrd.1 = inttoptr i32 %tmp451.i to i8* ; [#uses=2]
19 %tmp45435.i = load i8* %tmp451.i.upgrd.1 ; [#uses=1]
20 %tmp45536.i = icmp eq i8 %tmp45435.i, 0 ; [#uses=1]
21 br i1 %tmp45536.i, label %bb459.i.exitStub, label %cond_true456.i
22 }
23
+0
-51
test/CodeGen/X86/Stats/2006-05-11-InstrSched.ll less more
None ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -mcpu=penryn -mattr=+sse2 -stats -realign-stack=0 2>&1 | \
1 ; RUN: grep "asm-printer" | grep 35
2
3 target datalayout = "e-p:32:32"
4 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) nounwind {
5 entry:
6 %tmp9 = icmp slt i32 %M, 5 ; [#uses=1]
7 br i1 %tmp9, label %return, label %cond_true
8
9 cond_true: ; preds = %cond_true, %entry
10 %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %cond_true ] ; [#uses=2]
11 %tmp. = shl i32 %indvar, 2 ; [#uses=1]
12 %tmp.10 = add nsw i32 %tmp., 1 ; [#uses=2]
13 %tmp31 = add nsw i32 %tmp.10, -1 ; [#uses=4]
14 %tmp32 = getelementptr i32* %mpp, i32 %tmp31 ; [#uses=1]
15 %tmp34 = bitcast i32* %tmp32 to <16 x i8>* ; [#uses=1]
16 %tmp = load <16 x i8>* %tmp34, align 1
17 %tmp42 = getelementptr i32* %tpmm, i32 %tmp31 ; [#uses=1]
18 %tmp42.upgrd.1 = bitcast i32* %tmp42 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
19 %tmp46 = load <4 x i32>* %tmp42.upgrd.1 ; <<4 x i32>> [#uses=1]
20 %tmp54 = bitcast <16 x i8> %tmp to <4 x i32> ; <<4 x i32>> [#uses=1]
21 %tmp55 = add <4 x i32> %tmp54, %tmp46 ; <<4 x i32>> [#uses=2]
22 %tmp55.upgrd.2 = bitcast <4 x i32> %tmp55 to <2 x i64> ; <<2 x i64>> [#uses=1]
23 %tmp62 = getelementptr i32* %ip, i32 %tmp31 ; [#uses=1]
24 %tmp65 = bitcast i32* %tmp62 to <16 x i8>* ; [#uses=1]
25 %tmp66 = load <16 x i8>* %tmp65, align 1
26 %tmp73 = getelementptr i32* %tpim, i32 %tmp31 ; [#uses=1]
27 %tmp73.upgrd.3 = bitcast i32* %tmp73 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
28 %tmp77 = load <4 x i32>* %tmp73.upgrd.3 ; <<4 x i32>> [#uses=1]
29 %tmp87 = bitcast <16 x i8> %tmp66 to <4 x i32> ; <<4 x i32>> [#uses=1]