1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=-sse -O3 | FileCheck %s --check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -O3 | FileCheck %s --check-prefixes=X64
5 define i32 @test_oeq_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
6 ; X86-LABEL: test_oeq_q:
8 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
9 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
12 ; X86-NEXT: fnstsw %ax
13 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
15 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
16 ; X86-NEXT: jne .LBB0_3
18 ; X86-NEXT: jp .LBB0_3
20 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
22 ; X86-NEXT: movl (%eax), %eax
25 ; X64-LABEL: test_oeq_q:
27 ; X64-NEXT: movl %edi, %eax
28 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
29 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
30 ; X64-NEXT: fucompi %st(1), %st
31 ; X64-NEXT: fstp %st(0)
33 ; X64-NEXT: cmovnel %esi, %eax
34 ; X64-NEXT: cmovpl %esi, %eax
36 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
37 x86_fp80 %f1, x86_fp80 %f2, metadata !"oeq",
38 metadata !"fpexcept.strict") #0
39 %res = select i1 %cond, i32 %a, i32 %b
43 define i32 @test_ogt_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
44 ; X86-LABEL: test_ogt_q:
46 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
47 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
50 ; X86-NEXT: fnstsw %ax
51 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
53 ; X86-NEXT: ja .LBB1_1
55 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
56 ; X86-NEXT: movl (%eax), %eax
59 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
60 ; X86-NEXT: movl (%eax), %eax
63 ; X64-LABEL: test_ogt_q:
65 ; X64-NEXT: movl %edi, %eax
66 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
67 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
68 ; X64-NEXT: fucompi %st(1), %st
69 ; X64-NEXT: fstp %st(0)
71 ; X64-NEXT: cmovbel %esi, %eax
73 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
74 x86_fp80 %f1, x86_fp80 %f2, metadata !"ogt",
75 metadata !"fpexcept.strict") #0
76 %res = select i1 %cond, i32 %a, i32 %b
80 define i32 @test_oge_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
81 ; X86-LABEL: test_oge_q:
83 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
84 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
87 ; X86-NEXT: fnstsw %ax
88 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
90 ; X86-NEXT: jae .LBB2_1
92 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
93 ; X86-NEXT: movl (%eax), %eax
96 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
97 ; X86-NEXT: movl (%eax), %eax
100 ; X64-LABEL: test_oge_q:
102 ; X64-NEXT: movl %edi, %eax
103 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
104 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
105 ; X64-NEXT: fucompi %st(1), %st
106 ; X64-NEXT: fstp %st(0)
108 ; X64-NEXT: cmovbl %esi, %eax
110 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
111 x86_fp80 %f1, x86_fp80 %f2, metadata !"oge",
112 metadata !"fpexcept.strict") #0
113 %res = select i1 %cond, i32 %a, i32 %b
117 define i32 @test_olt_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
118 ; X86-LABEL: test_olt_q:
120 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
121 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
124 ; X86-NEXT: fnstsw %ax
125 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
127 ; X86-NEXT: ja .LBB3_1
129 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
130 ; X86-NEXT: movl (%eax), %eax
133 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
134 ; X86-NEXT: movl (%eax), %eax
137 ; X64-LABEL: test_olt_q:
139 ; X64-NEXT: movl %edi, %eax
140 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
141 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
142 ; X64-NEXT: fucompi %st(1), %st
143 ; X64-NEXT: fstp %st(0)
145 ; X64-NEXT: cmovbel %esi, %eax
147 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
148 x86_fp80 %f1, x86_fp80 %f2, metadata !"olt",
149 metadata !"fpexcept.strict") #0
150 %res = select i1 %cond, i32 %a, i32 %b
154 define i32 @test_ole_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
155 ; X86-LABEL: test_ole_q:
157 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
158 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
161 ; X86-NEXT: fnstsw %ax
162 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
164 ; X86-NEXT: jae .LBB4_1
166 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
167 ; X86-NEXT: movl (%eax), %eax
170 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
171 ; X86-NEXT: movl (%eax), %eax
174 ; X64-LABEL: test_ole_q:
176 ; X64-NEXT: movl %edi, %eax
177 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
178 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
179 ; X64-NEXT: fucompi %st(1), %st
180 ; X64-NEXT: fstp %st(0)
182 ; X64-NEXT: cmovbl %esi, %eax
184 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
185 x86_fp80 %f1, x86_fp80 %f2, metadata !"ole",
186 metadata !"fpexcept.strict") #0
187 %res = select i1 %cond, i32 %a, i32 %b
191 define i32 @test_one_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
192 ; X86-LABEL: test_one_q:
194 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
195 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
198 ; X86-NEXT: fnstsw %ax
199 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
201 ; X86-NEXT: jne .LBB5_1
203 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
204 ; X86-NEXT: movl (%eax), %eax
207 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
208 ; X86-NEXT: movl (%eax), %eax
211 ; X64-LABEL: test_one_q:
213 ; X64-NEXT: movl %edi, %eax
214 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
215 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
216 ; X64-NEXT: fucompi %st(1), %st
217 ; X64-NEXT: fstp %st(0)
219 ; X64-NEXT: cmovel %esi, %eax
221 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
222 x86_fp80 %f1, x86_fp80 %f2, metadata !"one",
223 metadata !"fpexcept.strict") #0
224 %res = select i1 %cond, i32 %a, i32 %b
228 define i32 @test_ord_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
229 ; X86-LABEL: test_ord_q:
231 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
232 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
235 ; X86-NEXT: fnstsw %ax
236 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
238 ; X86-NEXT: jnp .LBB6_1
240 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
241 ; X86-NEXT: movl (%eax), %eax
244 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
245 ; X86-NEXT: movl (%eax), %eax
248 ; X64-LABEL: test_ord_q:
250 ; X64-NEXT: movl %edi, %eax
251 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
252 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
253 ; X64-NEXT: fucompi %st(1), %st
254 ; X64-NEXT: fstp %st(0)
256 ; X64-NEXT: cmovpl %esi, %eax
258 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
259 x86_fp80 %f1, x86_fp80 %f2, metadata !"ord",
260 metadata !"fpexcept.strict") #0
261 %res = select i1 %cond, i32 %a, i32 %b
265 define i32 @test_ueq_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
266 ; X86-LABEL: test_ueq_q:
268 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
269 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
272 ; X86-NEXT: fnstsw %ax
273 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
275 ; X86-NEXT: je .LBB7_1
277 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
278 ; X86-NEXT: movl (%eax), %eax
281 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
282 ; X86-NEXT: movl (%eax), %eax
285 ; X64-LABEL: test_ueq_q:
287 ; X64-NEXT: movl %edi, %eax
288 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
289 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
290 ; X64-NEXT: fucompi %st(1), %st
291 ; X64-NEXT: fstp %st(0)
293 ; X64-NEXT: cmovnel %esi, %eax
295 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
296 x86_fp80 %f1, x86_fp80 %f2, metadata !"ueq",
297 metadata !"fpexcept.strict") #0
298 %res = select i1 %cond, i32 %a, i32 %b
302 define i32 @test_ugt_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
303 ; X86-LABEL: test_ugt_q:
305 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
306 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
309 ; X86-NEXT: fnstsw %ax
310 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
312 ; X86-NEXT: jb .LBB8_1
314 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
315 ; X86-NEXT: movl (%eax), %eax
318 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
319 ; X86-NEXT: movl (%eax), %eax
322 ; X64-LABEL: test_ugt_q:
324 ; X64-NEXT: movl %edi, %eax
325 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
326 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
327 ; X64-NEXT: fucompi %st(1), %st
328 ; X64-NEXT: fstp %st(0)
330 ; X64-NEXT: cmovael %esi, %eax
332 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
333 x86_fp80 %f1, x86_fp80 %f2, metadata !"ugt",
334 metadata !"fpexcept.strict") #0
335 %res = select i1 %cond, i32 %a, i32 %b
339 define i32 @test_uge_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
340 ; X86-LABEL: test_uge_q:
342 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
343 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
346 ; X86-NEXT: fnstsw %ax
347 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
349 ; X86-NEXT: jbe .LBB9_1
351 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
352 ; X86-NEXT: movl (%eax), %eax
355 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
356 ; X86-NEXT: movl (%eax), %eax
359 ; X64-LABEL: test_uge_q:
361 ; X64-NEXT: movl %edi, %eax
362 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
363 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
364 ; X64-NEXT: fucompi %st(1), %st
365 ; X64-NEXT: fstp %st(0)
367 ; X64-NEXT: cmoval %esi, %eax
369 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
370 x86_fp80 %f1, x86_fp80 %f2, metadata !"uge",
371 metadata !"fpexcept.strict") #0
372 %res = select i1 %cond, i32 %a, i32 %b
376 define i32 @test_ult_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
377 ; X86-LABEL: test_ult_q:
379 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
380 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
383 ; X86-NEXT: fnstsw %ax
384 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
386 ; X86-NEXT: jb .LBB10_1
388 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
389 ; X86-NEXT: movl (%eax), %eax
391 ; X86-NEXT: .LBB10_1:
392 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
393 ; X86-NEXT: movl (%eax), %eax
396 ; X64-LABEL: test_ult_q:
398 ; X64-NEXT: movl %edi, %eax
399 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
400 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
401 ; X64-NEXT: fucompi %st(1), %st
402 ; X64-NEXT: fstp %st(0)
404 ; X64-NEXT: cmovael %esi, %eax
406 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
407 x86_fp80 %f1, x86_fp80 %f2, metadata !"ult",
408 metadata !"fpexcept.strict") #0
409 %res = select i1 %cond, i32 %a, i32 %b
413 define i32 @test_ule_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
414 ; X86-LABEL: test_ule_q:
416 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
417 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
420 ; X86-NEXT: fnstsw %ax
421 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
423 ; X86-NEXT: jbe .LBB11_1
425 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
426 ; X86-NEXT: movl (%eax), %eax
428 ; X86-NEXT: .LBB11_1:
429 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
430 ; X86-NEXT: movl (%eax), %eax
433 ; X64-LABEL: test_ule_q:
435 ; X64-NEXT: movl %edi, %eax
436 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
437 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
438 ; X64-NEXT: fucompi %st(1), %st
439 ; X64-NEXT: fstp %st(0)
441 ; X64-NEXT: cmoval %esi, %eax
443 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
444 x86_fp80 %f1, x86_fp80 %f2, metadata !"ule",
445 metadata !"fpexcept.strict") #0
446 %res = select i1 %cond, i32 %a, i32 %b
450 define i32 @test_une_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
451 ; X86-LABEL: test_une_q:
453 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
454 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
457 ; X86-NEXT: fnstsw %ax
458 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
460 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
461 ; X86-NEXT: jne .LBB12_3
463 ; X86-NEXT: jp .LBB12_3
465 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
466 ; X86-NEXT: .LBB12_3:
467 ; X86-NEXT: movl (%eax), %eax
470 ; X64-LABEL: test_une_q:
472 ; X64-NEXT: movl %esi, %eax
473 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
474 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
475 ; X64-NEXT: fucompi %st(1), %st
476 ; X64-NEXT: fstp %st(0)
478 ; X64-NEXT: cmovnel %edi, %eax
479 ; X64-NEXT: cmovpl %edi, %eax
481 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
482 x86_fp80 %f1, x86_fp80 %f2, metadata !"une",
483 metadata !"fpexcept.strict") #0
484 %res = select i1 %cond, i32 %a, i32 %b
488 define i32 @test_uno_q(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
489 ; X86-LABEL: test_uno_q:
491 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
492 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
495 ; X86-NEXT: fnstsw %ax
496 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
498 ; X86-NEXT: jp .LBB13_1
500 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
501 ; X86-NEXT: movl (%eax), %eax
503 ; X86-NEXT: .LBB13_1:
504 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
505 ; X86-NEXT: movl (%eax), %eax
508 ; X64-LABEL: test_uno_q:
510 ; X64-NEXT: movl %edi, %eax
511 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
512 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
513 ; X64-NEXT: fucompi %st(1), %st
514 ; X64-NEXT: fstp %st(0)
516 ; X64-NEXT: cmovnpl %esi, %eax
518 %cond = call i1 @llvm.experimental.constrained.fcmp.f80(
519 x86_fp80 %f1, x86_fp80 %f2, metadata !"uno",
520 metadata !"fpexcept.strict") #0
521 %res = select i1 %cond, i32 %a, i32 %b
525 define i32 @test_oeq_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
526 ; X86-LABEL: test_oeq_s:
528 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
529 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
532 ; X86-NEXT: fnstsw %ax
533 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
535 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
536 ; X86-NEXT: jne .LBB14_3
538 ; X86-NEXT: jp .LBB14_3
540 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
541 ; X86-NEXT: .LBB14_3:
542 ; X86-NEXT: movl (%eax), %eax
545 ; X64-LABEL: test_oeq_s:
547 ; X64-NEXT: movl %edi, %eax
548 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
549 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
550 ; X64-NEXT: fcompi %st(1), %st
551 ; X64-NEXT: fstp %st(0)
553 ; X64-NEXT: cmovnel %esi, %eax
554 ; X64-NEXT: cmovpl %esi, %eax
556 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
557 x86_fp80 %f1, x86_fp80 %f2, metadata !"oeq",
558 metadata !"fpexcept.strict") #0
559 %res = select i1 %cond, i32 %a, i32 %b
563 define i32 @test_ogt_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
564 ; X86-LABEL: test_ogt_s:
566 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
567 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
570 ; X86-NEXT: fnstsw %ax
571 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
573 ; X86-NEXT: ja .LBB15_1
575 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
576 ; X86-NEXT: movl (%eax), %eax
578 ; X86-NEXT: .LBB15_1:
579 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
580 ; X86-NEXT: movl (%eax), %eax
583 ; X64-LABEL: test_ogt_s:
585 ; X64-NEXT: movl %edi, %eax
586 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
587 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
588 ; X64-NEXT: fcompi %st(1), %st
589 ; X64-NEXT: fstp %st(0)
591 ; X64-NEXT: cmovbel %esi, %eax
593 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
594 x86_fp80 %f1, x86_fp80 %f2, metadata !"ogt",
595 metadata !"fpexcept.strict") #0
596 %res = select i1 %cond, i32 %a, i32 %b
600 define i32 @test_oge_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
601 ; X86-LABEL: test_oge_s:
603 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
604 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
607 ; X86-NEXT: fnstsw %ax
608 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
610 ; X86-NEXT: jae .LBB16_1
612 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
613 ; X86-NEXT: movl (%eax), %eax
615 ; X86-NEXT: .LBB16_1:
616 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
617 ; X86-NEXT: movl (%eax), %eax
620 ; X64-LABEL: test_oge_s:
622 ; X64-NEXT: movl %edi, %eax
623 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
624 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
625 ; X64-NEXT: fcompi %st(1), %st
626 ; X64-NEXT: fstp %st(0)
628 ; X64-NEXT: cmovbl %esi, %eax
630 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
631 x86_fp80 %f1, x86_fp80 %f2, metadata !"oge",
632 metadata !"fpexcept.strict") #0
633 %res = select i1 %cond, i32 %a, i32 %b
637 define i32 @test_olt_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
638 ; X86-LABEL: test_olt_s:
640 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
641 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
644 ; X86-NEXT: fnstsw %ax
645 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
647 ; X86-NEXT: ja .LBB17_1
649 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
650 ; X86-NEXT: movl (%eax), %eax
652 ; X86-NEXT: .LBB17_1:
653 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
654 ; X86-NEXT: movl (%eax), %eax
657 ; X64-LABEL: test_olt_s:
659 ; X64-NEXT: movl %edi, %eax
660 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
661 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
662 ; X64-NEXT: fcompi %st(1), %st
663 ; X64-NEXT: fstp %st(0)
665 ; X64-NEXT: cmovbel %esi, %eax
667 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
668 x86_fp80 %f1, x86_fp80 %f2, metadata !"olt",
669 metadata !"fpexcept.strict") #0
670 %res = select i1 %cond, i32 %a, i32 %b
674 define i32 @test_ole_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
675 ; X86-LABEL: test_ole_s:
677 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
678 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
681 ; X86-NEXT: fnstsw %ax
682 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
684 ; X86-NEXT: jae .LBB18_1
686 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
687 ; X86-NEXT: movl (%eax), %eax
689 ; X86-NEXT: .LBB18_1:
690 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
691 ; X86-NEXT: movl (%eax), %eax
694 ; X64-LABEL: test_ole_s:
696 ; X64-NEXT: movl %edi, %eax
697 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
698 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
699 ; X64-NEXT: fcompi %st(1), %st
700 ; X64-NEXT: fstp %st(0)
702 ; X64-NEXT: cmovbl %esi, %eax
704 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
705 x86_fp80 %f1, x86_fp80 %f2, metadata !"ole",
706 metadata !"fpexcept.strict") #0
707 %res = select i1 %cond, i32 %a, i32 %b
711 define i32 @test_one_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
712 ; X86-LABEL: test_one_s:
714 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
715 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
718 ; X86-NEXT: fnstsw %ax
719 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
721 ; X86-NEXT: jne .LBB19_1
723 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
724 ; X86-NEXT: movl (%eax), %eax
726 ; X86-NEXT: .LBB19_1:
727 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
728 ; X86-NEXT: movl (%eax), %eax
731 ; X64-LABEL: test_one_s:
733 ; X64-NEXT: movl %edi, %eax
734 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
735 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
736 ; X64-NEXT: fcompi %st(1), %st
737 ; X64-NEXT: fstp %st(0)
739 ; X64-NEXT: cmovel %esi, %eax
741 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
742 x86_fp80 %f1, x86_fp80 %f2, metadata !"one",
743 metadata !"fpexcept.strict") #0
744 %res = select i1 %cond, i32 %a, i32 %b
748 define i32 @test_ord_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
749 ; X86-LABEL: test_ord_s:
751 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
752 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
755 ; X86-NEXT: fnstsw %ax
756 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
758 ; X86-NEXT: jnp .LBB20_1
760 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
761 ; X86-NEXT: movl (%eax), %eax
763 ; X86-NEXT: .LBB20_1:
764 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
765 ; X86-NEXT: movl (%eax), %eax
768 ; X64-LABEL: test_ord_s:
770 ; X64-NEXT: movl %edi, %eax
771 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
772 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
773 ; X64-NEXT: fcompi %st(1), %st
774 ; X64-NEXT: fstp %st(0)
776 ; X64-NEXT: cmovpl %esi, %eax
778 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
779 x86_fp80 %f1, x86_fp80 %f2, metadata !"ord",
780 metadata !"fpexcept.strict") #0
781 %res = select i1 %cond, i32 %a, i32 %b
785 define i32 @test_ueq_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
786 ; X86-LABEL: test_ueq_s:
788 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
789 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
792 ; X86-NEXT: fnstsw %ax
793 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
795 ; X86-NEXT: je .LBB21_1
797 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
798 ; X86-NEXT: movl (%eax), %eax
800 ; X86-NEXT: .LBB21_1:
801 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
802 ; X86-NEXT: movl (%eax), %eax
805 ; X64-LABEL: test_ueq_s:
807 ; X64-NEXT: movl %edi, %eax
808 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
809 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
810 ; X64-NEXT: fcompi %st(1), %st
811 ; X64-NEXT: fstp %st(0)
813 ; X64-NEXT: cmovnel %esi, %eax
815 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
816 x86_fp80 %f1, x86_fp80 %f2, metadata !"ueq",
817 metadata !"fpexcept.strict") #0
818 %res = select i1 %cond, i32 %a, i32 %b
822 define i32 @test_ugt_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
823 ; X86-LABEL: test_ugt_s:
825 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
826 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
829 ; X86-NEXT: fnstsw %ax
830 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
832 ; X86-NEXT: jb .LBB22_1
834 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
835 ; X86-NEXT: movl (%eax), %eax
837 ; X86-NEXT: .LBB22_1:
838 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
839 ; X86-NEXT: movl (%eax), %eax
842 ; X64-LABEL: test_ugt_s:
844 ; X64-NEXT: movl %edi, %eax
845 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
846 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
847 ; X64-NEXT: fcompi %st(1), %st
848 ; X64-NEXT: fstp %st(0)
850 ; X64-NEXT: cmovael %esi, %eax
852 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
853 x86_fp80 %f1, x86_fp80 %f2, metadata !"ugt",
854 metadata !"fpexcept.strict") #0
855 %res = select i1 %cond, i32 %a, i32 %b
859 define i32 @test_uge_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
860 ; X86-LABEL: test_uge_s:
862 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
863 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
866 ; X86-NEXT: fnstsw %ax
867 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
869 ; X86-NEXT: jbe .LBB23_1
871 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
872 ; X86-NEXT: movl (%eax), %eax
874 ; X86-NEXT: .LBB23_1:
875 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
876 ; X86-NEXT: movl (%eax), %eax
879 ; X64-LABEL: test_uge_s:
881 ; X64-NEXT: movl %edi, %eax
882 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
883 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
884 ; X64-NEXT: fcompi %st(1), %st
885 ; X64-NEXT: fstp %st(0)
887 ; X64-NEXT: cmoval %esi, %eax
889 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
890 x86_fp80 %f1, x86_fp80 %f2, metadata !"uge",
891 metadata !"fpexcept.strict") #0
892 %res = select i1 %cond, i32 %a, i32 %b
896 define i32 @test_ult_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
897 ; X86-LABEL: test_ult_s:
899 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
900 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
903 ; X86-NEXT: fnstsw %ax
904 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
906 ; X86-NEXT: jb .LBB24_1
908 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
909 ; X86-NEXT: movl (%eax), %eax
911 ; X86-NEXT: .LBB24_1:
912 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
913 ; X86-NEXT: movl (%eax), %eax
916 ; X64-LABEL: test_ult_s:
918 ; X64-NEXT: movl %edi, %eax
919 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
920 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
921 ; X64-NEXT: fcompi %st(1), %st
922 ; X64-NEXT: fstp %st(0)
924 ; X64-NEXT: cmovael %esi, %eax
926 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
927 x86_fp80 %f1, x86_fp80 %f2, metadata !"ult",
928 metadata !"fpexcept.strict") #0
929 %res = select i1 %cond, i32 %a, i32 %b
933 define i32 @test_ule_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
934 ; X86-LABEL: test_ule_s:
936 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
937 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
940 ; X86-NEXT: fnstsw %ax
941 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
943 ; X86-NEXT: jbe .LBB25_1
945 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
946 ; X86-NEXT: movl (%eax), %eax
948 ; X86-NEXT: .LBB25_1:
949 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
950 ; X86-NEXT: movl (%eax), %eax
953 ; X64-LABEL: test_ule_s:
955 ; X64-NEXT: movl %edi, %eax
956 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
957 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
958 ; X64-NEXT: fcompi %st(1), %st
959 ; X64-NEXT: fstp %st(0)
961 ; X64-NEXT: cmoval %esi, %eax
963 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
964 x86_fp80 %f1, x86_fp80 %f2, metadata !"ule",
965 metadata !"fpexcept.strict") #0
966 %res = select i1 %cond, i32 %a, i32 %b
970 define i32 @test_une_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
971 ; X86-LABEL: test_une_s:
973 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
974 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
977 ; X86-NEXT: fnstsw %ax
978 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
980 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
981 ; X86-NEXT: jne .LBB26_3
983 ; X86-NEXT: jp .LBB26_3
985 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
986 ; X86-NEXT: .LBB26_3:
987 ; X86-NEXT: movl (%eax), %eax
990 ; X64-LABEL: test_une_s:
992 ; X64-NEXT: movl %esi, %eax
993 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
994 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
995 ; X64-NEXT: fcompi %st(1), %st
996 ; X64-NEXT: fstp %st(0)
998 ; X64-NEXT: cmovnel %edi, %eax
999 ; X64-NEXT: cmovpl %edi, %eax
1001 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
1002 x86_fp80 %f1, x86_fp80 %f2, metadata !"une",
1003 metadata !"fpexcept.strict") #0
1004 %res = select i1 %cond, i32 %a, i32 %b
1008 define i32 @test_uno_s(i32 %a, i32 %b, x86_fp80 %f1, x86_fp80 %f2) #0 {
1009 ; X86-LABEL: test_uno_s:
1011 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
1012 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
1015 ; X86-NEXT: fnstsw %ax
1016 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
1018 ; X86-NEXT: jp .LBB27_1
1019 ; X86-NEXT: # %bb.2:
1020 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1021 ; X86-NEXT: movl (%eax), %eax
1023 ; X86-NEXT: .LBB27_1:
1024 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
1025 ; X86-NEXT: movl (%eax), %eax
1028 ; X64-LABEL: test_uno_s:
1030 ; X64-NEXT: movl %edi, %eax
1031 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
1032 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
1033 ; X64-NEXT: fcompi %st(1), %st
1034 ; X64-NEXT: fstp %st(0)
1036 ; X64-NEXT: cmovnpl %esi, %eax
1038 %cond = call i1 @llvm.experimental.constrained.fcmps.f80(
1039 x86_fp80 %f1, x86_fp80 %f2, metadata !"uno",
1040 metadata !"fpexcept.strict") #0
1041 %res = select i1 %cond, i32 %a, i32 %b
1045 attributes #0 = { strictfp }
1047 declare i1 @llvm.experimental.constrained.fcmp.f80(x86_fp80, x86_fp80, metadata, metadata)
1048 declare i1 @llvm.experimental.constrained.fcmps.f80(x86_fp80, x86_fp80, metadata, metadata)