1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
3 ; RUN: < %s -mtriple=powerpc64-unknown-linux -mcpu=pwr8 | FileCheck %s \
4 ; RUN: -check-prefix=P8
5 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
6 ; RUN: < %s -mtriple=powerpc64le-unknown-linux -mcpu=pwr9 \
7 ; RUN: | FileCheck %s -check-prefix=P9
8 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
9 ; RUN: < %s -mtriple=powerpc64le-unknown-linux -mcpu=pwr8 -mattr=-vsx | \
10 ; RUN: FileCheck %s -check-prefix=NOVSX
12 define i32 @test_f32_oeq_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
13 ; P8-LABEL: test_f32_oeq_q:
15 ; P8-NEXT: fcmpu cr0, f1, f2
16 ; P8-NEXT: iseleq r3, r3, r4
19 ; P9-LABEL: test_f32_oeq_q:
21 ; P9-NEXT: fcmpu cr0, f1, f2
22 ; P9-NEXT: iseleq r3, r3, r4
25 ; NOVSX-LABEL: test_f32_oeq_q:
27 ; NOVSX-NEXT: fcmpu cr0, f1, f2
28 ; NOVSX-NEXT: iseleq r3, r3, r4
30 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
31 float %f1, float %f2, metadata !"oeq",
32 metadata !"fpexcept.strict") #0
33 %res = select i1 %cond, i32 %a, i32 %b
37 define i32 @test_f32_ogt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
38 ; P8-LABEL: test_f32_ogt_q:
40 ; P8-NEXT: fcmpu cr0, f1, f2
41 ; P8-NEXT: iselgt r3, r3, r4
44 ; P9-LABEL: test_f32_ogt_q:
46 ; P9-NEXT: fcmpu cr0, f1, f2
47 ; P9-NEXT: iselgt r3, r3, r4
50 ; NOVSX-LABEL: test_f32_ogt_q:
52 ; NOVSX-NEXT: fcmpu cr0, f1, f2
53 ; NOVSX-NEXT: iselgt r3, r3, r4
55 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
56 float %f1, float %f2, metadata !"ogt",
57 metadata !"fpexcept.strict") #0
58 %res = select i1 %cond, i32 %a, i32 %b
62 define i32 @test_f32_oge_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
63 ; P8-LABEL: test_f32_oge_q:
65 ; P8-NEXT: fcmpu cr0, f1, f2
66 ; P8-NEXT: crnor 4*cr5+lt, un, lt
67 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
70 ; P9-LABEL: test_f32_oge_q:
72 ; P9-NEXT: fcmpu cr0, f1, f2
73 ; P9-NEXT: crnor 4*cr5+lt, un, lt
74 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
77 ; NOVSX-LABEL: test_f32_oge_q:
79 ; NOVSX-NEXT: fcmpu cr0, f1, f2
80 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
81 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
83 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
84 float %f1, float %f2, metadata !"oge",
85 metadata !"fpexcept.strict") #0
86 %res = select i1 %cond, i32 %a, i32 %b
90 define i32 @test_f32_olt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
91 ; P8-LABEL: test_f32_olt_q:
93 ; P8-NEXT: fcmpu cr0, f1, f2
94 ; P8-NEXT: isellt r3, r3, r4
97 ; P9-LABEL: test_f32_olt_q:
99 ; P9-NEXT: fcmpu cr0, f1, f2
100 ; P9-NEXT: isellt r3, r3, r4
103 ; NOVSX-LABEL: test_f32_olt_q:
105 ; NOVSX-NEXT: fcmpu cr0, f1, f2
106 ; NOVSX-NEXT: isellt r3, r3, r4
108 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
109 float %f1, float %f2, metadata !"olt",
110 metadata !"fpexcept.strict") #0
111 %res = select i1 %cond, i32 %a, i32 %b
115 define i32 @test_f32_ole_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
116 ; P8-LABEL: test_f32_ole_q:
118 ; P8-NEXT: fcmpu cr0, f1, f2
119 ; P8-NEXT: crnor 4*cr5+lt, un, gt
120 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
123 ; P9-LABEL: test_f32_ole_q:
125 ; P9-NEXT: fcmpu cr0, f1, f2
126 ; P9-NEXT: crnor 4*cr5+lt, un, gt
127 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
130 ; NOVSX-LABEL: test_f32_ole_q:
132 ; NOVSX-NEXT: fcmpu cr0, f1, f2
133 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
134 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
136 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
137 float %f1, float %f2, metadata !"ole",
138 metadata !"fpexcept.strict") #0
139 %res = select i1 %cond, i32 %a, i32 %b
143 define i32 @test_f32_one_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
144 ; P8-LABEL: test_f32_one_q:
146 ; P8-NEXT: fcmpu cr0, f1, f2
147 ; P8-NEXT: crnor 4*cr5+lt, un, eq
148 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
151 ; P9-LABEL: test_f32_one_q:
153 ; P9-NEXT: fcmpu cr0, f1, f2
154 ; P9-NEXT: crnor 4*cr5+lt, un, eq
155 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
158 ; NOVSX-LABEL: test_f32_one_q:
160 ; NOVSX-NEXT: fcmpu cr0, f1, f2
161 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
162 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
164 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
165 float %f1, float %f2, metadata !"one",
166 metadata !"fpexcept.strict") #0
167 %res = select i1 %cond, i32 %a, i32 %b
171 define i32 @test_f32_ord_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
172 ; P8-LABEL: test_f32_ord_q:
174 ; P8-NEXT: fcmpu cr0, f1, f2
175 ; P8-NEXT: isel r3, r4, r3, un
178 ; P9-LABEL: test_f32_ord_q:
180 ; P9-NEXT: fcmpu cr0, f1, f2
181 ; P9-NEXT: isel r3, r4, r3, un
184 ; NOVSX-LABEL: test_f32_ord_q:
186 ; NOVSX-NEXT: fcmpu cr0, f1, f2
187 ; NOVSX-NEXT: isel r3, r4, r3, un
189 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
190 float %f1, float %f2, metadata !"ord",
191 metadata !"fpexcept.strict") #0
192 %res = select i1 %cond, i32 %a, i32 %b
196 define i32 @test_f32_ueq_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
197 ; P8-LABEL: test_f32_ueq_q:
199 ; P8-NEXT: fcmpu cr0, f1, f2
200 ; P8-NEXT: cror 4*cr5+lt, eq, un
201 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
204 ; P9-LABEL: test_f32_ueq_q:
206 ; P9-NEXT: fcmpu cr0, f1, f2
207 ; P9-NEXT: cror 4*cr5+lt, eq, un
208 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
211 ; NOVSX-LABEL: test_f32_ueq_q:
213 ; NOVSX-NEXT: fcmpu cr0, f1, f2
214 ; NOVSX-NEXT: cror 4*cr5+lt, eq, un
215 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
217 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
218 float %f1, float %f2, metadata !"ueq",
219 metadata !"fpexcept.strict") #0
220 %res = select i1 %cond, i32 %a, i32 %b
224 define i32 @test_f32_ugt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
225 ; P8-LABEL: test_f32_ugt_q:
227 ; P8-NEXT: fcmpu cr0, f1, f2
228 ; P8-NEXT: cror 4*cr5+lt, gt, un
229 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
232 ; P9-LABEL: test_f32_ugt_q:
234 ; P9-NEXT: fcmpu cr0, f1, f2
235 ; P9-NEXT: cror 4*cr5+lt, gt, un
236 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
239 ; NOVSX-LABEL: test_f32_ugt_q:
241 ; NOVSX-NEXT: fcmpu cr0, f1, f2
242 ; NOVSX-NEXT: cror 4*cr5+lt, gt, un
243 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
245 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
246 float %f1, float %f2, metadata !"ugt",
247 metadata !"fpexcept.strict") #0
248 %res = select i1 %cond, i32 %a, i32 %b
252 define i32 @test_f32_uge_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
253 ; P8-LABEL: test_f32_uge_q:
255 ; P8-NEXT: fcmpu cr0, f1, f2
256 ; P8-NEXT: isellt r3, r4, r3
259 ; P9-LABEL: test_f32_uge_q:
261 ; P9-NEXT: fcmpu cr0, f1, f2
262 ; P9-NEXT: isellt r3, r4, r3
265 ; NOVSX-LABEL: test_f32_uge_q:
267 ; NOVSX-NEXT: fcmpu cr0, f1, f2
268 ; NOVSX-NEXT: isellt r3, r4, r3
270 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
271 float %f1, float %f2, metadata !"uge",
272 metadata !"fpexcept.strict") #0
273 %res = select i1 %cond, i32 %a, i32 %b
277 define i32 @test_f32_ult_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
278 ; P8-LABEL: test_f32_ult_q:
280 ; P8-NEXT: fcmpu cr0, f1, f2
281 ; P8-NEXT: cror 4*cr5+lt, lt, un
282 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
285 ; P9-LABEL: test_f32_ult_q:
287 ; P9-NEXT: fcmpu cr0, f1, f2
288 ; P9-NEXT: cror 4*cr5+lt, lt, un
289 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
292 ; NOVSX-LABEL: test_f32_ult_q:
294 ; NOVSX-NEXT: fcmpu cr0, f1, f2
295 ; NOVSX-NEXT: cror 4*cr5+lt, lt, un
296 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
298 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
299 float %f1, float %f2, metadata !"ult",
300 metadata !"fpexcept.strict") #0
301 %res = select i1 %cond, i32 %a, i32 %b
305 define i32 @test_f32_ule_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
306 ; P8-LABEL: test_f32_ule_q:
308 ; P8-NEXT: fcmpu cr0, f1, f2
309 ; P8-NEXT: iselgt r3, r4, r3
312 ; P9-LABEL: test_f32_ule_q:
314 ; P9-NEXT: fcmpu cr0, f1, f2
315 ; P9-NEXT: iselgt r3, r4, r3
318 ; NOVSX-LABEL: test_f32_ule_q:
320 ; NOVSX-NEXT: fcmpu cr0, f1, f2
321 ; NOVSX-NEXT: iselgt r3, r4, r3
323 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
324 float %f1, float %f2, metadata !"ule",
325 metadata !"fpexcept.strict") #0
326 %res = select i1 %cond, i32 %a, i32 %b
330 define i32 @test_f32_une_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
331 ; P8-LABEL: test_f32_une_q:
333 ; P8-NEXT: fcmpu cr0, f1, f2
334 ; P8-NEXT: iseleq r3, r4, r3
337 ; P9-LABEL: test_f32_une_q:
339 ; P9-NEXT: fcmpu cr0, f1, f2
340 ; P9-NEXT: iseleq r3, r4, r3
343 ; NOVSX-LABEL: test_f32_une_q:
345 ; NOVSX-NEXT: fcmpu cr0, f1, f2
346 ; NOVSX-NEXT: iseleq r3, r4, r3
348 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
349 float %f1, float %f2, metadata !"une",
350 metadata !"fpexcept.strict") #0
351 %res = select i1 %cond, i32 %a, i32 %b
355 define i32 @test_f32_uno_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
356 ; P8-LABEL: test_f32_uno_q:
358 ; P8-NEXT: fcmpu cr0, f1, f2
359 ; P8-NEXT: isel r3, r3, r4, un
362 ; P9-LABEL: test_f32_uno_q:
364 ; P9-NEXT: fcmpu cr0, f1, f2
365 ; P9-NEXT: isel r3, r3, r4, un
368 ; NOVSX-LABEL: test_f32_uno_q:
370 ; NOVSX-NEXT: fcmpu cr0, f1, f2
371 ; NOVSX-NEXT: isel r3, r3, r4, un
373 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
374 float %f1, float %f2, metadata !"uno",
375 metadata !"fpexcept.strict") #0
376 %res = select i1 %cond, i32 %a, i32 %b
380 define i32 @test_f64_oeq_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
381 ; P8-LABEL: test_f64_oeq_q:
383 ; P8-NEXT: fcmpu cr0, f1, f2
384 ; P8-NEXT: iseleq r3, r3, r4
387 ; P9-LABEL: test_f64_oeq_q:
389 ; P9-NEXT: fcmpu cr0, f1, f2
390 ; P9-NEXT: iseleq r3, r3, r4
393 ; NOVSX-LABEL: test_f64_oeq_q:
395 ; NOVSX-NEXT: fcmpu cr0, f1, f2
396 ; NOVSX-NEXT: iseleq r3, r3, r4
398 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
399 double %f1, double %f2, metadata !"oeq",
400 metadata !"fpexcept.strict") #0
401 %res = select i1 %cond, i32 %a, i32 %b
405 define i32 @test_f64_ogt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
406 ; P8-LABEL: test_f64_ogt_q:
408 ; P8-NEXT: fcmpu cr0, f1, f2
409 ; P8-NEXT: iselgt r3, r3, r4
412 ; P9-LABEL: test_f64_ogt_q:
414 ; P9-NEXT: fcmpu cr0, f1, f2
415 ; P9-NEXT: iselgt r3, r3, r4
418 ; NOVSX-LABEL: test_f64_ogt_q:
420 ; NOVSX-NEXT: fcmpu cr0, f1, f2
421 ; NOVSX-NEXT: iselgt r3, r3, r4
423 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
424 double %f1, double %f2, metadata !"ogt",
425 metadata !"fpexcept.strict") #0
426 %res = select i1 %cond, i32 %a, i32 %b
430 define i32 @test_f64_oge_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
431 ; P8-LABEL: test_f64_oge_q:
433 ; P8-NEXT: fcmpu cr0, f1, f2
434 ; P8-NEXT: crnor 4*cr5+lt, un, lt
435 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
438 ; P9-LABEL: test_f64_oge_q:
440 ; P9-NEXT: fcmpu cr0, f1, f2
441 ; P9-NEXT: crnor 4*cr5+lt, un, lt
442 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
445 ; NOVSX-LABEL: test_f64_oge_q:
447 ; NOVSX-NEXT: fcmpu cr0, f1, f2
448 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
449 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
451 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
452 double %f1, double %f2, metadata !"oge",
453 metadata !"fpexcept.strict") #0
454 %res = select i1 %cond, i32 %a, i32 %b
458 define i32 @test_f64_olt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
459 ; P8-LABEL: test_f64_olt_q:
461 ; P8-NEXT: fcmpu cr0, f1, f2
462 ; P8-NEXT: isellt r3, r3, r4
465 ; P9-LABEL: test_f64_olt_q:
467 ; P9-NEXT: fcmpu cr0, f1, f2
468 ; P9-NEXT: isellt r3, r3, r4
471 ; NOVSX-LABEL: test_f64_olt_q:
473 ; NOVSX-NEXT: fcmpu cr0, f1, f2
474 ; NOVSX-NEXT: isellt r3, r3, r4
476 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
477 double %f1, double %f2, metadata !"olt",
478 metadata !"fpexcept.strict") #0
479 %res = select i1 %cond, i32 %a, i32 %b
483 define i32 @test_f64_ole_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
484 ; P8-LABEL: test_f64_ole_q:
486 ; P8-NEXT: fcmpu cr0, f1, f2
487 ; P8-NEXT: crnor 4*cr5+lt, un, gt
488 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
491 ; P9-LABEL: test_f64_ole_q:
493 ; P9-NEXT: fcmpu cr0, f1, f2
494 ; P9-NEXT: crnor 4*cr5+lt, un, gt
495 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
498 ; NOVSX-LABEL: test_f64_ole_q:
500 ; NOVSX-NEXT: fcmpu cr0, f1, f2
501 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
502 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
504 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
505 double %f1, double %f2, metadata !"ole",
506 metadata !"fpexcept.strict") #0
507 %res = select i1 %cond, i32 %a, i32 %b
511 define i32 @test_f64_one_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
512 ; P8-LABEL: test_f64_one_q:
514 ; P8-NEXT: fcmpu cr0, f1, f2
515 ; P8-NEXT: crnor 4*cr5+lt, un, eq
516 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
519 ; P9-LABEL: test_f64_one_q:
521 ; P9-NEXT: fcmpu cr0, f1, f2
522 ; P9-NEXT: crnor 4*cr5+lt, un, eq
523 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
526 ; NOVSX-LABEL: test_f64_one_q:
528 ; NOVSX-NEXT: fcmpu cr0, f1, f2
529 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
530 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
532 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
533 double %f1, double %f2, metadata !"one",
534 metadata !"fpexcept.strict") #0
535 %res = select i1 %cond, i32 %a, i32 %b
539 define i32 @test_f64_ord_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
540 ; P8-LABEL: test_f64_ord_q:
542 ; P8-NEXT: fcmpu cr0, f1, f2
543 ; P8-NEXT: isel r3, r4, r3, un
546 ; P9-LABEL: test_f64_ord_q:
548 ; P9-NEXT: fcmpu cr0, f1, f2
549 ; P9-NEXT: isel r3, r4, r3, un
552 ; NOVSX-LABEL: test_f64_ord_q:
554 ; NOVSX-NEXT: fcmpu cr0, f1, f2
555 ; NOVSX-NEXT: isel r3, r4, r3, un
557 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
558 double %f1, double %f2, metadata !"ord",
559 metadata !"fpexcept.strict") #0
560 %res = select i1 %cond, i32 %a, i32 %b
564 define i32 @test_f64_ueq_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
565 ; P8-LABEL: test_f64_ueq_q:
567 ; P8-NEXT: fcmpu cr0, f1, f2
568 ; P8-NEXT: cror 4*cr5+lt, eq, un
569 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
572 ; P9-LABEL: test_f64_ueq_q:
574 ; P9-NEXT: fcmpu cr0, f1, f2
575 ; P9-NEXT: cror 4*cr5+lt, eq, un
576 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
579 ; NOVSX-LABEL: test_f64_ueq_q:
581 ; NOVSX-NEXT: fcmpu cr0, f1, f2
582 ; NOVSX-NEXT: cror 4*cr5+lt, eq, un
583 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
585 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
586 double %f1, double %f2, metadata !"ueq",
587 metadata !"fpexcept.strict") #0
588 %res = select i1 %cond, i32 %a, i32 %b
592 define i32 @test_f64_ugt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
593 ; P8-LABEL: test_f64_ugt_q:
595 ; P8-NEXT: fcmpu cr0, f1, f2
596 ; P8-NEXT: cror 4*cr5+lt, gt, un
597 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
600 ; P9-LABEL: test_f64_ugt_q:
602 ; P9-NEXT: fcmpu cr0, f1, f2
603 ; P9-NEXT: cror 4*cr5+lt, gt, un
604 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
607 ; NOVSX-LABEL: test_f64_ugt_q:
609 ; NOVSX-NEXT: fcmpu cr0, f1, f2
610 ; NOVSX-NEXT: cror 4*cr5+lt, gt, un
611 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
613 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
614 double %f1, double %f2, metadata !"ugt",
615 metadata !"fpexcept.strict") #0
616 %res = select i1 %cond, i32 %a, i32 %b
620 define i32 @test_f64_uge_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
621 ; P8-LABEL: test_f64_uge_q:
623 ; P8-NEXT: fcmpu cr0, f1, f2
624 ; P8-NEXT: isellt r3, r4, r3
627 ; P9-LABEL: test_f64_uge_q:
629 ; P9-NEXT: fcmpu cr0, f1, f2
630 ; P9-NEXT: isellt r3, r4, r3
633 ; NOVSX-LABEL: test_f64_uge_q:
635 ; NOVSX-NEXT: fcmpu cr0, f1, f2
636 ; NOVSX-NEXT: isellt r3, r4, r3
638 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
639 double %f1, double %f2, metadata !"uge",
640 metadata !"fpexcept.strict") #0
641 %res = select i1 %cond, i32 %a, i32 %b
645 define i32 @test_f64_ult_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
646 ; P8-LABEL: test_f64_ult_q:
648 ; P8-NEXT: fcmpu cr0, f1, f2
649 ; P8-NEXT: cror 4*cr5+lt, lt, un
650 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
653 ; P9-LABEL: test_f64_ult_q:
655 ; P9-NEXT: fcmpu cr0, f1, f2
656 ; P9-NEXT: cror 4*cr5+lt, lt, un
657 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
660 ; NOVSX-LABEL: test_f64_ult_q:
662 ; NOVSX-NEXT: fcmpu cr0, f1, f2
663 ; NOVSX-NEXT: cror 4*cr5+lt, lt, un
664 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
666 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
667 double %f1, double %f2, metadata !"ult",
668 metadata !"fpexcept.strict") #0
669 %res = select i1 %cond, i32 %a, i32 %b
673 define i32 @test_f64_ule_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
674 ; P8-LABEL: test_f64_ule_q:
676 ; P8-NEXT: fcmpu cr0, f1, f2
677 ; P8-NEXT: iselgt r3, r4, r3
680 ; P9-LABEL: test_f64_ule_q:
682 ; P9-NEXT: fcmpu cr0, f1, f2
683 ; P9-NEXT: iselgt r3, r4, r3
686 ; NOVSX-LABEL: test_f64_ule_q:
688 ; NOVSX-NEXT: fcmpu cr0, f1, f2
689 ; NOVSX-NEXT: iselgt r3, r4, r3
691 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
692 double %f1, double %f2, metadata !"ule",
693 metadata !"fpexcept.strict") #0
694 %res = select i1 %cond, i32 %a, i32 %b
698 define i32 @test_f64_une_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
699 ; P8-LABEL: test_f64_une_q:
701 ; P8-NEXT: fcmpu cr0, f1, f2
702 ; P8-NEXT: iseleq r3, r4, r3
705 ; P9-LABEL: test_f64_une_q:
707 ; P9-NEXT: fcmpu cr0, f1, f2
708 ; P9-NEXT: iseleq r3, r4, r3
711 ; NOVSX-LABEL: test_f64_une_q:
713 ; NOVSX-NEXT: fcmpu cr0, f1, f2
714 ; NOVSX-NEXT: iseleq r3, r4, r3
716 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
717 double %f1, double %f2, metadata !"une",
718 metadata !"fpexcept.strict") #0
719 %res = select i1 %cond, i32 %a, i32 %b
723 define i32 @test_f64_uno_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
724 ; P8-LABEL: test_f64_uno_q:
726 ; P8-NEXT: fcmpu cr0, f1, f2
727 ; P8-NEXT: isel r3, r3, r4, un
730 ; P9-LABEL: test_f64_uno_q:
732 ; P9-NEXT: fcmpu cr0, f1, f2
733 ; P9-NEXT: isel r3, r3, r4, un
736 ; NOVSX-LABEL: test_f64_uno_q:
738 ; NOVSX-NEXT: fcmpu cr0, f1, f2
739 ; NOVSX-NEXT: isel r3, r3, r4, un
741 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
742 double %f1, double %f2, metadata !"uno",
743 metadata !"fpexcept.strict") #0
744 %res = select i1 %cond, i32 %a, i32 %b
748 define i32 @test_f32_oeq_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
749 ; P8-LABEL: test_f32_oeq_s:
751 ; P8-NEXT: fcmpo cr0, f1, f2
752 ; P8-NEXT: iseleq r3, r3, r4
755 ; P9-LABEL: test_f32_oeq_s:
757 ; P9-NEXT: fcmpo cr0, f1, f2
758 ; P9-NEXT: iseleq r3, r3, r4
761 ; NOVSX-LABEL: test_f32_oeq_s:
763 ; NOVSX-NEXT: fcmpo cr0, f1, f2
764 ; NOVSX-NEXT: iseleq r3, r3, r4
766 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
767 float %f1, float %f2, metadata !"oeq",
768 metadata !"fpexcept.strict") #0
769 %res = select i1 %cond, i32 %a, i32 %b
773 define i32 @test_f32_ogt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
774 ; P8-LABEL: test_f32_ogt_s:
776 ; P8-NEXT: fcmpo cr0, f1, f2
777 ; P8-NEXT: iselgt r3, r3, r4
780 ; P9-LABEL: test_f32_ogt_s:
782 ; P9-NEXT: fcmpo cr0, f1, f2
783 ; P9-NEXT: iselgt r3, r3, r4
786 ; NOVSX-LABEL: test_f32_ogt_s:
788 ; NOVSX-NEXT: fcmpo cr0, f1, f2
789 ; NOVSX-NEXT: iselgt r3, r3, r4
791 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
792 float %f1, float %f2, metadata !"ogt",
793 metadata !"fpexcept.strict") #0
794 %res = select i1 %cond, i32 %a, i32 %b
798 define i32 @test_f32_oge_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
799 ; P8-LABEL: test_f32_oge_s:
801 ; P8-NEXT: fcmpo cr0, f1, f2
802 ; P8-NEXT: crnor 4*cr5+lt, un, lt
803 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
806 ; P9-LABEL: test_f32_oge_s:
808 ; P9-NEXT: fcmpo cr0, f1, f2
809 ; P9-NEXT: crnor 4*cr5+lt, un, lt
810 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
813 ; NOVSX-LABEL: test_f32_oge_s:
815 ; NOVSX-NEXT: fcmpo cr0, f1, f2
816 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
817 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
819 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
820 float %f1, float %f2, metadata !"oge",
821 metadata !"fpexcept.strict") #0
822 %res = select i1 %cond, i32 %a, i32 %b
826 define i32 @test_f32_olt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
827 ; P8-LABEL: test_f32_olt_s:
829 ; P8-NEXT: fcmpo cr0, f1, f2
830 ; P8-NEXT: isellt r3, r3, r4
833 ; P9-LABEL: test_f32_olt_s:
835 ; P9-NEXT: fcmpo cr0, f1, f2
836 ; P9-NEXT: isellt r3, r3, r4
839 ; NOVSX-LABEL: test_f32_olt_s:
841 ; NOVSX-NEXT: fcmpo cr0, f1, f2
842 ; NOVSX-NEXT: isellt r3, r3, r4
844 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
845 float %f1, float %f2, metadata !"olt",
846 metadata !"fpexcept.strict") #0
847 %res = select i1 %cond, i32 %a, i32 %b
851 define i32 @test_f32_ole_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
852 ; P8-LABEL: test_f32_ole_s:
854 ; P8-NEXT: fcmpo cr0, f1, f2
855 ; P8-NEXT: crnor 4*cr5+lt, un, gt
856 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
859 ; P9-LABEL: test_f32_ole_s:
861 ; P9-NEXT: fcmpo cr0, f1, f2
862 ; P9-NEXT: crnor 4*cr5+lt, un, gt
863 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
866 ; NOVSX-LABEL: test_f32_ole_s:
868 ; NOVSX-NEXT: fcmpo cr0, f1, f2
869 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
870 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
872 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
873 float %f1, float %f2, metadata !"ole",
874 metadata !"fpexcept.strict") #0
875 %res = select i1 %cond, i32 %a, i32 %b
879 define i32 @test_f32_one_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
880 ; P8-LABEL: test_f32_one_s:
882 ; P8-NEXT: fcmpo cr0, f1, f2
883 ; P8-NEXT: crnor 4*cr5+lt, un, eq
884 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
887 ; P9-LABEL: test_f32_one_s:
889 ; P9-NEXT: fcmpo cr0, f1, f2
890 ; P9-NEXT: crnor 4*cr5+lt, un, eq
891 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
894 ; NOVSX-LABEL: test_f32_one_s:
896 ; NOVSX-NEXT: fcmpo cr0, f1, f2
897 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
898 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
900 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
901 float %f1, float %f2, metadata !"one",
902 metadata !"fpexcept.strict") #0
903 %res = select i1 %cond, i32 %a, i32 %b
907 define i32 @test_f32_ord_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
908 ; P8-LABEL: test_f32_ord_s:
910 ; P8-NEXT: fcmpo cr0, f1, f2
911 ; P8-NEXT: isel r3, r4, r3, un
914 ; P9-LABEL: test_f32_ord_s:
916 ; P9-NEXT: fcmpo cr0, f1, f2
917 ; P9-NEXT: isel r3, r4, r3, un
920 ; NOVSX-LABEL: test_f32_ord_s:
922 ; NOVSX-NEXT: fcmpo cr0, f1, f2
923 ; NOVSX-NEXT: isel r3, r4, r3, un
925 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
926 float %f1, float %f2, metadata !"ord",
927 metadata !"fpexcept.strict") #0
928 %res = select i1 %cond, i32 %a, i32 %b
932 define i32 @test_f32_ueq_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
933 ; P8-LABEL: test_f32_ueq_s:
935 ; P8-NEXT: fcmpo cr0, f1, f2
936 ; P8-NEXT: cror 4*cr5+lt, eq, un
937 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
940 ; P9-LABEL: test_f32_ueq_s:
942 ; P9-NEXT: fcmpo cr0, f1, f2
943 ; P9-NEXT: cror 4*cr5+lt, eq, un
944 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
947 ; NOVSX-LABEL: test_f32_ueq_s:
949 ; NOVSX-NEXT: fcmpo cr0, f1, f2
950 ; NOVSX-NEXT: cror 4*cr5+lt, eq, un
951 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
953 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
954 float %f1, float %f2, metadata !"ueq",
955 metadata !"fpexcept.strict") #0
956 %res = select i1 %cond, i32 %a, i32 %b
960 define i32 @test_f32_ugt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
961 ; P8-LABEL: test_f32_ugt_s:
963 ; P8-NEXT: fcmpo cr0, f1, f2
964 ; P8-NEXT: cror 4*cr5+lt, gt, un
965 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
968 ; P9-LABEL: test_f32_ugt_s:
970 ; P9-NEXT: fcmpo cr0, f1, f2
971 ; P9-NEXT: cror 4*cr5+lt, gt, un
972 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
975 ; NOVSX-LABEL: test_f32_ugt_s:
977 ; NOVSX-NEXT: fcmpo cr0, f1, f2
978 ; NOVSX-NEXT: cror 4*cr5+lt, gt, un
979 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
981 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
982 float %f1, float %f2, metadata !"ugt",
983 metadata !"fpexcept.strict") #0
984 %res = select i1 %cond, i32 %a, i32 %b
988 define i32 @test_f32_uge_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
989 ; P8-LABEL: test_f32_uge_s:
991 ; P8-NEXT: fcmpo cr0, f1, f2
992 ; P8-NEXT: isellt r3, r4, r3
995 ; P9-LABEL: test_f32_uge_s:
997 ; P9-NEXT: fcmpo cr0, f1, f2
998 ; P9-NEXT: isellt r3, r4, r3
1001 ; NOVSX-LABEL: test_f32_uge_s:
1003 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1004 ; NOVSX-NEXT: isellt r3, r4, r3
1006 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
1007 float %f1, float %f2, metadata !"uge",
1008 metadata !"fpexcept.strict") #0
1009 %res = select i1 %cond, i32 %a, i32 %b
1013 define i32 @test_f32_ult_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
1014 ; P8-LABEL: test_f32_ult_s:
1016 ; P8-NEXT: fcmpo cr0, f1, f2
1017 ; P8-NEXT: cror 4*cr5+lt, lt, un
1018 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1021 ; P9-LABEL: test_f32_ult_s:
1023 ; P9-NEXT: fcmpo cr0, f1, f2
1024 ; P9-NEXT: cror 4*cr5+lt, lt, un
1025 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1028 ; NOVSX-LABEL: test_f32_ult_s:
1030 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1031 ; NOVSX-NEXT: cror 4*cr5+lt, lt, un
1032 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1034 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
1035 float %f1, float %f2, metadata !"ult",
1036 metadata !"fpexcept.strict") #0
1037 %res = select i1 %cond, i32 %a, i32 %b
1041 define i32 @test_f32_ule_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
1042 ; P8-LABEL: test_f32_ule_s:
1044 ; P8-NEXT: fcmpo cr0, f1, f2
1045 ; P8-NEXT: iselgt r3, r4, r3
1048 ; P9-LABEL: test_f32_ule_s:
1050 ; P9-NEXT: fcmpo cr0, f1, f2
1051 ; P9-NEXT: iselgt r3, r4, r3
1054 ; NOVSX-LABEL: test_f32_ule_s:
1056 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1057 ; NOVSX-NEXT: iselgt r3, r4, r3
1059 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
1060 float %f1, float %f2, metadata !"ule",
1061 metadata !"fpexcept.strict") #0
1062 %res = select i1 %cond, i32 %a, i32 %b
1066 define i32 @test_f32_une_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
1067 ; P8-LABEL: test_f32_une_s:
1069 ; P8-NEXT: fcmpo cr0, f1, f2
1070 ; P8-NEXT: iseleq r3, r4, r3
1073 ; P9-LABEL: test_f32_une_s:
1075 ; P9-NEXT: fcmpo cr0, f1, f2
1076 ; P9-NEXT: iseleq r3, r4, r3
1079 ; NOVSX-LABEL: test_f32_une_s:
1081 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1082 ; NOVSX-NEXT: iseleq r3, r4, r3
1084 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
1085 float %f1, float %f2, metadata !"une",
1086 metadata !"fpexcept.strict") #0
1087 %res = select i1 %cond, i32 %a, i32 %b
1091 define i32 @test_f32_uno_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
1092 ; P8-LABEL: test_f32_uno_s:
1094 ; P8-NEXT: fcmpo cr0, f1, f2
1095 ; P8-NEXT: isel r3, r3, r4, un
1098 ; P9-LABEL: test_f32_uno_s:
1100 ; P9-NEXT: fcmpo cr0, f1, f2
1101 ; P9-NEXT: isel r3, r3, r4, un
1104 ; NOVSX-LABEL: test_f32_uno_s:
1106 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1107 ; NOVSX-NEXT: isel r3, r3, r4, un
1109 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
1110 float %f1, float %f2, metadata !"uno",
1111 metadata !"fpexcept.strict") #0
1112 %res = select i1 %cond, i32 %a, i32 %b
1116 define i32 @test_f64_oeq_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1117 ; P8-LABEL: test_f64_oeq_s:
1119 ; P8-NEXT: fcmpo cr0, f1, f2
1120 ; P8-NEXT: iseleq r3, r3, r4
1123 ; P9-LABEL: test_f64_oeq_s:
1125 ; P9-NEXT: fcmpo cr0, f1, f2
1126 ; P9-NEXT: iseleq r3, r3, r4
1129 ; NOVSX-LABEL: test_f64_oeq_s:
1131 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1132 ; NOVSX-NEXT: iseleq r3, r3, r4
1134 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1135 double %f1, double %f2, metadata !"oeq",
1136 metadata !"fpexcept.strict") #0
1137 %res = select i1 %cond, i32 %a, i32 %b
1141 define i32 @test_f64_ogt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1142 ; P8-LABEL: test_f64_ogt_s:
1144 ; P8-NEXT: fcmpo cr0, f1, f2
1145 ; P8-NEXT: iselgt r3, r3, r4
1148 ; P9-LABEL: test_f64_ogt_s:
1150 ; P9-NEXT: fcmpo cr0, f1, f2
1151 ; P9-NEXT: iselgt r3, r3, r4
1154 ; NOVSX-LABEL: test_f64_ogt_s:
1156 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1157 ; NOVSX-NEXT: iselgt r3, r3, r4
1159 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1160 double %f1, double %f2, metadata !"ogt",
1161 metadata !"fpexcept.strict") #0
1162 %res = select i1 %cond, i32 %a, i32 %b
1166 define i32 @test_f64_oge_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1167 ; P8-LABEL: test_f64_oge_s:
1169 ; P8-NEXT: fcmpo cr0, f1, f2
1170 ; P8-NEXT: crnor 4*cr5+lt, un, lt
1171 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1174 ; P9-LABEL: test_f64_oge_s:
1176 ; P9-NEXT: fcmpo cr0, f1, f2
1177 ; P9-NEXT: crnor 4*cr5+lt, un, lt
1178 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1181 ; NOVSX-LABEL: test_f64_oge_s:
1183 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1184 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
1185 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1187 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1188 double %f1, double %f2, metadata !"oge",
1189 metadata !"fpexcept.strict") #0
1190 %res = select i1 %cond, i32 %a, i32 %b
1194 define i32 @test_f64_olt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1195 ; P8-LABEL: test_f64_olt_s:
1197 ; P8-NEXT: fcmpo cr0, f1, f2
1198 ; P8-NEXT: isellt r3, r3, r4
1201 ; P9-LABEL: test_f64_olt_s:
1203 ; P9-NEXT: fcmpo cr0, f1, f2
1204 ; P9-NEXT: isellt r3, r3, r4
1207 ; NOVSX-LABEL: test_f64_olt_s:
1209 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1210 ; NOVSX-NEXT: isellt r3, r3, r4
1212 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1213 double %f1, double %f2, metadata !"olt",
1214 metadata !"fpexcept.strict") #0
1215 %res = select i1 %cond, i32 %a, i32 %b
1219 define i32 @test_f64_ole_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1220 ; P8-LABEL: test_f64_ole_s:
1222 ; P8-NEXT: fcmpo cr0, f1, f2
1223 ; P8-NEXT: crnor 4*cr5+lt, un, gt
1224 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1227 ; P9-LABEL: test_f64_ole_s:
1229 ; P9-NEXT: fcmpo cr0, f1, f2
1230 ; P9-NEXT: crnor 4*cr5+lt, un, gt
1231 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1234 ; NOVSX-LABEL: test_f64_ole_s:
1236 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1237 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
1238 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1240 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1241 double %f1, double %f2, metadata !"ole",
1242 metadata !"fpexcept.strict") #0
1243 %res = select i1 %cond, i32 %a, i32 %b
1247 define i32 @test_f64_one_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1248 ; P8-LABEL: test_f64_one_s:
1250 ; P8-NEXT: fcmpo cr0, f1, f2
1251 ; P8-NEXT: crnor 4*cr5+lt, un, eq
1252 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1255 ; P9-LABEL: test_f64_one_s:
1257 ; P9-NEXT: fcmpo cr0, f1, f2
1258 ; P9-NEXT: crnor 4*cr5+lt, un, eq
1259 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1262 ; NOVSX-LABEL: test_f64_one_s:
1264 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1265 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
1266 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1268 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1269 double %f1, double %f2, metadata !"one",
1270 metadata !"fpexcept.strict") #0
1271 %res = select i1 %cond, i32 %a, i32 %b
1275 define i32 @test_f64_ord_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1276 ; P8-LABEL: test_f64_ord_s:
1278 ; P8-NEXT: fcmpo cr0, f1, f2
1279 ; P8-NEXT: isel r3, r4, r3, un
1282 ; P9-LABEL: test_f64_ord_s:
1284 ; P9-NEXT: fcmpo cr0, f1, f2
1285 ; P9-NEXT: isel r3, r4, r3, un
1288 ; NOVSX-LABEL: test_f64_ord_s:
1290 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1291 ; NOVSX-NEXT: isel r3, r4, r3, un
1293 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1294 double %f1, double %f2, metadata !"ord",
1295 metadata !"fpexcept.strict") #0
1296 %res = select i1 %cond, i32 %a, i32 %b
1300 define i32 @test_f64_ueq_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1301 ; P8-LABEL: test_f64_ueq_s:
1303 ; P8-NEXT: fcmpo cr0, f1, f2
1304 ; P8-NEXT: cror 4*cr5+lt, eq, un
1305 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1308 ; P9-LABEL: test_f64_ueq_s:
1310 ; P9-NEXT: fcmpo cr0, f1, f2
1311 ; P9-NEXT: cror 4*cr5+lt, eq, un
1312 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1315 ; NOVSX-LABEL: test_f64_ueq_s:
1317 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1318 ; NOVSX-NEXT: cror 4*cr5+lt, eq, un
1319 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1321 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1322 double %f1, double %f2, metadata !"ueq",
1323 metadata !"fpexcept.strict") #0
1324 %res = select i1 %cond, i32 %a, i32 %b
1328 define i32 @test_f64_ugt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1329 ; P8-LABEL: test_f64_ugt_s:
1331 ; P8-NEXT: fcmpo cr0, f1, f2
1332 ; P8-NEXT: cror 4*cr5+lt, gt, un
1333 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1336 ; P9-LABEL: test_f64_ugt_s:
1338 ; P9-NEXT: fcmpo cr0, f1, f2
1339 ; P9-NEXT: cror 4*cr5+lt, gt, un
1340 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1343 ; NOVSX-LABEL: test_f64_ugt_s:
1345 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1346 ; NOVSX-NEXT: cror 4*cr5+lt, gt, un
1347 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1349 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1350 double %f1, double %f2, metadata !"ugt",
1351 metadata !"fpexcept.strict") #0
1352 %res = select i1 %cond, i32 %a, i32 %b
1356 define i32 @test_f64_uge_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1357 ; P8-LABEL: test_f64_uge_s:
1359 ; P8-NEXT: fcmpo cr0, f1, f2
1360 ; P8-NEXT: isellt r3, r4, r3
1363 ; P9-LABEL: test_f64_uge_s:
1365 ; P9-NEXT: fcmpo cr0, f1, f2
1366 ; P9-NEXT: isellt r3, r4, r3
1369 ; NOVSX-LABEL: test_f64_uge_s:
1371 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1372 ; NOVSX-NEXT: isellt r3, r4, r3
1374 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1375 double %f1, double %f2, metadata !"uge",
1376 metadata !"fpexcept.strict") #0
1377 %res = select i1 %cond, i32 %a, i32 %b
1381 define i32 @test_f64_ult_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1382 ; P8-LABEL: test_f64_ult_s:
1384 ; P8-NEXT: fcmpo cr0, f1, f2
1385 ; P8-NEXT: cror 4*cr5+lt, lt, un
1386 ; P8-NEXT: isel r3, r3, r4, 4*cr5+lt
1389 ; P9-LABEL: test_f64_ult_s:
1391 ; P9-NEXT: fcmpo cr0, f1, f2
1392 ; P9-NEXT: cror 4*cr5+lt, lt, un
1393 ; P9-NEXT: isel r3, r3, r4, 4*cr5+lt
1396 ; NOVSX-LABEL: test_f64_ult_s:
1398 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1399 ; NOVSX-NEXT: cror 4*cr5+lt, lt, un
1400 ; NOVSX-NEXT: isel r3, r3, r4, 4*cr5+lt
1402 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1403 double %f1, double %f2, metadata !"ult",
1404 metadata !"fpexcept.strict") #0
1405 %res = select i1 %cond, i32 %a, i32 %b
1409 define i32 @test_f64_ule_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1410 ; P8-LABEL: test_f64_ule_s:
1412 ; P8-NEXT: fcmpo cr0, f1, f2
1413 ; P8-NEXT: iselgt r3, r4, r3
1416 ; P9-LABEL: test_f64_ule_s:
1418 ; P9-NEXT: fcmpo cr0, f1, f2
1419 ; P9-NEXT: iselgt r3, r4, r3
1422 ; NOVSX-LABEL: test_f64_ule_s:
1424 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1425 ; NOVSX-NEXT: iselgt r3, r4, r3
1427 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1428 double %f1, double %f2, metadata !"ule",
1429 metadata !"fpexcept.strict") #0
1430 %res = select i1 %cond, i32 %a, i32 %b
1434 define i32 @test_f64_une_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1435 ; P8-LABEL: test_f64_une_s:
1437 ; P8-NEXT: fcmpo cr0, f1, f2
1438 ; P8-NEXT: iseleq r3, r4, r3
1441 ; P9-LABEL: test_f64_une_s:
1443 ; P9-NEXT: fcmpo cr0, f1, f2
1444 ; P9-NEXT: iseleq r3, r4, r3
1447 ; NOVSX-LABEL: test_f64_une_s:
1449 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1450 ; NOVSX-NEXT: iseleq r3, r4, r3
1452 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1453 double %f1, double %f2, metadata !"une",
1454 metadata !"fpexcept.strict") #0
1455 %res = select i1 %cond, i32 %a, i32 %b
1459 define i32 @test_f64_uno_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
1460 ; P8-LABEL: test_f64_uno_s:
1462 ; P8-NEXT: fcmpo cr0, f1, f2
1463 ; P8-NEXT: isel r3, r3, r4, un
1466 ; P9-LABEL: test_f64_uno_s:
1468 ; P9-NEXT: fcmpo cr0, f1, f2
1469 ; P9-NEXT: isel r3, r3, r4, un
1472 ; NOVSX-LABEL: test_f64_uno_s:
1474 ; NOVSX-NEXT: fcmpo cr0, f1, f2
1475 ; NOVSX-NEXT: isel r3, r3, r4, un
1477 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
1478 double %f1, double %f2, metadata !"uno",
1479 metadata !"fpexcept.strict") #0
1480 %res = select i1 %cond, i32 %a, i32 %b
1484 define i32 @fcmp_olt_f128(fp128 %a, fp128 %b) #0 {
1485 ; P8-LABEL: fcmp_olt_f128:
1488 ; P8-NEXT: stdu r1, -112(r1)
1489 ; P8-NEXT: std r0, 128(r1)
1490 ; P8-NEXT: bl __ltkf2
1492 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
1493 ; P8-NEXT: addi r1, r1, 112
1494 ; P8-NEXT: ld r0, 16(r1)
1498 ; P9-LABEL: fcmp_olt_f128:
1500 ; P9-NEXT: xscmpuqp cr0, v2, v3
1503 ; P9-NEXT: isellt r3, r4, r3
1506 ; NOVSX-LABEL: fcmp_olt_f128:
1508 ; NOVSX-NEXT: mflr r0
1509 ; NOVSX-NEXT: stdu r1, -32(r1)
1510 ; NOVSX-NEXT: std r0, 48(r1)
1511 ; NOVSX-NEXT: bl __ltkf2
1513 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
1514 ; NOVSX-NEXT: addi r1, r1, 32
1515 ; NOVSX-NEXT: ld r0, 16(r1)
1516 ; NOVSX-NEXT: mtlr r0
1518 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"olt", metadata !"fpexcept.strict") #0
1519 %conv = zext i1 %cmp to i32
1523 define i32 @fcmp_ole_f128(fp128 %a, fp128 %b) #0 {
1524 ; P8-LABEL: fcmp_ole_f128:
1527 ; P8-NEXT: stdu r1, -112(r1)
1528 ; P8-NEXT: std r0, 128(r1)
1529 ; P8-NEXT: bl __lekf2
1531 ; P8-NEXT: extsw r3, r3
1532 ; P8-NEXT: neg r3, r3
1533 ; P8-NEXT: rldicl r3, r3, 1, 63
1534 ; P8-NEXT: xori r3, r3, 1
1535 ; P8-NEXT: addi r1, r1, 112
1536 ; P8-NEXT: ld r0, 16(r1)
1540 ; P9-LABEL: fcmp_ole_f128:
1542 ; P9-NEXT: xscmpuqp cr0, v2, v3
1544 ; P9-NEXT: cror 4*cr5+lt, un, gt
1545 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1548 ; NOVSX-LABEL: fcmp_ole_f128:
1550 ; NOVSX-NEXT: mflr r0
1551 ; NOVSX-NEXT: stdu r1, -32(r1)
1552 ; NOVSX-NEXT: std r0, 48(r1)
1553 ; NOVSX-NEXT: bl __lekf2
1555 ; NOVSX-NEXT: extsw r3, r3
1556 ; NOVSX-NEXT: neg r3, r3
1557 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
1558 ; NOVSX-NEXT: xori r3, r3, 1
1559 ; NOVSX-NEXT: addi r1, r1, 32
1560 ; NOVSX-NEXT: ld r0, 16(r1)
1561 ; NOVSX-NEXT: mtlr r0
1563 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ole", metadata !"fpexcept.strict") #0
1564 %conv = zext i1 %cmp to i32
1568 define i32 @fcmp_ogt_f128(fp128 %a, fp128 %b) #0 {
1569 ; P8-LABEL: fcmp_ogt_f128:
1572 ; P8-NEXT: stdu r1, -112(r1)
1573 ; P8-NEXT: std r0, 128(r1)
1574 ; P8-NEXT: bl __gtkf2
1576 ; P8-NEXT: extsw r3, r3
1577 ; P8-NEXT: neg r3, r3
1578 ; P8-NEXT: rldicl r3, r3, 1, 63
1579 ; P8-NEXT: addi r1, r1, 112
1580 ; P8-NEXT: ld r0, 16(r1)
1584 ; P9-LABEL: fcmp_ogt_f128:
1586 ; P9-NEXT: xscmpuqp cr0, v2, v3
1589 ; P9-NEXT: iselgt r3, r4, r3
1592 ; NOVSX-LABEL: fcmp_ogt_f128:
1594 ; NOVSX-NEXT: mflr r0
1595 ; NOVSX-NEXT: stdu r1, -32(r1)
1596 ; NOVSX-NEXT: std r0, 48(r1)
1597 ; NOVSX-NEXT: bl __gtkf2
1599 ; NOVSX-NEXT: extsw r3, r3
1600 ; NOVSX-NEXT: neg r3, r3
1601 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
1602 ; NOVSX-NEXT: addi r1, r1, 32
1603 ; NOVSX-NEXT: ld r0, 16(r1)
1604 ; NOVSX-NEXT: mtlr r0
1606 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ogt", metadata !"fpexcept.strict") #0
1607 %conv = zext i1 %cmp to i32
1611 define i32 @fcmp_oge_f128(fp128 %a, fp128 %b) #0 {
1612 ; P8-LABEL: fcmp_oge_f128:
1615 ; P8-NEXT: stdu r1, -112(r1)
1616 ; P8-NEXT: std r0, 128(r1)
1617 ; P8-NEXT: bl __gekf2
1619 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
1620 ; P8-NEXT: xori r3, r3, 1
1621 ; P8-NEXT: addi r1, r1, 112
1622 ; P8-NEXT: ld r0, 16(r1)
1626 ; P9-LABEL: fcmp_oge_f128:
1628 ; P9-NEXT: xscmpuqp cr0, v2, v3
1630 ; P9-NEXT: cror 4*cr5+lt, un, lt
1631 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1634 ; NOVSX-LABEL: fcmp_oge_f128:
1636 ; NOVSX-NEXT: mflr r0
1637 ; NOVSX-NEXT: stdu r1, -32(r1)
1638 ; NOVSX-NEXT: std r0, 48(r1)
1639 ; NOVSX-NEXT: bl __gekf2
1641 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
1642 ; NOVSX-NEXT: xori r3, r3, 1
1643 ; NOVSX-NEXT: addi r1, r1, 32
1644 ; NOVSX-NEXT: ld r0, 16(r1)
1645 ; NOVSX-NEXT: mtlr r0
1647 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"oge", metadata !"fpexcept.strict") #0
1648 %conv = zext i1 %cmp to i32
1652 define i32 @fcmp_oeq_f128(fp128 %a, fp128 %b) #0 {
1653 ; P8-LABEL: fcmp_oeq_f128:
1656 ; P8-NEXT: stdu r1, -112(r1)
1657 ; P8-NEXT: std r0, 128(r1)
1658 ; P8-NEXT: bl __eqkf2
1660 ; P8-NEXT: cntlzw r3, r3
1661 ; P8-NEXT: srwi r3, r3, 5
1662 ; P8-NEXT: addi r1, r1, 112
1663 ; P8-NEXT: ld r0, 16(r1)
1667 ; P9-LABEL: fcmp_oeq_f128:
1669 ; P9-NEXT: xscmpuqp cr0, v2, v3
1672 ; P9-NEXT: iseleq r3, r4, r3
1675 ; NOVSX-LABEL: fcmp_oeq_f128:
1677 ; NOVSX-NEXT: mflr r0
1678 ; NOVSX-NEXT: stdu r1, -32(r1)
1679 ; NOVSX-NEXT: std r0, 48(r1)
1680 ; NOVSX-NEXT: bl __eqkf2
1682 ; NOVSX-NEXT: cntlzw r3, r3
1683 ; NOVSX-NEXT: srwi r3, r3, 5
1684 ; NOVSX-NEXT: addi r1, r1, 32
1685 ; NOVSX-NEXT: ld r0, 16(r1)
1686 ; NOVSX-NEXT: mtlr r0
1688 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"oeq", metadata !"fpexcept.strict") #0
1689 %conv = zext i1 %cmp to i32
1693 define i32 @fcmp_one_f128(fp128 %a, fp128 %b) #0 {
1694 ; P8-LABEL: fcmp_one_f128:
1697 ; P8-NEXT: stdu r1, -176(r1)
1698 ; P8-NEXT: li r3, 128
1699 ; P8-NEXT: std r0, 192(r1)
1700 ; P8-NEXT: std r30, 160(r1) # 8-byte Folded Spill
1701 ; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill
1702 ; P8-NEXT: li r3, 144
1703 ; P8-NEXT: vmr v30, v2
1704 ; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill
1705 ; P8-NEXT: vmr v31, v3
1706 ; P8-NEXT: bl __unordkf2
1708 ; P8-NEXT: cntlzw r3, r3
1709 ; P8-NEXT: vmr v2, v30
1710 ; P8-NEXT: vmr v3, v31
1711 ; P8-NEXT: srwi r30, r3, 5
1712 ; P8-NEXT: bl __eqkf2
1714 ; P8-NEXT: cntlzw r3, r3
1715 ; P8-NEXT: li r4, 144
1716 ; P8-NEXT: lxvd2x v31, r1, r4 # 16-byte Folded Reload
1717 ; P8-NEXT: li r4, 128
1718 ; P8-NEXT: srwi r3, r3, 5
1719 ; P8-NEXT: lxvd2x v30, r1, r4 # 16-byte Folded Reload
1720 ; P8-NEXT: xori r3, r3, 1
1721 ; P8-NEXT: and r3, r30, r3
1722 ; P8-NEXT: ld r30, 160(r1) # 8-byte Folded Reload
1723 ; P8-NEXT: addi r1, r1, 176
1724 ; P8-NEXT: ld r0, 16(r1)
1728 ; P9-LABEL: fcmp_one_f128:
1730 ; P9-NEXT: xscmpuqp cr0, v2, v3
1732 ; P9-NEXT: cror 4*cr5+lt, un, eq
1733 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1736 ; NOVSX-LABEL: fcmp_one_f128:
1738 ; NOVSX-NEXT: mflr r0
1739 ; NOVSX-NEXT: std r26, -48(r1) # 8-byte Folded Spill
1740 ; NOVSX-NEXT: std r27, -40(r1) # 8-byte Folded Spill
1741 ; NOVSX-NEXT: std r28, -32(r1) # 8-byte Folded Spill
1742 ; NOVSX-NEXT: std r29, -24(r1) # 8-byte Folded Spill
1743 ; NOVSX-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1744 ; NOVSX-NEXT: stdu r1, -80(r1)
1745 ; NOVSX-NEXT: std r0, 96(r1)
1746 ; NOVSX-NEXT: mr r30, r6
1747 ; NOVSX-NEXT: mr r29, r5
1748 ; NOVSX-NEXT: mr r28, r4
1749 ; NOVSX-NEXT: mr r27, r3
1750 ; NOVSX-NEXT: bl __unordkf2
1752 ; NOVSX-NEXT: cntlzw r3, r3
1753 ; NOVSX-NEXT: mr r4, r28
1754 ; NOVSX-NEXT: mr r5, r29
1755 ; NOVSX-NEXT: mr r6, r30
1756 ; NOVSX-NEXT: srwi r26, r3, 5
1757 ; NOVSX-NEXT: mr r3, r27
1758 ; NOVSX-NEXT: bl __eqkf2
1760 ; NOVSX-NEXT: cntlzw r3, r3
1761 ; NOVSX-NEXT: srwi r3, r3, 5
1762 ; NOVSX-NEXT: xori r3, r3, 1
1763 ; NOVSX-NEXT: and r3, r26, r3
1764 ; NOVSX-NEXT: addi r1, r1, 80
1765 ; NOVSX-NEXT: ld r0, 16(r1)
1766 ; NOVSX-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1767 ; NOVSX-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
1768 ; NOVSX-NEXT: ld r28, -32(r1) # 8-byte Folded Reload
1769 ; NOVSX-NEXT: ld r27, -40(r1) # 8-byte Folded Reload
1770 ; NOVSX-NEXT: ld r26, -48(r1) # 8-byte Folded Reload
1771 ; NOVSX-NEXT: mtlr r0
1773 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"one", metadata !"fpexcept.strict") #0
1774 %conv = zext i1 %cmp to i32
1778 define i32 @fcmp_ult_f128(fp128 %a, fp128 %b) #0 {
1779 ; P8-LABEL: fcmp_ult_f128:
1782 ; P8-NEXT: stdu r1, -112(r1)
1783 ; P8-NEXT: std r0, 128(r1)
1784 ; P8-NEXT: bl __gekf2
1786 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
1787 ; P8-NEXT: addi r1, r1, 112
1788 ; P8-NEXT: ld r0, 16(r1)
1792 ; P9-LABEL: fcmp_ult_f128:
1794 ; P9-NEXT: xscmpuqp cr0, v2, v3
1796 ; P9-NEXT: crnor 4*cr5+lt, lt, un
1797 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1800 ; NOVSX-LABEL: fcmp_ult_f128:
1802 ; NOVSX-NEXT: mflr r0
1803 ; NOVSX-NEXT: stdu r1, -32(r1)
1804 ; NOVSX-NEXT: std r0, 48(r1)
1805 ; NOVSX-NEXT: bl __gekf2
1807 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
1808 ; NOVSX-NEXT: addi r1, r1, 32
1809 ; NOVSX-NEXT: ld r0, 16(r1)
1810 ; NOVSX-NEXT: mtlr r0
1812 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ult", metadata !"fpexcept.strict") #0
1813 %conv = zext i1 %cmp to i32
1817 define i32 @fcmp_ule_f128(fp128 %a, fp128 %b) #0 {
1818 ; P8-LABEL: fcmp_ule_f128:
1821 ; P8-NEXT: stdu r1, -112(r1)
1822 ; P8-NEXT: std r0, 128(r1)
1823 ; P8-NEXT: bl __gtkf2
1825 ; P8-NEXT: extsw r3, r3
1826 ; P8-NEXT: neg r3, r3
1827 ; P8-NEXT: rldicl r3, r3, 1, 63
1828 ; P8-NEXT: xori r3, r3, 1
1829 ; P8-NEXT: addi r1, r1, 112
1830 ; P8-NEXT: ld r0, 16(r1)
1834 ; P9-LABEL: fcmp_ule_f128:
1836 ; P9-NEXT: xscmpuqp cr0, v2, v3
1838 ; P9-NEXT: iselgt r3, 0, r3
1841 ; NOVSX-LABEL: fcmp_ule_f128:
1843 ; NOVSX-NEXT: mflr r0
1844 ; NOVSX-NEXT: stdu r1, -32(r1)
1845 ; NOVSX-NEXT: std r0, 48(r1)
1846 ; NOVSX-NEXT: bl __gtkf2
1848 ; NOVSX-NEXT: extsw r3, r3
1849 ; NOVSX-NEXT: neg r3, r3
1850 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
1851 ; NOVSX-NEXT: xori r3, r3, 1
1852 ; NOVSX-NEXT: addi r1, r1, 32
1853 ; NOVSX-NEXT: ld r0, 16(r1)
1854 ; NOVSX-NEXT: mtlr r0
1856 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ule", metadata !"fpexcept.strict") #0
1857 %conv = zext i1 %cmp to i32
1861 define i32 @fcmp_ugt_f128(fp128 %a, fp128 %b) #0 {
1862 ; P8-LABEL: fcmp_ugt_f128:
1865 ; P8-NEXT: stdu r1, -112(r1)
1866 ; P8-NEXT: std r0, 128(r1)
1867 ; P8-NEXT: bl __lekf2
1869 ; P8-NEXT: extsw r3, r3
1870 ; P8-NEXT: neg r3, r3
1871 ; P8-NEXT: rldicl r3, r3, 1, 63
1872 ; P8-NEXT: addi r1, r1, 112
1873 ; P8-NEXT: ld r0, 16(r1)
1877 ; P9-LABEL: fcmp_ugt_f128:
1879 ; P9-NEXT: xscmpuqp cr0, v2, v3
1881 ; P9-NEXT: crnor 4*cr5+lt, gt, un
1882 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1885 ; NOVSX-LABEL: fcmp_ugt_f128:
1887 ; NOVSX-NEXT: mflr r0
1888 ; NOVSX-NEXT: stdu r1, -32(r1)
1889 ; NOVSX-NEXT: std r0, 48(r1)
1890 ; NOVSX-NEXT: bl __lekf2
1892 ; NOVSX-NEXT: extsw r3, r3
1893 ; NOVSX-NEXT: neg r3, r3
1894 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
1895 ; NOVSX-NEXT: addi r1, r1, 32
1896 ; NOVSX-NEXT: ld r0, 16(r1)
1897 ; NOVSX-NEXT: mtlr r0
1899 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ugt", metadata !"fpexcept.strict") #0
1900 %conv = zext i1 %cmp to i32
1904 define i32 @fcmp_uge_f128(fp128 %a, fp128 %b) #0 {
1905 ; P8-LABEL: fcmp_uge_f128:
1908 ; P8-NEXT: stdu r1, -112(r1)
1909 ; P8-NEXT: std r0, 128(r1)
1910 ; P8-NEXT: bl __ltkf2
1912 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
1913 ; P8-NEXT: xori r3, r3, 1
1914 ; P8-NEXT: addi r1, r1, 112
1915 ; P8-NEXT: ld r0, 16(r1)
1919 ; P9-LABEL: fcmp_uge_f128:
1921 ; P9-NEXT: xscmpuqp cr0, v2, v3
1923 ; P9-NEXT: isellt r3, 0, r3
1926 ; NOVSX-LABEL: fcmp_uge_f128:
1928 ; NOVSX-NEXT: mflr r0
1929 ; NOVSX-NEXT: stdu r1, -32(r1)
1930 ; NOVSX-NEXT: std r0, 48(r1)
1931 ; NOVSX-NEXT: bl __ltkf2
1933 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
1934 ; NOVSX-NEXT: xori r3, r3, 1
1935 ; NOVSX-NEXT: addi r1, r1, 32
1936 ; NOVSX-NEXT: ld r0, 16(r1)
1937 ; NOVSX-NEXT: mtlr r0
1939 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"uge", metadata !"fpexcept.strict") #0
1940 %conv = zext i1 %cmp to i32
1944 define i32 @fcmp_ueq_f128(fp128 %a, fp128 %b) #0 {
1945 ; P8-LABEL: fcmp_ueq_f128:
1948 ; P8-NEXT: stdu r1, -176(r1)
1949 ; P8-NEXT: li r3, 128
1950 ; P8-NEXT: std r0, 192(r1)
1951 ; P8-NEXT: std r30, 160(r1) # 8-byte Folded Spill
1952 ; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill
1953 ; P8-NEXT: li r3, 144
1954 ; P8-NEXT: vmr v30, v2
1955 ; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill
1956 ; P8-NEXT: vmr v31, v3
1957 ; P8-NEXT: bl __eqkf2
1959 ; P8-NEXT: cntlzw r3, r3
1960 ; P8-NEXT: vmr v2, v30
1961 ; P8-NEXT: vmr v3, v31
1962 ; P8-NEXT: srwi r30, r3, 5
1963 ; P8-NEXT: bl __unordkf2
1965 ; P8-NEXT: cntlzw r3, r3
1966 ; P8-NEXT: li r4, 144
1967 ; P8-NEXT: lxvd2x v31, r1, r4 # 16-byte Folded Reload
1968 ; P8-NEXT: li r4, 128
1969 ; P8-NEXT: srwi r3, r3, 5
1970 ; P8-NEXT: lxvd2x v30, r1, r4 # 16-byte Folded Reload
1971 ; P8-NEXT: xori r3, r3, 1
1972 ; P8-NEXT: or r3, r3, r30
1973 ; P8-NEXT: ld r30, 160(r1) # 8-byte Folded Reload
1974 ; P8-NEXT: addi r1, r1, 176
1975 ; P8-NEXT: ld r0, 16(r1)
1979 ; P9-LABEL: fcmp_ueq_f128:
1981 ; P9-NEXT: xscmpuqp cr0, v2, v3
1983 ; P9-NEXT: crnor 4*cr5+lt, eq, un
1984 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
1987 ; NOVSX-LABEL: fcmp_ueq_f128:
1989 ; NOVSX-NEXT: mflr r0
1990 ; NOVSX-NEXT: std r26, -48(r1) # 8-byte Folded Spill
1991 ; NOVSX-NEXT: std r27, -40(r1) # 8-byte Folded Spill
1992 ; NOVSX-NEXT: std r28, -32(r1) # 8-byte Folded Spill
1993 ; NOVSX-NEXT: std r29, -24(r1) # 8-byte Folded Spill
1994 ; NOVSX-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1995 ; NOVSX-NEXT: stdu r1, -80(r1)
1996 ; NOVSX-NEXT: std r0, 96(r1)
1997 ; NOVSX-NEXT: mr r30, r6
1998 ; NOVSX-NEXT: mr r29, r5
1999 ; NOVSX-NEXT: mr r28, r4
2000 ; NOVSX-NEXT: mr r27, r3
2001 ; NOVSX-NEXT: bl __eqkf2
2003 ; NOVSX-NEXT: cntlzw r3, r3
2004 ; NOVSX-NEXT: mr r4, r28
2005 ; NOVSX-NEXT: mr r5, r29
2006 ; NOVSX-NEXT: mr r6, r30
2007 ; NOVSX-NEXT: srwi r26, r3, 5
2008 ; NOVSX-NEXT: mr r3, r27
2009 ; NOVSX-NEXT: bl __unordkf2
2011 ; NOVSX-NEXT: cntlzw r3, r3
2012 ; NOVSX-NEXT: srwi r3, r3, 5
2013 ; NOVSX-NEXT: xori r3, r3, 1
2014 ; NOVSX-NEXT: or r3, r3, r26
2015 ; NOVSX-NEXT: addi r1, r1, 80
2016 ; NOVSX-NEXT: ld r0, 16(r1)
2017 ; NOVSX-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
2018 ; NOVSX-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
2019 ; NOVSX-NEXT: ld r28, -32(r1) # 8-byte Folded Reload
2020 ; NOVSX-NEXT: ld r27, -40(r1) # 8-byte Folded Reload
2021 ; NOVSX-NEXT: ld r26, -48(r1) # 8-byte Folded Reload
2022 ; NOVSX-NEXT: mtlr r0
2024 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"ueq", metadata !"fpexcept.strict") #0
2025 %conv = zext i1 %cmp to i32
2029 define i32 @fcmp_une_f128(fp128 %a, fp128 %b) #0 {
2030 ; P8-LABEL: fcmp_une_f128:
2033 ; P8-NEXT: stdu r1, -112(r1)
2034 ; P8-NEXT: std r0, 128(r1)
2035 ; P8-NEXT: bl __nekf2
2037 ; P8-NEXT: cntlzw r3, r3
2038 ; P8-NEXT: srwi r3, r3, 5
2039 ; P8-NEXT: xori r3, r3, 1
2040 ; P8-NEXT: addi r1, r1, 112
2041 ; P8-NEXT: ld r0, 16(r1)
2045 ; P9-LABEL: fcmp_une_f128:
2047 ; P9-NEXT: xscmpuqp cr0, v2, v3
2049 ; P9-NEXT: iseleq r3, 0, r3
2052 ; NOVSX-LABEL: fcmp_une_f128:
2054 ; NOVSX-NEXT: mflr r0
2055 ; NOVSX-NEXT: stdu r1, -32(r1)
2056 ; NOVSX-NEXT: std r0, 48(r1)
2057 ; NOVSX-NEXT: bl __nekf2
2059 ; NOVSX-NEXT: cntlzw r3, r3
2060 ; NOVSX-NEXT: srwi r3, r3, 5
2061 ; NOVSX-NEXT: xori r3, r3, 1
2062 ; NOVSX-NEXT: addi r1, r1, 32
2063 ; NOVSX-NEXT: ld r0, 16(r1)
2064 ; NOVSX-NEXT: mtlr r0
2066 %cmp = call i1 @llvm.experimental.constrained.fcmp.f128(fp128 %a, fp128 %b, metadata !"une", metadata !"fpexcept.strict") #0
2067 %conv = zext i1 %cmp to i32
2071 define i32 @fcmps_olt_f128(fp128 %a, fp128 %b) #0 {
2072 ; P8-LABEL: fcmps_olt_f128:
2075 ; P8-NEXT: stdu r1, -112(r1)
2076 ; P8-NEXT: std r0, 128(r1)
2077 ; P8-NEXT: bl __ltkf2
2079 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
2080 ; P8-NEXT: addi r1, r1, 112
2081 ; P8-NEXT: ld r0, 16(r1)
2085 ; P9-LABEL: fcmps_olt_f128:
2087 ; P9-NEXT: xscmpoqp cr0, v2, v3
2090 ; P9-NEXT: isellt r3, r4, r3
2093 ; NOVSX-LABEL: fcmps_olt_f128:
2095 ; NOVSX-NEXT: mflr r0
2096 ; NOVSX-NEXT: stdu r1, -32(r1)
2097 ; NOVSX-NEXT: std r0, 48(r1)
2098 ; NOVSX-NEXT: bl __ltkf2
2100 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
2101 ; NOVSX-NEXT: addi r1, r1, 32
2102 ; NOVSX-NEXT: ld r0, 16(r1)
2103 ; NOVSX-NEXT: mtlr r0
2105 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"olt", metadata !"fpexcept.strict") #0
2106 %conv = zext i1 %cmp to i32
2110 define i32 @fcmps_ole_f128(fp128 %a, fp128 %b) #0 {
2111 ; P8-LABEL: fcmps_ole_f128:
2114 ; P8-NEXT: stdu r1, -112(r1)
2115 ; P8-NEXT: std r0, 128(r1)
2116 ; P8-NEXT: bl __lekf2
2118 ; P8-NEXT: extsw r3, r3
2119 ; P8-NEXT: neg r3, r3
2120 ; P8-NEXT: rldicl r3, r3, 1, 63
2121 ; P8-NEXT: xori r3, r3, 1
2122 ; P8-NEXT: addi r1, r1, 112
2123 ; P8-NEXT: ld r0, 16(r1)
2127 ; P9-LABEL: fcmps_ole_f128:
2129 ; P9-NEXT: xscmpoqp cr0, v2, v3
2131 ; P9-NEXT: cror 4*cr5+lt, un, gt
2132 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2135 ; NOVSX-LABEL: fcmps_ole_f128:
2137 ; NOVSX-NEXT: mflr r0
2138 ; NOVSX-NEXT: stdu r1, -32(r1)
2139 ; NOVSX-NEXT: std r0, 48(r1)
2140 ; NOVSX-NEXT: bl __lekf2
2142 ; NOVSX-NEXT: extsw r3, r3
2143 ; NOVSX-NEXT: neg r3, r3
2144 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
2145 ; NOVSX-NEXT: xori r3, r3, 1
2146 ; NOVSX-NEXT: addi r1, r1, 32
2147 ; NOVSX-NEXT: ld r0, 16(r1)
2148 ; NOVSX-NEXT: mtlr r0
2150 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ole", metadata !"fpexcept.strict") #0
2151 %conv = zext i1 %cmp to i32
2155 define i32 @fcmps_ogt_f128(fp128 %a, fp128 %b) #0 {
2156 ; P8-LABEL: fcmps_ogt_f128:
2159 ; P8-NEXT: stdu r1, -112(r1)
2160 ; P8-NEXT: std r0, 128(r1)
2161 ; P8-NEXT: bl __gtkf2
2163 ; P8-NEXT: extsw r3, r3
2164 ; P8-NEXT: neg r3, r3
2165 ; P8-NEXT: rldicl r3, r3, 1, 63
2166 ; P8-NEXT: addi r1, r1, 112
2167 ; P8-NEXT: ld r0, 16(r1)
2171 ; P9-LABEL: fcmps_ogt_f128:
2173 ; P9-NEXT: xscmpoqp cr0, v2, v3
2176 ; P9-NEXT: iselgt r3, r4, r3
2179 ; NOVSX-LABEL: fcmps_ogt_f128:
2181 ; NOVSX-NEXT: mflr r0
2182 ; NOVSX-NEXT: stdu r1, -32(r1)
2183 ; NOVSX-NEXT: std r0, 48(r1)
2184 ; NOVSX-NEXT: bl __gtkf2
2186 ; NOVSX-NEXT: extsw r3, r3
2187 ; NOVSX-NEXT: neg r3, r3
2188 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
2189 ; NOVSX-NEXT: addi r1, r1, 32
2190 ; NOVSX-NEXT: ld r0, 16(r1)
2191 ; NOVSX-NEXT: mtlr r0
2193 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ogt", metadata !"fpexcept.strict") #0
2194 %conv = zext i1 %cmp to i32
2198 define i32 @fcmps_oge_f128(fp128 %a, fp128 %b) #0 {
2199 ; P8-LABEL: fcmps_oge_f128:
2202 ; P8-NEXT: stdu r1, -112(r1)
2203 ; P8-NEXT: std r0, 128(r1)
2204 ; P8-NEXT: bl __gekf2
2206 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
2207 ; P8-NEXT: xori r3, r3, 1
2208 ; P8-NEXT: addi r1, r1, 112
2209 ; P8-NEXT: ld r0, 16(r1)
2213 ; P9-LABEL: fcmps_oge_f128:
2215 ; P9-NEXT: xscmpoqp cr0, v2, v3
2217 ; P9-NEXT: cror 4*cr5+lt, un, lt
2218 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2221 ; NOVSX-LABEL: fcmps_oge_f128:
2223 ; NOVSX-NEXT: mflr r0
2224 ; NOVSX-NEXT: stdu r1, -32(r1)
2225 ; NOVSX-NEXT: std r0, 48(r1)
2226 ; NOVSX-NEXT: bl __gekf2
2228 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
2229 ; NOVSX-NEXT: xori r3, r3, 1
2230 ; NOVSX-NEXT: addi r1, r1, 32
2231 ; NOVSX-NEXT: ld r0, 16(r1)
2232 ; NOVSX-NEXT: mtlr r0
2234 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"oge", metadata !"fpexcept.strict") #0
2235 %conv = zext i1 %cmp to i32
2239 define i32 @fcmps_oeq_f128(fp128 %a, fp128 %b) #0 {
2240 ; P8-LABEL: fcmps_oeq_f128:
2243 ; P8-NEXT: stdu r1, -112(r1)
2244 ; P8-NEXT: std r0, 128(r1)
2245 ; P8-NEXT: bl __eqkf2
2247 ; P8-NEXT: cntlzw r3, r3
2248 ; P8-NEXT: srwi r3, r3, 5
2249 ; P8-NEXT: addi r1, r1, 112
2250 ; P8-NEXT: ld r0, 16(r1)
2254 ; P9-LABEL: fcmps_oeq_f128:
2256 ; P9-NEXT: xscmpoqp cr0, v2, v3
2259 ; P9-NEXT: iseleq r3, r4, r3
2262 ; NOVSX-LABEL: fcmps_oeq_f128:
2264 ; NOVSX-NEXT: mflr r0
2265 ; NOVSX-NEXT: stdu r1, -32(r1)
2266 ; NOVSX-NEXT: std r0, 48(r1)
2267 ; NOVSX-NEXT: bl __eqkf2
2269 ; NOVSX-NEXT: cntlzw r3, r3
2270 ; NOVSX-NEXT: srwi r3, r3, 5
2271 ; NOVSX-NEXT: addi r1, r1, 32
2272 ; NOVSX-NEXT: ld r0, 16(r1)
2273 ; NOVSX-NEXT: mtlr r0
2275 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"oeq", metadata !"fpexcept.strict") #0
2276 %conv = zext i1 %cmp to i32
2280 define i32 @fcmps_one_f128(fp128 %a, fp128 %b) #0 {
2281 ; P8-LABEL: fcmps_one_f128:
2284 ; P8-NEXT: stdu r1, -176(r1)
2285 ; P8-NEXT: li r3, 128
2286 ; P8-NEXT: std r0, 192(r1)
2287 ; P8-NEXT: std r30, 160(r1) # 8-byte Folded Spill
2288 ; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill
2289 ; P8-NEXT: li r3, 144
2290 ; P8-NEXT: vmr v30, v2
2291 ; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill
2292 ; P8-NEXT: vmr v31, v3
2293 ; P8-NEXT: bl __unordkf2
2295 ; P8-NEXT: cntlzw r3, r3
2296 ; P8-NEXT: vmr v2, v30
2297 ; P8-NEXT: vmr v3, v31
2298 ; P8-NEXT: srwi r30, r3, 5
2299 ; P8-NEXT: bl __eqkf2
2301 ; P8-NEXT: cntlzw r3, r3
2302 ; P8-NEXT: li r4, 144
2303 ; P8-NEXT: lxvd2x v31, r1, r4 # 16-byte Folded Reload
2304 ; P8-NEXT: li r4, 128
2305 ; P8-NEXT: srwi r3, r3, 5
2306 ; P8-NEXT: lxvd2x v30, r1, r4 # 16-byte Folded Reload
2307 ; P8-NEXT: xori r3, r3, 1
2308 ; P8-NEXT: and r3, r30, r3
2309 ; P8-NEXT: ld r30, 160(r1) # 8-byte Folded Reload
2310 ; P8-NEXT: addi r1, r1, 176
2311 ; P8-NEXT: ld r0, 16(r1)
2315 ; P9-LABEL: fcmps_one_f128:
2317 ; P9-NEXT: xscmpoqp cr0, v2, v3
2319 ; P9-NEXT: cror 4*cr5+lt, un, eq
2320 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2323 ; NOVSX-LABEL: fcmps_one_f128:
2325 ; NOVSX-NEXT: mflr r0
2326 ; NOVSX-NEXT: std r26, -48(r1) # 8-byte Folded Spill
2327 ; NOVSX-NEXT: std r27, -40(r1) # 8-byte Folded Spill
2328 ; NOVSX-NEXT: std r28, -32(r1) # 8-byte Folded Spill
2329 ; NOVSX-NEXT: std r29, -24(r1) # 8-byte Folded Spill
2330 ; NOVSX-NEXT: std r30, -16(r1) # 8-byte Folded Spill
2331 ; NOVSX-NEXT: stdu r1, -80(r1)
2332 ; NOVSX-NEXT: std r0, 96(r1)
2333 ; NOVSX-NEXT: mr r30, r6
2334 ; NOVSX-NEXT: mr r29, r5
2335 ; NOVSX-NEXT: mr r28, r4
2336 ; NOVSX-NEXT: mr r27, r3
2337 ; NOVSX-NEXT: bl __unordkf2
2339 ; NOVSX-NEXT: cntlzw r3, r3
2340 ; NOVSX-NEXT: mr r4, r28
2341 ; NOVSX-NEXT: mr r5, r29
2342 ; NOVSX-NEXT: mr r6, r30
2343 ; NOVSX-NEXT: srwi r26, r3, 5
2344 ; NOVSX-NEXT: mr r3, r27
2345 ; NOVSX-NEXT: bl __eqkf2
2347 ; NOVSX-NEXT: cntlzw r3, r3
2348 ; NOVSX-NEXT: srwi r3, r3, 5
2349 ; NOVSX-NEXT: xori r3, r3, 1
2350 ; NOVSX-NEXT: and r3, r26, r3
2351 ; NOVSX-NEXT: addi r1, r1, 80
2352 ; NOVSX-NEXT: ld r0, 16(r1)
2353 ; NOVSX-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
2354 ; NOVSX-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
2355 ; NOVSX-NEXT: ld r28, -32(r1) # 8-byte Folded Reload
2356 ; NOVSX-NEXT: ld r27, -40(r1) # 8-byte Folded Reload
2357 ; NOVSX-NEXT: ld r26, -48(r1) # 8-byte Folded Reload
2358 ; NOVSX-NEXT: mtlr r0
2360 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"one", metadata !"fpexcept.strict") #0
2361 %conv = zext i1 %cmp to i32
2365 define i32 @fcmps_ult_f128(fp128 %a, fp128 %b) #0 {
2366 ; P8-LABEL: fcmps_ult_f128:
2369 ; P8-NEXT: stdu r1, -112(r1)
2370 ; P8-NEXT: std r0, 128(r1)
2371 ; P8-NEXT: bl __gekf2
2373 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
2374 ; P8-NEXT: addi r1, r1, 112
2375 ; P8-NEXT: ld r0, 16(r1)
2379 ; P9-LABEL: fcmps_ult_f128:
2381 ; P9-NEXT: xscmpoqp cr0, v2, v3
2383 ; P9-NEXT: crnor 4*cr5+lt, lt, un
2384 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2387 ; NOVSX-LABEL: fcmps_ult_f128:
2389 ; NOVSX-NEXT: mflr r0
2390 ; NOVSX-NEXT: stdu r1, -32(r1)
2391 ; NOVSX-NEXT: std r0, 48(r1)
2392 ; NOVSX-NEXT: bl __gekf2
2394 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
2395 ; NOVSX-NEXT: addi r1, r1, 32
2396 ; NOVSX-NEXT: ld r0, 16(r1)
2397 ; NOVSX-NEXT: mtlr r0
2399 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ult", metadata !"fpexcept.strict") #0
2400 %conv = zext i1 %cmp to i32
2404 define i32 @fcmps_ule_f128(fp128 %a, fp128 %b) #0 {
2405 ; P8-LABEL: fcmps_ule_f128:
2408 ; P8-NEXT: stdu r1, -112(r1)
2409 ; P8-NEXT: std r0, 128(r1)
2410 ; P8-NEXT: bl __gtkf2
2412 ; P8-NEXT: extsw r3, r3
2413 ; P8-NEXT: neg r3, r3
2414 ; P8-NEXT: rldicl r3, r3, 1, 63
2415 ; P8-NEXT: xori r3, r3, 1
2416 ; P8-NEXT: addi r1, r1, 112
2417 ; P8-NEXT: ld r0, 16(r1)
2421 ; P9-LABEL: fcmps_ule_f128:
2423 ; P9-NEXT: xscmpoqp cr0, v2, v3
2425 ; P9-NEXT: iselgt r3, 0, r3
2428 ; NOVSX-LABEL: fcmps_ule_f128:
2430 ; NOVSX-NEXT: mflr r0
2431 ; NOVSX-NEXT: stdu r1, -32(r1)
2432 ; NOVSX-NEXT: std r0, 48(r1)
2433 ; NOVSX-NEXT: bl __gtkf2
2435 ; NOVSX-NEXT: extsw r3, r3
2436 ; NOVSX-NEXT: neg r3, r3
2437 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
2438 ; NOVSX-NEXT: xori r3, r3, 1
2439 ; NOVSX-NEXT: addi r1, r1, 32
2440 ; NOVSX-NEXT: ld r0, 16(r1)
2441 ; NOVSX-NEXT: mtlr r0
2443 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ule", metadata !"fpexcept.strict") #0
2444 %conv = zext i1 %cmp to i32
2448 define i32 @fcmps_ugt_f128(fp128 %a, fp128 %b) #0 {
2449 ; P8-LABEL: fcmps_ugt_f128:
2452 ; P8-NEXT: stdu r1, -112(r1)
2453 ; P8-NEXT: std r0, 128(r1)
2454 ; P8-NEXT: bl __lekf2
2456 ; P8-NEXT: extsw r3, r3
2457 ; P8-NEXT: neg r3, r3
2458 ; P8-NEXT: rldicl r3, r3, 1, 63
2459 ; P8-NEXT: addi r1, r1, 112
2460 ; P8-NEXT: ld r0, 16(r1)
2464 ; P9-LABEL: fcmps_ugt_f128:
2466 ; P9-NEXT: xscmpoqp cr0, v2, v3
2468 ; P9-NEXT: crnor 4*cr5+lt, gt, un
2469 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2472 ; NOVSX-LABEL: fcmps_ugt_f128:
2474 ; NOVSX-NEXT: mflr r0
2475 ; NOVSX-NEXT: stdu r1, -32(r1)
2476 ; NOVSX-NEXT: std r0, 48(r1)
2477 ; NOVSX-NEXT: bl __lekf2
2479 ; NOVSX-NEXT: extsw r3, r3
2480 ; NOVSX-NEXT: neg r3, r3
2481 ; NOVSX-NEXT: rldicl r3, r3, 1, 63
2482 ; NOVSX-NEXT: addi r1, r1, 32
2483 ; NOVSX-NEXT: ld r0, 16(r1)
2484 ; NOVSX-NEXT: mtlr r0
2486 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ugt", metadata !"fpexcept.strict") #0
2487 %conv = zext i1 %cmp to i32
2491 define i32 @fcmps_uge_f128(fp128 %a, fp128 %b) #0 {
2492 ; P8-LABEL: fcmps_uge_f128:
2495 ; P8-NEXT: stdu r1, -112(r1)
2496 ; P8-NEXT: std r0, 128(r1)
2497 ; P8-NEXT: bl __ltkf2
2499 ; P8-NEXT: rlwinm r3, r3, 1, 31, 31
2500 ; P8-NEXT: xori r3, r3, 1
2501 ; P8-NEXT: addi r1, r1, 112
2502 ; P8-NEXT: ld r0, 16(r1)
2506 ; P9-LABEL: fcmps_uge_f128:
2508 ; P9-NEXT: xscmpoqp cr0, v2, v3
2510 ; P9-NEXT: isellt r3, 0, r3
2513 ; NOVSX-LABEL: fcmps_uge_f128:
2515 ; NOVSX-NEXT: mflr r0
2516 ; NOVSX-NEXT: stdu r1, -32(r1)
2517 ; NOVSX-NEXT: std r0, 48(r1)
2518 ; NOVSX-NEXT: bl __ltkf2
2520 ; NOVSX-NEXT: rlwinm r3, r3, 1, 31, 31
2521 ; NOVSX-NEXT: xori r3, r3, 1
2522 ; NOVSX-NEXT: addi r1, r1, 32
2523 ; NOVSX-NEXT: ld r0, 16(r1)
2524 ; NOVSX-NEXT: mtlr r0
2526 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"uge", metadata !"fpexcept.strict") #0
2527 %conv = zext i1 %cmp to i32
2531 define i32 @fcmps_ueq_f128(fp128 %a, fp128 %b) #0 {
2532 ; P8-LABEL: fcmps_ueq_f128:
2535 ; P8-NEXT: stdu r1, -176(r1)
2536 ; P8-NEXT: li r3, 128
2537 ; P8-NEXT: std r0, 192(r1)
2538 ; P8-NEXT: std r30, 160(r1) # 8-byte Folded Spill
2539 ; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill
2540 ; P8-NEXT: li r3, 144
2541 ; P8-NEXT: vmr v30, v2
2542 ; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill
2543 ; P8-NEXT: vmr v31, v3
2544 ; P8-NEXT: bl __eqkf2
2546 ; P8-NEXT: cntlzw r3, r3
2547 ; P8-NEXT: vmr v2, v30
2548 ; P8-NEXT: vmr v3, v31
2549 ; P8-NEXT: srwi r30, r3, 5
2550 ; P8-NEXT: bl __unordkf2
2552 ; P8-NEXT: cntlzw r3, r3
2553 ; P8-NEXT: li r4, 144
2554 ; P8-NEXT: lxvd2x v31, r1, r4 # 16-byte Folded Reload
2555 ; P8-NEXT: li r4, 128
2556 ; P8-NEXT: srwi r3, r3, 5
2557 ; P8-NEXT: lxvd2x v30, r1, r4 # 16-byte Folded Reload
2558 ; P8-NEXT: xori r3, r3, 1
2559 ; P8-NEXT: or r3, r3, r30
2560 ; P8-NEXT: ld r30, 160(r1) # 8-byte Folded Reload
2561 ; P8-NEXT: addi r1, r1, 176
2562 ; P8-NEXT: ld r0, 16(r1)
2566 ; P9-LABEL: fcmps_ueq_f128:
2568 ; P9-NEXT: xscmpoqp cr0, v2, v3
2570 ; P9-NEXT: crnor 4*cr5+lt, eq, un
2571 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2574 ; NOVSX-LABEL: fcmps_ueq_f128:
2576 ; NOVSX-NEXT: mflr r0
2577 ; NOVSX-NEXT: std r26, -48(r1) # 8-byte Folded Spill
2578 ; NOVSX-NEXT: std r27, -40(r1) # 8-byte Folded Spill
2579 ; NOVSX-NEXT: std r28, -32(r1) # 8-byte Folded Spill
2580 ; NOVSX-NEXT: std r29, -24(r1) # 8-byte Folded Spill
2581 ; NOVSX-NEXT: std r30, -16(r1) # 8-byte Folded Spill
2582 ; NOVSX-NEXT: stdu r1, -80(r1)
2583 ; NOVSX-NEXT: std r0, 96(r1)
2584 ; NOVSX-NEXT: mr r30, r6
2585 ; NOVSX-NEXT: mr r29, r5
2586 ; NOVSX-NEXT: mr r28, r4
2587 ; NOVSX-NEXT: mr r27, r3
2588 ; NOVSX-NEXT: bl __eqkf2
2590 ; NOVSX-NEXT: cntlzw r3, r3
2591 ; NOVSX-NEXT: mr r4, r28
2592 ; NOVSX-NEXT: mr r5, r29
2593 ; NOVSX-NEXT: mr r6, r30
2594 ; NOVSX-NEXT: srwi r26, r3, 5
2595 ; NOVSX-NEXT: mr r3, r27
2596 ; NOVSX-NEXT: bl __unordkf2
2598 ; NOVSX-NEXT: cntlzw r3, r3
2599 ; NOVSX-NEXT: srwi r3, r3, 5
2600 ; NOVSX-NEXT: xori r3, r3, 1
2601 ; NOVSX-NEXT: or r3, r3, r26
2602 ; NOVSX-NEXT: addi r1, r1, 80
2603 ; NOVSX-NEXT: ld r0, 16(r1)
2604 ; NOVSX-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
2605 ; NOVSX-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
2606 ; NOVSX-NEXT: ld r28, -32(r1) # 8-byte Folded Reload
2607 ; NOVSX-NEXT: ld r27, -40(r1) # 8-byte Folded Reload
2608 ; NOVSX-NEXT: ld r26, -48(r1) # 8-byte Folded Reload
2609 ; NOVSX-NEXT: mtlr r0
2611 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"ueq", metadata !"fpexcept.strict") #0
2612 %conv = zext i1 %cmp to i32
2616 define i32 @fcmps_une_f128(fp128 %a, fp128 %b) #0 {
2617 ; P8-LABEL: fcmps_une_f128:
2620 ; P8-NEXT: stdu r1, -112(r1)
2621 ; P8-NEXT: std r0, 128(r1)
2622 ; P8-NEXT: bl __nekf2
2624 ; P8-NEXT: cntlzw r3, r3
2625 ; P8-NEXT: srwi r3, r3, 5
2626 ; P8-NEXT: xori r3, r3, 1
2627 ; P8-NEXT: addi r1, r1, 112
2628 ; P8-NEXT: ld r0, 16(r1)
2632 ; P9-LABEL: fcmps_une_f128:
2634 ; P9-NEXT: xscmpoqp cr0, v2, v3
2636 ; P9-NEXT: iseleq r3, 0, r3
2639 ; NOVSX-LABEL: fcmps_une_f128:
2641 ; NOVSX-NEXT: mflr r0
2642 ; NOVSX-NEXT: stdu r1, -32(r1)
2643 ; NOVSX-NEXT: std r0, 48(r1)
2644 ; NOVSX-NEXT: bl __nekf2
2646 ; NOVSX-NEXT: cntlzw r3, r3
2647 ; NOVSX-NEXT: srwi r3, r3, 5
2648 ; NOVSX-NEXT: xori r3, r3, 1
2649 ; NOVSX-NEXT: addi r1, r1, 32
2650 ; NOVSX-NEXT: ld r0, 16(r1)
2651 ; NOVSX-NEXT: mtlr r0
2653 %cmp = call i1 @llvm.experimental.constrained.fcmps.f128(fp128 %a, fp128 %b, metadata !"une", metadata !"fpexcept.strict") #0
2654 %conv = zext i1 %cmp to i32
2658 define i32 @fcmp_olt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2659 ; P8-LABEL: fcmp_olt_ppcf128:
2661 ; P8-NEXT: fcmpu cr0, f1, f3
2663 ; P8-NEXT: crandc 4*cr5+gt, lt, eq
2664 ; P8-NEXT: fcmpu cr1, f2, f4
2665 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
2666 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2667 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2670 ; P9-LABEL: fcmp_olt_ppcf128:
2672 ; P9-NEXT: fcmpu cr0, f1, f3
2673 ; P9-NEXT: fcmpu cr1, f2, f4
2675 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
2676 ; P9-NEXT: crandc 4*cr5+gt, lt, eq
2677 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2678 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2681 ; NOVSX-LABEL: fcmp_olt_ppcf128:
2683 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2684 ; NOVSX-NEXT: li r3, 1
2685 ; NOVSX-NEXT: crandc 4*cr5+gt, lt, eq
2686 ; NOVSX-NEXT: fcmpu cr1, f2, f4
2687 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
2688 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2689 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2691 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"olt", metadata !"fpexcept.strict") #0
2692 %conv = zext i1 %cmp to i32
2696 define i32 @fcmp_ole_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2697 ; P8-LABEL: fcmp_ole_ppcf128:
2699 ; P8-NEXT: fcmpu cr0, f2, f4
2701 ; P8-NEXT: crnor 4*cr5+lt, un, gt
2702 ; P8-NEXT: fcmpu cr0, f1, f3
2703 ; P8-NEXT: crnor 4*cr5+gt, un, gt
2704 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2705 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2706 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2707 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2710 ; P9-LABEL: fcmp_ole_ppcf128:
2712 ; P9-NEXT: fcmpu cr0, f2, f4
2714 ; P9-NEXT: crnor 4*cr5+lt, un, gt
2715 ; P9-NEXT: fcmpu cr0, f1, f3
2716 ; P9-NEXT: crnor 4*cr5+gt, un, gt
2717 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2718 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2719 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2720 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2723 ; NOVSX-LABEL: fcmp_ole_ppcf128:
2725 ; NOVSX-NEXT: fcmpu cr0, f2, f4
2726 ; NOVSX-NEXT: li r3, 1
2727 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
2728 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2729 ; NOVSX-NEXT: crnor 4*cr5+gt, un, gt
2730 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2731 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2732 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2733 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2735 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ole", metadata !"fpexcept.strict") #0
2736 %conv = zext i1 %cmp to i32
2740 define i32 @fcmp_ogt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2741 ; P8-LABEL: fcmp_ogt_ppcf128:
2743 ; P8-NEXT: fcmpu cr0, f1, f3
2745 ; P8-NEXT: crandc 4*cr5+gt, gt, eq
2746 ; P8-NEXT: fcmpu cr1, f2, f4
2747 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
2748 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2749 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2752 ; P9-LABEL: fcmp_ogt_ppcf128:
2754 ; P9-NEXT: fcmpu cr0, f1, f3
2755 ; P9-NEXT: fcmpu cr1, f2, f4
2757 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
2758 ; P9-NEXT: crandc 4*cr5+gt, gt, eq
2759 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2760 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2763 ; NOVSX-LABEL: fcmp_ogt_ppcf128:
2765 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2766 ; NOVSX-NEXT: li r3, 1
2767 ; NOVSX-NEXT: crandc 4*cr5+gt, gt, eq
2768 ; NOVSX-NEXT: fcmpu cr1, f2, f4
2769 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
2770 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2771 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2773 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ogt", metadata !"fpexcept.strict") #0
2774 %conv = zext i1 %cmp to i32
2778 define i32 @fcmp_oge_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2779 ; P8-LABEL: fcmp_oge_ppcf128:
2781 ; P8-NEXT: fcmpu cr0, f2, f4
2783 ; P8-NEXT: crnor 4*cr5+lt, un, lt
2784 ; P8-NEXT: fcmpu cr0, f1, f3
2785 ; P8-NEXT: crnor 4*cr5+gt, un, lt
2786 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2787 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2788 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2789 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2792 ; P9-LABEL: fcmp_oge_ppcf128:
2794 ; P9-NEXT: fcmpu cr0, f2, f4
2796 ; P9-NEXT: crnor 4*cr5+lt, un, lt
2797 ; P9-NEXT: fcmpu cr0, f1, f3
2798 ; P9-NEXT: crnor 4*cr5+gt, un, lt
2799 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2800 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2801 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2802 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2805 ; NOVSX-LABEL: fcmp_oge_ppcf128:
2807 ; NOVSX-NEXT: fcmpu cr0, f2, f4
2808 ; NOVSX-NEXT: li r3, 1
2809 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
2810 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2811 ; NOVSX-NEXT: crnor 4*cr5+gt, un, lt
2812 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2813 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2814 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2815 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2817 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"oge", metadata !"fpexcept.strict") #0
2818 %conv = zext i1 %cmp to i32
2822 define i32 @fcmp_oeq_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2823 ; P8-LABEL: fcmp_oeq_ppcf128:
2825 ; P8-NEXT: fcmpu cr0, f1, f3
2827 ; P8-NEXT: crandc 4*cr5+gt, eq, eq
2828 ; P8-NEXT: fcmpu cr1, f2, f4
2829 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
2830 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2831 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2834 ; P9-LABEL: fcmp_oeq_ppcf128:
2836 ; P9-NEXT: fcmpu cr0, f1, f3
2837 ; P9-NEXT: fcmpu cr1, f2, f4
2839 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
2840 ; P9-NEXT: crandc 4*cr5+gt, eq, eq
2841 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2842 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2845 ; NOVSX-LABEL: fcmp_oeq_ppcf128:
2847 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2848 ; NOVSX-NEXT: li r3, 1
2849 ; NOVSX-NEXT: crandc 4*cr5+gt, eq, eq
2850 ; NOVSX-NEXT: fcmpu cr1, f2, f4
2851 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
2852 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2853 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2855 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"oeq", metadata !"fpexcept.strict") #0
2856 %conv = zext i1 %cmp to i32
2860 define i32 @fcmp_one_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2861 ; P8-LABEL: fcmp_one_ppcf128:
2863 ; P8-NEXT: fcmpu cr0, f2, f4
2865 ; P8-NEXT: crnor 4*cr5+lt, un, eq
2866 ; P8-NEXT: fcmpu cr0, f1, f3
2867 ; P8-NEXT: crnor 4*cr5+gt, un, eq
2868 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2869 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2870 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2871 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2874 ; P9-LABEL: fcmp_one_ppcf128:
2876 ; P9-NEXT: fcmpu cr0, f2, f4
2878 ; P9-NEXT: crnor 4*cr5+lt, un, eq
2879 ; P9-NEXT: fcmpu cr0, f1, f3
2880 ; P9-NEXT: crnor 4*cr5+gt, un, eq
2881 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2882 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2883 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2884 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2887 ; NOVSX-LABEL: fcmp_one_ppcf128:
2889 ; NOVSX-NEXT: fcmpu cr0, f2, f4
2890 ; NOVSX-NEXT: li r3, 1
2891 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
2892 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2893 ; NOVSX-NEXT: crnor 4*cr5+gt, un, eq
2894 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2895 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2896 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2897 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2899 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"one", metadata !"fpexcept.strict") #0
2900 %conv = zext i1 %cmp to i32
2904 define i32 @fcmp_ult_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2905 ; P8-LABEL: fcmp_ult_ppcf128:
2907 ; P8-NEXT: fcmpu cr0, f1, f3
2909 ; P8-NEXT: cror 4*cr5+gt, lt, un
2910 ; P8-NEXT: fcmpu cr1, f2, f4
2911 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
2912 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2913 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2914 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2915 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2918 ; P9-LABEL: fcmp_ult_ppcf128:
2920 ; P9-NEXT: fcmpu cr0, f1, f3
2921 ; P9-NEXT: fcmpu cr1, f2, f4
2923 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
2924 ; P9-NEXT: cror 4*cr5+gt, lt, un
2925 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2926 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2927 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2928 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2931 ; NOVSX-LABEL: fcmp_ult_ppcf128:
2933 ; NOVSX-NEXT: fcmpu cr0, f1, f3
2934 ; NOVSX-NEXT: li r3, 1
2935 ; NOVSX-NEXT: cror 4*cr5+gt, lt, un
2936 ; NOVSX-NEXT: fcmpu cr1, f2, f4
2937 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
2938 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2939 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2940 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2941 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2943 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ult", metadata !"fpexcept.strict") #0
2944 %conv = zext i1 %cmp to i32
2948 define i32 @fcmp_ule_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2949 ; P8-LABEL: fcmp_ule_ppcf128:
2951 ; P8-NEXT: fcmpu cr0, f2, f4
2953 ; P8-NEXT: fcmpu cr1, f1, f3
2954 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
2955 ; P8-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
2956 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2957 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
2960 ; P9-LABEL: fcmp_ule_ppcf128:
2962 ; P9-NEXT: fcmpu cr0, f2, f4
2963 ; P9-NEXT: fcmpu cr1, f1, f3
2965 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
2966 ; P9-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
2967 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2968 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
2971 ; NOVSX-LABEL: fcmp_ule_ppcf128:
2973 ; NOVSX-NEXT: fcmpu cr0, f2, f4
2974 ; NOVSX-NEXT: li r3, 1
2975 ; NOVSX-NEXT: fcmpu cr1, f1, f3
2976 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
2977 ; NOVSX-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
2978 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2979 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
2981 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ule", metadata !"fpexcept.strict") #0
2982 %conv = zext i1 %cmp to i32
2986 define i32 @fcmp_ugt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
2987 ; P8-LABEL: fcmp_ugt_ppcf128:
2989 ; P8-NEXT: fcmpu cr0, f1, f3
2991 ; P8-NEXT: cror 4*cr5+gt, gt, un
2992 ; P8-NEXT: fcmpu cr1, f2, f4
2993 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
2994 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
2995 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
2996 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
2997 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3000 ; P9-LABEL: fcmp_ugt_ppcf128:
3002 ; P9-NEXT: fcmpu cr0, f1, f3
3003 ; P9-NEXT: fcmpu cr1, f2, f4
3005 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
3006 ; P9-NEXT: cror 4*cr5+gt, gt, un
3007 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3008 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3009 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3010 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3013 ; NOVSX-LABEL: fcmp_ugt_ppcf128:
3015 ; NOVSX-NEXT: fcmpu cr0, f1, f3
3016 ; NOVSX-NEXT: li r3, 1
3017 ; NOVSX-NEXT: cror 4*cr5+gt, gt, un
3018 ; NOVSX-NEXT: fcmpu cr1, f2, f4
3019 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
3020 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3021 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3022 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3023 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3025 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ugt", metadata !"fpexcept.strict") #0
3026 %conv = zext i1 %cmp to i32
3030 define i32 @fcmp_uge_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3031 ; P8-LABEL: fcmp_uge_ppcf128:
3033 ; P8-NEXT: fcmpu cr0, f2, f4
3035 ; P8-NEXT: fcmpu cr1, f1, f3
3036 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3037 ; P8-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3038 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3039 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3042 ; P9-LABEL: fcmp_uge_ppcf128:
3044 ; P9-NEXT: fcmpu cr0, f2, f4
3045 ; P9-NEXT: fcmpu cr1, f1, f3
3047 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3048 ; P9-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3049 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3050 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3053 ; NOVSX-LABEL: fcmp_uge_ppcf128:
3055 ; NOVSX-NEXT: fcmpu cr0, f2, f4
3056 ; NOVSX-NEXT: li r3, 1
3057 ; NOVSX-NEXT: fcmpu cr1, f1, f3
3058 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3059 ; NOVSX-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3060 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3061 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3063 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"uge", metadata !"fpexcept.strict") #0
3064 %conv = zext i1 %cmp to i32
3068 define i32 @fcmp_ueq_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3069 ; P8-LABEL: fcmp_ueq_ppcf128:
3071 ; P8-NEXT: fcmpu cr0, f1, f3
3073 ; P8-NEXT: cror 4*cr5+gt, eq, un
3074 ; P8-NEXT: fcmpu cr1, f2, f4
3075 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3076 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3077 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3078 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3079 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3082 ; P9-LABEL: fcmp_ueq_ppcf128:
3084 ; P9-NEXT: fcmpu cr0, f1, f3
3085 ; P9-NEXT: fcmpu cr1, f2, f4
3087 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3088 ; P9-NEXT: cror 4*cr5+gt, eq, un
3089 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3090 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3091 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3092 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3095 ; NOVSX-LABEL: fcmp_ueq_ppcf128:
3097 ; NOVSX-NEXT: fcmpu cr0, f1, f3
3098 ; NOVSX-NEXT: li r3, 1
3099 ; NOVSX-NEXT: cror 4*cr5+gt, eq, un
3100 ; NOVSX-NEXT: fcmpu cr1, f2, f4
3101 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3102 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3103 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3104 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3105 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3107 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ueq", metadata !"fpexcept.strict") #0
3108 %conv = zext i1 %cmp to i32
3112 define i32 @fcmp_une_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3113 ; P8-LABEL: fcmp_une_ppcf128:
3115 ; P8-NEXT: fcmpu cr0, f2, f4
3117 ; P8-NEXT: fcmpu cr1, f1, f3
3118 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3119 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3120 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3123 ; P9-LABEL: fcmp_une_ppcf128:
3125 ; P9-NEXT: fcmpu cr0, f2, f4
3126 ; P9-NEXT: fcmpu cr1, f1, f3
3128 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3129 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3130 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3133 ; NOVSX-LABEL: fcmp_une_ppcf128:
3135 ; NOVSX-NEXT: fcmpu cr0, f2, f4
3136 ; NOVSX-NEXT: li r3, 1
3137 ; NOVSX-NEXT: fcmpu cr1, f1, f3
3138 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3139 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3140 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3142 %cmp = call i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"une", metadata !"fpexcept.strict") #0
3143 %conv = zext i1 %cmp to i32
3147 define i32 @fcmps_olt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3148 ; P8-LABEL: fcmps_olt_ppcf128:
3150 ; P8-NEXT: fcmpo cr0, f1, f3
3152 ; P8-NEXT: crandc 4*cr5+gt, lt, eq
3153 ; P8-NEXT: fcmpo cr1, f2, f4
3154 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
3155 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3156 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3159 ; P9-LABEL: fcmps_olt_ppcf128:
3161 ; P9-NEXT: fcmpo cr0, f1, f3
3162 ; P9-NEXT: fcmpo cr1, f2, f4
3164 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
3165 ; P9-NEXT: crandc 4*cr5+gt, lt, eq
3166 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3167 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3170 ; NOVSX-LABEL: fcmps_olt_ppcf128:
3172 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3173 ; NOVSX-NEXT: li r3, 1
3174 ; NOVSX-NEXT: crandc 4*cr5+gt, lt, eq
3175 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3176 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+lt
3177 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3178 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3180 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"olt", metadata !"fpexcept.strict") #0
3181 %conv = zext i1 %cmp to i32
3185 define i32 @fcmps_ole_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3186 ; P8-LABEL: fcmps_ole_ppcf128:
3188 ; P8-NEXT: fcmpo cr0, f2, f4
3190 ; P8-NEXT: crnor 4*cr5+lt, un, gt
3191 ; P8-NEXT: fcmpo cr0, f1, f3
3192 ; P8-NEXT: crnor 4*cr5+gt, un, gt
3193 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3194 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3195 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3196 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3199 ; P9-LABEL: fcmps_ole_ppcf128:
3201 ; P9-NEXT: fcmpo cr0, f2, f4
3203 ; P9-NEXT: crnor 4*cr5+lt, un, gt
3204 ; P9-NEXT: fcmpo cr0, f1, f3
3205 ; P9-NEXT: crnor 4*cr5+gt, un, gt
3206 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3207 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3208 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3209 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3212 ; NOVSX-LABEL: fcmps_ole_ppcf128:
3214 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3215 ; NOVSX-NEXT: li r3, 1
3216 ; NOVSX-NEXT: crnor 4*cr5+lt, un, gt
3217 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3218 ; NOVSX-NEXT: crnor 4*cr5+gt, un, gt
3219 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3220 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3221 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3222 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3224 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ole", metadata !"fpexcept.strict") #0
3225 %conv = zext i1 %cmp to i32
3229 define i32 @fcmps_ogt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3230 ; P8-LABEL: fcmps_ogt_ppcf128:
3232 ; P8-NEXT: fcmpo cr0, f1, f3
3234 ; P8-NEXT: crandc 4*cr5+gt, gt, eq
3235 ; P8-NEXT: fcmpo cr1, f2, f4
3236 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
3237 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3238 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3241 ; P9-LABEL: fcmps_ogt_ppcf128:
3243 ; P9-NEXT: fcmpo cr0, f1, f3
3244 ; P9-NEXT: fcmpo cr1, f2, f4
3246 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
3247 ; P9-NEXT: crandc 4*cr5+gt, gt, eq
3248 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3249 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3252 ; NOVSX-LABEL: fcmps_ogt_ppcf128:
3254 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3255 ; NOVSX-NEXT: li r3, 1
3256 ; NOVSX-NEXT: crandc 4*cr5+gt, gt, eq
3257 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3258 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+gt
3259 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3260 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3262 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ogt", metadata !"fpexcept.strict") #0
3263 %conv = zext i1 %cmp to i32
3267 define i32 @fcmps_oge_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3268 ; P8-LABEL: fcmps_oge_ppcf128:
3270 ; P8-NEXT: fcmpo cr0, f2, f4
3272 ; P8-NEXT: crnor 4*cr5+lt, un, lt
3273 ; P8-NEXT: fcmpo cr0, f1, f3
3274 ; P8-NEXT: crnor 4*cr5+gt, un, lt
3275 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3276 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3277 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3278 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3281 ; P9-LABEL: fcmps_oge_ppcf128:
3283 ; P9-NEXT: fcmpo cr0, f2, f4
3285 ; P9-NEXT: crnor 4*cr5+lt, un, lt
3286 ; P9-NEXT: fcmpo cr0, f1, f3
3287 ; P9-NEXT: crnor 4*cr5+gt, un, lt
3288 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3289 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3290 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3291 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3294 ; NOVSX-LABEL: fcmps_oge_ppcf128:
3296 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3297 ; NOVSX-NEXT: li r3, 1
3298 ; NOVSX-NEXT: crnor 4*cr5+lt, un, lt
3299 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3300 ; NOVSX-NEXT: crnor 4*cr5+gt, un, lt
3301 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3302 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3303 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3304 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3306 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"oge", metadata !"fpexcept.strict") #0
3307 %conv = zext i1 %cmp to i32
3311 define i32 @fcmps_oeq_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3312 ; P8-LABEL: fcmps_oeq_ppcf128:
3314 ; P8-NEXT: fcmpo cr0, f1, f3
3316 ; P8-NEXT: crandc 4*cr5+gt, eq, eq
3317 ; P8-NEXT: fcmpo cr1, f2, f4
3318 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
3319 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3320 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3323 ; P9-LABEL: fcmps_oeq_ppcf128:
3325 ; P9-NEXT: fcmpo cr0, f1, f3
3326 ; P9-NEXT: fcmpo cr1, f2, f4
3328 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
3329 ; P9-NEXT: crandc 4*cr5+gt, eq, eq
3330 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3331 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3334 ; NOVSX-LABEL: fcmps_oeq_ppcf128:
3336 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3337 ; NOVSX-NEXT: li r3, 1
3338 ; NOVSX-NEXT: crandc 4*cr5+gt, eq, eq
3339 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3340 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr1+eq
3341 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3342 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3344 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"oeq", metadata !"fpexcept.strict") #0
3345 %conv = zext i1 %cmp to i32
3349 define i32 @fcmps_one_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3350 ; P8-LABEL: fcmps_one_ppcf128:
3352 ; P8-NEXT: fcmpo cr0, f2, f4
3354 ; P8-NEXT: crnor 4*cr5+lt, un, eq
3355 ; P8-NEXT: fcmpo cr0, f1, f3
3356 ; P8-NEXT: crnor 4*cr5+gt, un, eq
3357 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3358 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3359 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3360 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3363 ; P9-LABEL: fcmps_one_ppcf128:
3365 ; P9-NEXT: fcmpo cr0, f2, f4
3367 ; P9-NEXT: crnor 4*cr5+lt, un, eq
3368 ; P9-NEXT: fcmpo cr0, f1, f3
3369 ; P9-NEXT: crnor 4*cr5+gt, un, eq
3370 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3371 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3372 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3373 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3376 ; NOVSX-LABEL: fcmps_one_ppcf128:
3378 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3379 ; NOVSX-NEXT: li r3, 1
3380 ; NOVSX-NEXT: crnor 4*cr5+lt, un, eq
3381 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3382 ; NOVSX-NEXT: crnor 4*cr5+gt, un, eq
3383 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3384 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3385 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3386 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3388 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"one", metadata !"fpexcept.strict") #0
3389 %conv = zext i1 %cmp to i32
3393 define i32 @fcmps_ult_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3394 ; P8-LABEL: fcmps_ult_ppcf128:
3396 ; P8-NEXT: fcmpo cr0, f1, f3
3398 ; P8-NEXT: cror 4*cr5+gt, lt, un
3399 ; P8-NEXT: fcmpo cr1, f2, f4
3400 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
3401 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3402 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3403 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3404 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3407 ; P9-LABEL: fcmps_ult_ppcf128:
3409 ; P9-NEXT: fcmpo cr0, f1, f3
3410 ; P9-NEXT: fcmpo cr1, f2, f4
3412 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
3413 ; P9-NEXT: cror 4*cr5+gt, lt, un
3414 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3415 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3416 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3417 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3420 ; NOVSX-LABEL: fcmps_ult_ppcf128:
3422 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3423 ; NOVSX-NEXT: li r3, 1
3424 ; NOVSX-NEXT: cror 4*cr5+gt, lt, un
3425 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3426 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+lt, 4*cr1+un
3427 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3428 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3429 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3430 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3432 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ult", metadata !"fpexcept.strict") #0
3433 %conv = zext i1 %cmp to i32
3437 define i32 @fcmps_ule_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3438 ; P8-LABEL: fcmps_ule_ppcf128:
3440 ; P8-NEXT: fcmpo cr0, f2, f4
3442 ; P8-NEXT: fcmpo cr1, f1, f3
3443 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
3444 ; P8-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
3445 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3446 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3449 ; P9-LABEL: fcmps_ule_ppcf128:
3451 ; P9-NEXT: fcmpo cr0, f2, f4
3452 ; P9-NEXT: fcmpo cr1, f1, f3
3454 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
3455 ; P9-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
3456 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3457 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3460 ; NOVSX-LABEL: fcmps_ule_ppcf128:
3462 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3463 ; NOVSX-NEXT: li r3, 1
3464 ; NOVSX-NEXT: fcmpo cr1, f1, f3
3465 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, gt
3466 ; NOVSX-NEXT: crnor 4*cr5+gt, 4*cr1+gt, 4*cr1+eq
3467 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3468 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3470 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ule", metadata !"fpexcept.strict") #0
3471 %conv = zext i1 %cmp to i32
3475 define i32 @fcmps_ugt_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3476 ; P8-LABEL: fcmps_ugt_ppcf128:
3478 ; P8-NEXT: fcmpo cr0, f1, f3
3480 ; P8-NEXT: cror 4*cr5+gt, gt, un
3481 ; P8-NEXT: fcmpo cr1, f2, f4
3482 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
3483 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3484 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3485 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3486 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3489 ; P9-LABEL: fcmps_ugt_ppcf128:
3491 ; P9-NEXT: fcmpo cr0, f1, f3
3492 ; P9-NEXT: fcmpo cr1, f2, f4
3494 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
3495 ; P9-NEXT: cror 4*cr5+gt, gt, un
3496 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3497 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3498 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3499 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3502 ; NOVSX-LABEL: fcmps_ugt_ppcf128:
3504 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3505 ; NOVSX-NEXT: li r3, 1
3506 ; NOVSX-NEXT: cror 4*cr5+gt, gt, un
3507 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3508 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+gt, 4*cr1+un
3509 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3510 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3511 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3512 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3514 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ugt", metadata !"fpexcept.strict") #0
3515 %conv = zext i1 %cmp to i32
3519 define i32 @fcmps_uge_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3520 ; P8-LABEL: fcmps_uge_ppcf128:
3522 ; P8-NEXT: fcmpo cr0, f2, f4
3524 ; P8-NEXT: fcmpo cr1, f1, f3
3525 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3526 ; P8-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3527 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3528 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3531 ; P9-LABEL: fcmps_uge_ppcf128:
3533 ; P9-NEXT: fcmpo cr0, f2, f4
3534 ; P9-NEXT: fcmpo cr1, f1, f3
3536 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3537 ; P9-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3538 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3539 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3542 ; NOVSX-LABEL: fcmps_uge_ppcf128:
3544 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3545 ; NOVSX-NEXT: li r3, 1
3546 ; NOVSX-NEXT: fcmpo cr1, f1, f3
3547 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, lt
3548 ; NOVSX-NEXT: crnor 4*cr5+gt, 4*cr1+lt, 4*cr1+eq
3549 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3550 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3552 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"uge", metadata !"fpexcept.strict") #0
3553 %conv = zext i1 %cmp to i32
3557 define i32 @fcmps_ueq_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3558 ; P8-LABEL: fcmps_ueq_ppcf128:
3560 ; P8-NEXT: fcmpo cr0, f1, f3
3562 ; P8-NEXT: cror 4*cr5+gt, eq, un
3563 ; P8-NEXT: fcmpo cr1, f2, f4
3564 ; P8-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3565 ; P8-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3566 ; P8-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3567 ; P8-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3568 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3571 ; P9-LABEL: fcmps_ueq_ppcf128:
3573 ; P9-NEXT: fcmpo cr0, f1, f3
3574 ; P9-NEXT: fcmpo cr1, f2, f4
3576 ; P9-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3577 ; P9-NEXT: cror 4*cr5+gt, eq, un
3578 ; P9-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3579 ; P9-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3580 ; P9-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3581 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3584 ; NOVSX-LABEL: fcmps_ueq_ppcf128:
3586 ; NOVSX-NEXT: fcmpo cr0, f1, f3
3587 ; NOVSX-NEXT: li r3, 1
3588 ; NOVSX-NEXT: cror 4*cr5+gt, eq, un
3589 ; NOVSX-NEXT: fcmpo cr1, f2, f4
3590 ; NOVSX-NEXT: cror 4*cr5+lt, 4*cr1+eq, 4*cr1+un
3591 ; NOVSX-NEXT: crand 4*cr5+lt, eq, 4*cr5+lt
3592 ; NOVSX-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
3593 ; NOVSX-NEXT: crnor 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
3594 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3596 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"ueq", metadata !"fpexcept.strict") #0
3597 %conv = zext i1 %cmp to i32
3601 define i32 @fcmps_une_ppcf128(ppc_fp128 %a, ppc_fp128 %b) #0 {
3602 ; P8-LABEL: fcmps_une_ppcf128:
3604 ; P8-NEXT: fcmpo cr0, f2, f4
3606 ; P8-NEXT: fcmpo cr1, f1, f3
3607 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3608 ; P8-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3609 ; P8-NEXT: isel r3, 0, r3, 4*cr5+lt
3612 ; P9-LABEL: fcmps_une_ppcf128:
3614 ; P9-NEXT: fcmpo cr0, f2, f4
3615 ; P9-NEXT: fcmpo cr1, f1, f3
3617 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3618 ; P9-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3619 ; P9-NEXT: isel r3, 0, r3, 4*cr5+lt
3622 ; NOVSX-LABEL: fcmps_une_ppcf128:
3624 ; NOVSX-NEXT: fcmpo cr0, f2, f4
3625 ; NOVSX-NEXT: li r3, 1
3626 ; NOVSX-NEXT: fcmpo cr1, f1, f3
3627 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
3628 ; NOVSX-NEXT: crandc 4*cr5+lt, 4*cr1+eq, 4*cr5+lt
3629 ; NOVSX-NEXT: isel r3, 0, r3, 4*cr5+lt
3631 %cmp = call i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128 %a, ppc_fp128 %b, metadata !"une", metadata !"fpexcept.strict") #0
3632 %conv = zext i1 %cmp to i32
3636 attributes #0 = { strictfp nounwind }
3638 declare i1 @llvm.experimental.constrained.fcmp.f32(float, float, metadata, metadata)
3639 declare i1 @llvm.experimental.constrained.fcmp.f64(double, double, metadata, metadata)
3640 declare i1 @llvm.experimental.constrained.fcmps.f32(float, float, metadata, metadata)
3641 declare i1 @llvm.experimental.constrained.fcmps.f64(double, double, metadata, metadata)
3642 declare i1 @llvm.experimental.constrained.fcmps.f128(fp128, fp128, metadata, metadata)
3643 declare i1 @llvm.experimental.constrained.fcmp.f128(fp128, fp128, metadata, metadata)
3644 declare i1 @llvm.experimental.constrained.fcmps.ppcf128(ppc_fp128, ppc_fp128, metadata, metadata)
3645 declare i1 @llvm.experimental.constrained.fcmp.ppcf128(ppc_fp128, ppc_fp128, metadata, metadata)