1; RUN: llc -mtriple powerpc64le-unknown-linux-gnu -fast-isel -O0 < %s | FileCheck %s
2
3define i1 @TestULT(double %t0) {
4; CHECK-LABEL: TestULT:
5; CHECK: mcrf
6; CHECK: blr
7entry:
8  %t1 = fcmp ult double %t0, 0.000000e+00
9  br i1 %t1, label %good, label %bad
10
11bad:
12  ret i1 false
13
14good:
15  ret i1 true
16}
17
18define i1 @TestULE(double %t0) {
19; CHECK-LABEL: TestULE:
20; CHECK: fcmpu
21; CHECK-NEXT: ble
22; CHECK: blr
23entry:
24  %t1 = fcmp ule double %t0, 0.000000e+00
25  br i1 %t1, label %good, label %bad
26
27bad:
28  ret i1 false
29
30good:
31  ret i1 true
32}
33
34define i1 @TestUNE(double %t0) {
35; CHECK-LABEL: TestUNE:
36; CHECK: fcmpu
37; CHECK-NEXT: bne
38; CHECK: blr
39entry:
40  %t1 = fcmp une double %t0, 0.000000e+00
41  br i1 %t1, label %good, label %bad
42
43bad:
44  ret i1 false
45
46good:
47  ret i1 true
48}
49
50define i1 @TestUEQ(double %t0) {
51; CHECK-LABEL: TestUEQ:
52; CHECK: mcrf
53; CHECK: blr
54entry:
55  %t1 = fcmp ueq double %t0, 0.000000e+00
56  br i1 %t1, label %good, label %bad
57
58bad:
59  ret i1 false
60
61good:
62  ret i1 true
63}
64
65define i1 @TestUGT(double %t0) {
66; CHECK-LABEL: TestUGT:
67; CHECK: mcrf
68; CHECK: blr
69entry:
70  %t1 = fcmp ugt double %t0, 0.000000e+00
71  br i1 %t1, label %good, label %bad
72
73bad:
74  ret i1 false
75
76good:
77  ret i1 true
78}
79
80define i1 @TestUGE(double %t0) {
81; CHECK-LABEL: TestUGE:
82; CHECK: fcmpu
83; CHECK-NEXT: bge
84; CHECK: blr
85entry:
86  %t1 = fcmp uge double %t0, 0.000000e+00
87  br i1 %t1, label %good, label %bad
88
89bad:
90  ret i1 false
91
92good:
93  ret i1 true
94}
95
96define i1 @TestOLT(double %t0) {
97; CHECK-LABEL: TestOLT:
98; CHECK: fcmpu
99; CHECK-NEXT: blt
100; CHECK: blr
101entry:
102  %t1 = fcmp olt double %t0, 0.000000e+00
103  br i1 %t1, label %good, label %bad
104
105bad:
106  ret i1 false
107
108good:
109  ret i1 true
110}
111
112define i1 @TestOLE(double %t0) {
113; CHECK-LABEL: TestOLE:
114; CHECK: mcrf
115; CHECK: blr
116entry:
117  %t1 = fcmp ole double %t0, 0.000000e+00
118  br i1 %t1, label %good, label %bad
119
120bad:
121  ret i1 false
122
123good:
124  ret i1 true
125}
126
127define i1 @TestONE(double %t0) {
128; CHECK-LABEL: TestONE:
129; CHECK: mcrf
130; CHECK: blr
131entry:
132  %t1 = fcmp one double %t0, 0.000000e+00
133  br i1 %t1, label %good, label %bad
134
135bad:
136  ret i1 false
137
138good:
139  ret i1 true
140}
141
142define i1 @TestOEQ(double %t0) {
143; CHECK-LABEL: TestOEQ:
144; CHECK: fcmpu
145; CHECK-NEXT: beq
146; CHECK: blr
147entry:
148  %t1 = fcmp oeq double %t0, 0.000000e+00
149  br i1 %t1, label %good, label %bad
150
151bad:
152  ret i1 false
153
154good:
155  ret i1 true
156}
157
158define i1 @TestOGT(double %t0) {
159; CHECK-LABEL: TestOGT:
160; CHECK: fcmpu
161; CHECK-NEXT: bgt
162; CHECK: blr
163entry:
164  %t1 = fcmp ogt double %t0, 0.000000e+00
165  br i1 %t1, label %good, label %bad
166
167bad:
168  ret i1 false
169
170good:
171  ret i1 true
172}
173
174define i1 @TestOGE(double %t0) {
175; CHECK-LABEL: TestOGE:
176; CHECK: mcrf
177; CHECK: blr
178entry:
179  %t1 = fcmp oge double %t0, 0.000000e+00
180  br i1 %t1, label %good, label %bad
181
182bad:
183  ret i1 false
184
185good:
186  ret i1 true
187}
188