Debian Codegraph @

llvm/test/CodeGen/PowerPC/brcond.ll

raw
1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
2 ; RUN: -ppc-reduce-cr-logicals=false < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
4 ; RUN: -ppc-reduce-cr-logicals=false < %s | FileCheck %s
5
6 define signext i32 @testi32slt(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
7 ; CHECK-LABEL: testi32slt
8 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
9 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
10 entry:
11 %cmp1 = icmp eq i32 %c3, %c4
12 %cmp3tmp = icmp eq i32 %c1, %c2
13 %cmp3 = icmp slt i1 %cmp3tmp, %cmp1
14 br i1 %cmp3, label %iftrue, label %iffalse
15 iftrue:
16 ret i32 %a1
17 iffalse:
18 ret i32 %a2
19 }
20
21 define signext i32 @testi32ult(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
22 ; CHECK-LABEL: testi32ult
23 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
24 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
25 entry:
26 %cmp1 = icmp eq i32 %c3, %c4
27 %cmp3tmp = icmp eq i32 %c1, %c2
28 %cmp3 = icmp ult i1 %cmp3tmp, %cmp1
29 br i1 %cmp3, label %iftrue, label %iffalse
30 iftrue:
31 ret i32 %a1
32 iffalse:
33 ret i32 %a2
34 }
35
36 define signext i32 @testi32sle(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
37 ; CHECK-LABEL: testi32sle
38 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
39 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
40 entry:
41 %cmp1 = icmp eq i32 %c3, %c4
42 %cmp3tmp = icmp eq i32 %c1, %c2
43 %cmp3 = icmp sle i1 %cmp3tmp, %cmp1
44 br i1 %cmp3, label %iftrue, label %iffalse
45 iftrue:
46 ret i32 %a1
47 iffalse:
48 ret i32 %a2
49 }
50
51 define signext i32 @testi32ule(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
52 ; CHECK-LABEL: testi32ule
53 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
54 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
55 entry:
56 %cmp1 = icmp eq i32 %c3, %c4
57 %cmp3tmp = icmp eq i32 %c1, %c2
58 %cmp3 = icmp ule i1 %cmp3tmp, %cmp1
59 br i1 %cmp3, label %iftrue, label %iffalse
60 iftrue:
61 ret i32 %a1
62 iffalse:
63 ret i32 %a2
64 }
65
66 define signext i32 @testi32eq(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
67 ; CHECK-LABEL: testi32eq:
68 ; CHECK: crxor [[REG:[0-9]+]], 6, 2
69 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
70 entry:
71 %cmp1 = icmp eq i32 %c3, %c4
72 %cmp3tmp = icmp eq i32 %c1, %c2
73 %cmp3 = icmp eq i1 %cmp3tmp, %cmp1
74 br i1 %cmp3, label %iftrue, label %iffalse
75 iftrue:
76 ret i32 %a1
77 iffalse:
78 ret i32 %a2
79 }
80
81 define signext i32 @testi32sge(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
82 ; CHECK-LABEL: testi32sge:
83 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
84 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
85 entry:
86 %cmp1 = icmp eq i32 %c3, %c4
87 %cmp3tmp = icmp eq i32 %c1, %c2
88 %cmp3 = icmp sge i1 %cmp3tmp, %cmp1
89 br i1 %cmp3, label %iftrue, label %iffalse
90 iftrue:
91 ret i32 %a1
92 iffalse:
93 ret i32 %a2
94 }
95
96 define signext i32 @testi32uge(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
97 ; CHECK-LABEL: testi32uge:
98 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
99 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
100 entry:
101 %cmp1 = icmp eq i32 %c3, %c4
102 %cmp3tmp = icmp eq i32 %c1, %c2
103 %cmp3 = icmp uge i1 %cmp3tmp, %cmp1
104 br i1 %cmp3, label %iftrue, label %iffalse
105 iftrue:
106 ret i32 %a1
107 iffalse:
108 ret i32 %a2
109 }
110
111 define signext i32 @testi32sgt(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
112 ; CHECK-LABEL: testi32sgt:
113 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
114 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
115 entry:
116 %cmp1 = icmp eq i32 %c3, %c4
117 %cmp3tmp = icmp eq i32 %c1, %c2
118 %cmp3 = icmp sgt i1 %cmp3tmp, %cmp1
119 br i1 %cmp3, label %iftrue, label %iffalse
120 iftrue:
121 ret i32 %a1
122 iffalse:
123 ret i32 %a2
124 }
125
126 define signext i32 @testi32ugt(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
127 ; CHECK-LABEL: testi32ugt:
128 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
129 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
130 entry:
131 %cmp1 = icmp eq i32 %c3, %c4
132 %cmp3tmp = icmp eq i32 %c1, %c2
133 %cmp3 = icmp ugt i1 %cmp3tmp, %cmp1
134 br i1 %cmp3, label %iftrue, label %iffalse
135 iftrue:
136 ret i32 %a1
137 iffalse:
138 ret i32 %a2
139 }
140
141 define signext i32 @testi32ne(i32 signext %c1, i32 signext %c2, i32 signext %c3, i32 signext %c4, i32 signext %a1, i32 signext %a2) #0 {
142 ; CHECK-LABEL: testi32ne:
143 ; CHECK: creqv [[REG:[0-9]+]], 6, 2
144 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
145 entry:
146 %cmp1 = icmp eq i32 %c3, %c4
147 %cmp3tmp = icmp eq i32 %c1, %c2
148 %cmp3 = icmp ne i1 %cmp3tmp, %cmp1
149 br i1 %cmp3, label %iftrue, label %iffalse
150 iftrue:
151 ret i32 %a1
152 iffalse:
153 ret i32 %a2
154 }
155
156 define i64 @testi64slt(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
157 ; CHECK-LABEL: testi64slt
158 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
159 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
160 entry:
161 %cmp1 = icmp eq i64 %c3, %c4
162 %cmp3tmp = icmp eq i64 %c1, %c2
163 %cmp3 = icmp slt i1 %cmp3tmp, %cmp1
164 br i1 %cmp3, label %iftrue, label %iffalse
165 iftrue:
166 ret i64 %a1
167 iffalse:
168 ret i64 %a2
169 }
170
171 define i64 @testi64ult(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
172 ; CHECK-LABEL: testi64ult
173 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
174 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
175 entry:
176 %cmp1 = icmp eq i64 %c3, %c4
177 %cmp3tmp = icmp eq i64 %c1, %c2
178 %cmp3 = icmp ult i1 %cmp3tmp, %cmp1
179 br i1 %cmp3, label %iftrue, label %iffalse
180 iftrue:
181 ret i64 %a1
182 iffalse:
183 ret i64 %a2
184 }
185
186 define i64 @testi64sle(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
187 ; CHECK-LABEL: testi64sle
188 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
189 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
190 entry:
191 %cmp1 = icmp eq i64 %c3, %c4
192 %cmp3tmp = icmp eq i64 %c1, %c2
193 %cmp3 = icmp sle i1 %cmp3tmp, %cmp1
194 br i1 %cmp3, label %iftrue, label %iffalse
195 iftrue:
196 ret i64 %a1
197 iffalse:
198 ret i64 %a2
199 }
200
201 define i64 @testi64ule(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
202 ; CHECK-LABEL: testi64ule
203 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
204 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
205 entry:
206 %cmp1 = icmp eq i64 %c3, %c4
207 %cmp3tmp = icmp eq i64 %c1, %c2
208 %cmp3 = icmp ule i1 %cmp3tmp, %cmp1
209 br i1 %cmp3, label %iftrue, label %iffalse
210 iftrue:
211 ret i64 %a1
212 iffalse:
213 ret i64 %a2
214 }
215
216 define i64 @testi64eq(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
217 ; CHECK-LABEL: testi64eq
218 ; CHECK: crxor [[REG:[0-9]+]], 6, 2
219 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
220 entry:
221 %cmp1 = icmp eq i64 %c3, %c4
222 %cmp3tmp = icmp eq i64 %c1, %c2
223 %cmp3 = icmp eq i1 %cmp3tmp, %cmp1
224 br i1 %cmp3, label %iftrue, label %iffalse
225 iftrue:
226 ret i64 %a1
227 iffalse:
228 ret i64 %a2
229 }
230
231 define i64 @testi64sge(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
232 ; CHECK-LABEL: testi64sge
233 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
234 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
235 entry:
236 %cmp1 = icmp eq i64 %c3, %c4
237 %cmp3tmp = icmp eq i64 %c1, %c2
238 %cmp3 = icmp sge i1 %cmp3tmp, %cmp1
239 br i1 %cmp3, label %iftrue, label %iffalse
240 iftrue:
241 ret i64 %a1
242 iffalse:
243 ret i64 %a2
244 }
245
246 define i64 @testi64uge(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
247 ; CHECK-LABEL: testi64uge
248 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
249 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
250 entry:
251 %cmp1 = icmp eq i64 %c3, %c4
252 %cmp3tmp = icmp eq i64 %c1, %c2
253 %cmp3 = icmp uge i1 %cmp3tmp, %cmp1
254 br i1 %cmp3, label %iftrue, label %iffalse
255 iftrue:
256 ret i64 %a1
257 iffalse:
258 ret i64 %a2
259 }
260
261 define i64 @testi64sgt(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
262 ; CHECK-LABEL: testi64sgt
263 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
264 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
265 entry:
266 %cmp1 = icmp eq i64 %c3, %c4
267 %cmp3tmp = icmp eq i64 %c1, %c2
268 %cmp3 = icmp sgt i1 %cmp3tmp, %cmp1
269 br i1 %cmp3, label %iftrue, label %iffalse
270 iftrue:
271 ret i64 %a1
272 iffalse:
273 ret i64 %a2
274 }
275
276 define i64 @testi64ugt(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
277 ; CHECK-LABEL: testi64ugt
278 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
279 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
280 entry:
281 %cmp1 = icmp eq i64 %c3, %c4
282 %cmp3tmp = icmp eq i64 %c1, %c2
283 %cmp3 = icmp ugt i1 %cmp3tmp, %cmp1
284 br i1 %cmp3, label %iftrue, label %iffalse
285 iftrue:
286 ret i64 %a1
287 iffalse:
288 ret i64 %a2
289 }
290
291 define i64 @testi64ne(i64 %c1, i64 %c2, i64 %c3, i64 %c4, i64 %a1, i64 %a2) #0 {
292 ; CHECK-LABEL: testi64ne
293 ; CHECK: creqv [[REG:[0-9]+]], 6, 2
294 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
295 entry:
296 %cmp1 = icmp eq i64 %c3, %c4
297 %cmp3tmp = icmp eq i64 %c1, %c2
298 %cmp3 = icmp ne i1 %cmp3tmp, %cmp1
299 br i1 %cmp3, label %iftrue, label %iffalse
300 iftrue:
301 ret i64 %a1
302 iffalse:
303 ret i64 %a2
304 }
305
306 define float @testfloatslt(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
307 ; CHECK-LABEL: testfloatslt
308 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
309 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
310 entry:
311 %cmp1 = fcmp oeq float %c3, %c4
312 %cmp3tmp = fcmp oeq float %c1, %c2
313 %cmp3 = icmp slt i1 %cmp3tmp, %cmp1
314 br i1 %cmp3, label %iftrue, label %iffalse
315 iftrue:
316 ret float %a1
317 iffalse:
318 ret float %a2
319 }
320
321 define float @testfloatult(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
322 ; CHECK-LABEL: testfloatult
323 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
324 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
325 entry:
326 %cmp1 = fcmp oeq float %c3, %c4
327 %cmp3tmp = fcmp oeq float %c1, %c2
328 %cmp3 = icmp ult i1 %cmp3tmp, %cmp1
329 br i1 %cmp3, label %iftrue, label %iffalse
330 iftrue:
331 ret float %a1
332 iffalse:
333 ret float %a2
334 }
335
336 define float @testfloatsle(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
337 ; CHECK-LABEL: testfloatsle
338 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
339 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
340 entry:
341 %cmp1 = fcmp oeq float %c3, %c4
342 %cmp3tmp = fcmp oeq float %c1, %c2
343 %cmp3 = icmp sle i1 %cmp3tmp, %cmp1
344 br i1 %cmp3, label %iftrue, label %iffalse
345 iftrue:
346 ret float %a1
347 iffalse:
348 ret float %a2
349 }
350
351 define float @testfloatule(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
352 ; CHECK-LABEL: testfloatule
353 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
354 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
355 entry:
356 %cmp1 = fcmp oeq float %c3, %c4
357 %cmp3tmp = fcmp oeq float %c1, %c2
358 %cmp3 = icmp ule i1 %cmp3tmp, %cmp1
359 br i1 %cmp3, label %iftrue, label %iffalse
360 iftrue:
361 ret float %a1
362 iffalse:
363 ret float %a2
364 }
365
366 define float @testfloateq(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
367 ; CHECK-LABEL: testfloateq
368 ; CHECK: crxor [[REG:[0-9]+]], 6, 2
369 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
370 entry:
371 %cmp1 = fcmp oeq float %c3, %c4
372 %cmp3tmp = fcmp oeq float %c1, %c2
373 %cmp3 = icmp eq i1 %cmp3tmp, %cmp1
374 br i1 %cmp3, label %iftrue, label %iffalse
375 iftrue:
376 ret float %a1
377 iffalse:
378 ret float %a2
379 }
380
381 define float @testfloatsge(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
382 ; CHECK-LABEL: testfloatsge
383 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
384 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
385 entry:
386 %cmp1 = fcmp oeq float %c3, %c4
387 %cmp3tmp = fcmp oeq float %c1, %c2
388 %cmp3 = icmp sge i1 %cmp3tmp, %cmp1
389 br i1 %cmp3, label %iftrue, label %iffalse
390 iftrue:
391 ret float %a1
392 iffalse:
393 ret float %a2
394 }
395
396 define float @testfloatuge(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
397 ; CHECK-LABEL: testfloatuge
398 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
399 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
400 entry:
401 %cmp1 = fcmp oeq float %c3, %c4
402 %cmp3tmp = fcmp oeq float %c1, %c2
403 %cmp3 = icmp uge i1 %cmp3tmp, %cmp1
404 br i1 %cmp3, label %iftrue, label %iffalse
405 iftrue:
406 ret float %a1
407 iffalse:
408 ret float %a2
409 }
410
411 define float @testfloatsgt(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
412 ; CHECK-LABEL: testfloatsgt
413 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
414 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
415 entry:
416 %cmp1 = fcmp oeq float %c3, %c4
417 %cmp3tmp = fcmp oeq float %c1, %c2
418 %cmp3 = icmp sgt i1 %cmp3tmp, %cmp1
419 br i1 %cmp3, label %iftrue, label %iffalse
420 iftrue:
421 ret float %a1
422 iffalse:
423 ret float %a2
424 }
425
426 define float @testfloatugt(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
427 ; CHECK-LABEL: testfloatugt
428 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
429 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
430 entry:
431 %cmp1 = fcmp oeq float %c3, %c4
432 %cmp3tmp = fcmp oeq float %c1, %c2
433 %cmp3 = icmp ugt i1 %cmp3tmp, %cmp1
434 br i1 %cmp3, label %iftrue, label %iffalse
435 iftrue:
436 ret float %a1
437 iffalse:
438 ret float %a2
439 }
440
441 define float @testfloatne(float %c1, float %c2, float %c3, float %c4, float %a1, float %a2) #0 {
442 ; CHECK-LABEL: testfloatne
443 ; CHECK: creqv [[REG:[0-9]+]], 6, 2
444 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
445 entry:
446 %cmp1 = fcmp oeq float %c3, %c4
447 %cmp3tmp = fcmp oeq float %c1, %c2
448 %cmp3 = icmp ne i1 %cmp3tmp, %cmp1
449 br i1 %cmp3, label %iftrue, label %iffalse
450 iftrue:
451 ret float %a1
452 iffalse:
453 ret float %a2
454 }
455
456 define double @testdoubleslt(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
457 ; CHECK-LABEL: testdoubleslt
458 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
459 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
460 entry:
461 %cmp1 = fcmp oeq double %c3, %c4
462 %cmp3tmp = fcmp oeq double %c1, %c2
463 %cmp3 = icmp slt i1 %cmp3tmp, %cmp1
464 br i1 %cmp3, label %iftrue, label %iffalse
465 iftrue:
466 ret double %a1
467 iffalse:
468 ret double %a2
469 }
470
471 define double @testdoubleult(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
472 ; CHECK-LABEL: testdoubleult:
473 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
474 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
475 entry:
476 %cmp1 = fcmp oeq double %c3, %c4
477 %cmp3tmp = fcmp oeq double %c1, %c2
478 %cmp3 = icmp ult i1 %cmp3tmp, %cmp1
479 br i1 %cmp3, label %iftrue, label %iffalse
480 iftrue:
481 ret double %a1
482 iffalse:
483 ret double %a2
484 }
485
486 define double @testdoublesle(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
487 ; CHECK-LABEL: testdoublesle
488 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
489 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
490 entry:
491 %cmp1 = fcmp oeq double %c3, %c4
492 %cmp3tmp = fcmp oeq double %c1, %c2
493 %cmp3 = icmp sle i1 %cmp3tmp, %cmp1
494 br i1 %cmp3, label %iftrue, label %iffalse
495 iftrue:
496 ret double %a1
497 iffalse:
498 ret double %a2
499 }
500
501 define double @testdoubleule(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
502 ; CHECK-LABEL: testdoubleule:
503 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
504 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
505 entry:
506 %cmp1 = fcmp oeq double %c3, %c4
507 %cmp3tmp = fcmp oeq double %c1, %c2
508 %cmp3 = icmp ule i1 %cmp3tmp, %cmp1
509 br i1 %cmp3, label %iftrue, label %iffalse
510 iftrue:
511 ret double %a1
512 iffalse:
513 ret double %a2
514 }
515
516 define double @testdoubleeq(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
517 ; CHECK-LABEL: testdoubleeq
518 ; CHECK: crxor [[REG:[0-9]+]], 6, 2
519 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
520 entry:
521 %cmp1 = fcmp oeq double %c3, %c4
522 %cmp3tmp = fcmp oeq double %c1, %c2
523 %cmp3 = icmp eq i1 %cmp3tmp, %cmp1
524 br i1 %cmp3, label %iftrue, label %iffalse
525 iftrue:
526 ret double %a1
527 iffalse:
528 ret double %a2
529 }
530
531 define double @testdoublesge(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
532 ; CHECK-LABEL: testdoublesge
533 ; CHECK: crandc [[REG:[0-9]+]], 6, 2
534 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
535 entry:
536 %cmp1 = fcmp oeq double %c3, %c4
537 %cmp3tmp = fcmp oeq double %c1, %c2
538 %cmp3 = icmp sge i1 %cmp3tmp, %cmp1
539 br i1 %cmp3, label %iftrue, label %iffalse
540 iftrue:
541 ret double %a1
542 iffalse:
543 ret double %a2
544 }
545
546 define double @testdoubleuge(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
547 ; CHECK-LABEL: testdoubleuge
548 ; CHECK: crandc [[REG:[0-9]+]], 2, 6
549 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
550 entry:
551 %cmp1 = fcmp oeq double %c3, %c4
552 %cmp3tmp = fcmp oeq double %c1, %c2
553 %cmp3 = icmp uge i1 %cmp3tmp, %cmp1
554 br i1 %cmp3, label %iftrue, label %iffalse
555 iftrue:
556 ret double %a1
557 iffalse:
558 ret double %a2
559 }
560
561 define double @testdoublesgt(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
562 ; CHECK-LABEL: testdoublesgt:
563 ; CHECK: crorc [[REG:[0-9]+]], 6, 2
564 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
565 entry:
566 %cmp1 = fcmp oeq double %c3, %c4
567 %cmp3tmp = fcmp oeq double %c1, %c2
568 %cmp3 = icmp sgt i1 %cmp3tmp, %cmp1
569 br i1 %cmp3, label %iftrue, label %iffalse
570 iftrue:
571 ret double %a1
572 iffalse:
573 ret double %a2
574 }
575
576 define double @testdoubleugt(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
577 ; CHECK-LABEL: testdoubleugt
578 ; CHECK: crorc [[REG:[0-9]+]], 2, 6
579 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
580 entry:
581 %cmp1 = fcmp oeq double %c3, %c4
582 %cmp3tmp = fcmp oeq double %c1, %c2
583 %cmp3 = icmp ugt i1 %cmp3tmp, %cmp1
584 br i1 %cmp3, label %iftrue, label %iffalse
585 iftrue:
586 ret double %a1
587 iffalse:
588 ret double %a2
589 }
590
591 define double @testdoublene(double %c1, double %c2, double %c3, double %c4, double %a1, double %a2) #0 {
592 ; CHECK-LABEL: testdoublene
593 ; CHECK: creqv [[REG:[0-9]+]], 6, 2
594 ; CHECK: bc 12, [[REG]], {{\.[a-zA-Z0-9_]+}}
595 entry:
596 %cmp1 = fcmp oeq double %c3, %c4
597 %cmp3tmp = fcmp oeq double %c1, %c2
598 %cmp3 = icmp ne i1 %cmp3tmp, %cmp1
599 br i1 %cmp3, label %iftrue, label %iffalse
600 iftrue:
601 ret double %a1
602 iffalse:
603 ret double %a2
604 }