blob: ae51114b4c9a218595c72766918ba3d9c9e2fa92 [file] [log] [blame]
Anton Korobeynikovac59d532009-07-16 13:53:15 +00001; RUN: llvm-as < %s | llc | grep jl | count 3
2; RUN: llvm-as < %s | llc | grep jh | count 3
3; RUN: llvm-as < %s | llc | grep je | count 2
4; RUN: llvm-as < %s | llc | grep jne | count 2
5
6target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128"
7target triple = "s390x-unknown-linux-gnu"
8
9define void @foo(i32 %a, i32 %b) nounwind {
10entry:
11 %cmp = icmp eq i32 %a, 0 ; <i1> [#uses=1]
12 br i1 %cmp, label %if.then, label %if.end
13
14if.then: ; preds = %entry
15 tail call void @bar() nounwind
16 ret void
17
18if.end: ; preds = %entry
19 ret void
20}
21
22declare void @bar()
23
24define void @foo1(i32 %a, i32 %b) nounwind {
25entry:
26 %cmp = icmp ugt i32 %a, 1 ; <i1> [#uses=1]
27 br i1 %cmp, label %if.then, label %if.end
28
29if.then: ; preds = %entry
30 tail call void @bar() nounwind
31 ret void
32
33if.end: ; preds = %entry
34 ret void
35}
36
37define void @foo2(i32 %a, i32 %b) nounwind {
38entry:
39 %cmp = icmp ugt i32 %a, 1 ; <i1> [#uses=1]
40 br i1 %cmp, label %if.end, label %if.then
41
42if.then: ; preds = %entry
43 tail call void @bar() nounwind
44 ret void
45
46if.end: ; preds = %entry
47 ret void
48}
49
50define void @foo3(i32 %a) nounwind {
51entry:
52 %cmp = icmp eq i32 %a, 0 ; <i1> [#uses=1]
53 br i1 %cmp, label %if.end, label %if.then
54
55if.then: ; preds = %entry
56 tail call void @bar() nounwind
57 ret void
58
59if.end: ; preds = %entry
60 ret void
61}
62
63define void @foo4(i32 %a) nounwind {
64entry:
65 %cmp = icmp eq i32 %a, 1 ; <i1> [#uses=1]
66 br i1 %cmp, label %if.then, label %if.end
67
68if.then: ; preds = %entry
69 tail call void @bar() nounwind
70 ret void
71
72if.end: ; preds = %entry
73 ret void
74}
75
76define void @foo5(i32 %a) nounwind {
77entry:
78 %cmp = icmp eq i32 %a, 1 ; <i1> [#uses=1]
79 br i1 %cmp, label %if.end, label %if.then
80
81if.then: ; preds = %entry
82 tail call void @bar() nounwind
83 ret void
84
85if.end: ; preds = %entry
86 ret void
87}
88
89define void @foo6(i32 %a) nounwind {
90entry:
91 %cmp = icmp slt i32 %a, 1 ; <i1> [#uses=1]
92 br i1 %cmp, label %if.then, label %if.end
93
94if.then: ; preds = %entry
95 tail call void @bar() nounwind
96 ret void
97
98if.end: ; preds = %entry
99 ret void
100}
101
102define void @foo7(i32 %a) nounwind {
103entry:
104 %cmp = icmp sgt i32 %a, 1 ; <i1> [#uses=1]
105 br i1 %cmp, label %if.then, label %if.end
106
107if.then: ; preds = %entry
108 tail call void @bar() nounwind
109 ret void
110
111if.end: ; preds = %entry
112 ret void
113}
114
115define void @foo8(i32 %a) nounwind {
116entry:
117 %cmp = icmp sgt i32 %a, 1 ; <i1> [#uses=1]
118 br i1 %cmp, label %if.end, label %if.then
119
120if.then: ; preds = %entry
121 tail call void @bar() nounwind
122 ret void
123
124if.end: ; preds = %entry
125 ret void
126}
127
128define void @foo9(i32 %a) nounwind {
129entry:
130 %cmp = icmp slt i32 %a, 1 ; <i1> [#uses=1]
131 br i1 %cmp, label %if.end, label %if.then
132
133if.then: ; preds = %entry
134 tail call void @bar() nounwind
135 ret void
136
137if.end: ; preds = %entry
138 ret void
139}