1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=ALL --check-prefix=SDAG
3 ; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=ALL --check-prefix=FAST --check-prefix=FAST_NOAVX
4 ; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -mattr=avx | FileCheck %s --check-prefix=ALL --check-prefix=FAST --check-prefix=FAST_AVX
5 ; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -mattr=avx512f | FileCheck %s --check-prefix=ALL --check-prefix=FAST --check-prefix=FAST_AVX
7 define zeroext i1 @fcmp_oeq(float %x, float %y) {
8 ; SDAG-LABEL: fcmp_oeq:
10 ; SDAG-NEXT: cmpeqss %xmm1, %xmm0
11 ; SDAG-NEXT: movd %xmm0, %eax
12 ; SDAG-NEXT: andl $1, %eax
13 ; SDAG-NEXT: ## kill: def $al killed $al killed $eax
16 ; FAST_NOAVX-LABEL: fcmp_oeq:
17 ; FAST_NOAVX: ## %bb.0:
18 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
19 ; FAST_NOAVX-NEXT: sete %al
20 ; FAST_NOAVX-NEXT: setnp %cl
21 ; FAST_NOAVX-NEXT: andb %al, %cl
22 ; FAST_NOAVX-NEXT: andb $1, %cl
23 ; FAST_NOAVX-NEXT: movzbl %cl, %eax
24 ; FAST_NOAVX-NEXT: retq
26 ; FAST_AVX-LABEL: fcmp_oeq:
28 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
29 ; FAST_AVX-NEXT: sete %al
30 ; FAST_AVX-NEXT: setnp %cl
31 ; FAST_AVX-NEXT: andb %al, %cl
32 ; FAST_AVX-NEXT: andb $1, %cl
33 ; FAST_AVX-NEXT: movzbl %cl, %eax
35 %1 = fcmp oeq float %x, %y
39 define zeroext i1 @fcmp_ogt(float %x, float %y) {
40 ; SDAG-LABEL: fcmp_ogt:
42 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
46 ; FAST_NOAVX-LABEL: fcmp_ogt:
47 ; FAST_NOAVX: ## %bb.0:
48 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
49 ; FAST_NOAVX-NEXT: seta %al
50 ; FAST_NOAVX-NEXT: andb $1, %al
51 ; FAST_NOAVX-NEXT: movzbl %al, %eax
52 ; FAST_NOAVX-NEXT: retq
54 ; FAST_AVX-LABEL: fcmp_ogt:
56 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
57 ; FAST_AVX-NEXT: seta %al
58 ; FAST_AVX-NEXT: andb $1, %al
59 ; FAST_AVX-NEXT: movzbl %al, %eax
61 %1 = fcmp ogt float %x, %y
65 define zeroext i1 @fcmp_oge(float %x, float %y) {
66 ; SDAG-LABEL: fcmp_oge:
68 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
69 ; SDAG-NEXT: setae %al
72 ; FAST_NOAVX-LABEL: fcmp_oge:
73 ; FAST_NOAVX: ## %bb.0:
74 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
75 ; FAST_NOAVX-NEXT: setae %al
76 ; FAST_NOAVX-NEXT: andb $1, %al
77 ; FAST_NOAVX-NEXT: movzbl %al, %eax
78 ; FAST_NOAVX-NEXT: retq
80 ; FAST_AVX-LABEL: fcmp_oge:
82 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
83 ; FAST_AVX-NEXT: setae %al
84 ; FAST_AVX-NEXT: andb $1, %al
85 ; FAST_AVX-NEXT: movzbl %al, %eax
87 %1 = fcmp oge float %x, %y
91 define zeroext i1 @fcmp_olt(float %x, float %y) {
92 ; SDAG-LABEL: fcmp_olt:
94 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
98 ; FAST_NOAVX-LABEL: fcmp_olt:
99 ; FAST_NOAVX: ## %bb.0:
100 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
101 ; FAST_NOAVX-NEXT: seta %al
102 ; FAST_NOAVX-NEXT: andb $1, %al
103 ; FAST_NOAVX-NEXT: movzbl %al, %eax
104 ; FAST_NOAVX-NEXT: retq
106 ; FAST_AVX-LABEL: fcmp_olt:
107 ; FAST_AVX: ## %bb.0:
108 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
109 ; FAST_AVX-NEXT: seta %al
110 ; FAST_AVX-NEXT: andb $1, %al
111 ; FAST_AVX-NEXT: movzbl %al, %eax
112 ; FAST_AVX-NEXT: retq
113 %1 = fcmp olt float %x, %y
117 define zeroext i1 @fcmp_ole(float %x, float %y) {
118 ; SDAG-LABEL: fcmp_ole:
120 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
121 ; SDAG-NEXT: setae %al
124 ; FAST_NOAVX-LABEL: fcmp_ole:
125 ; FAST_NOAVX: ## %bb.0:
126 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
127 ; FAST_NOAVX-NEXT: setae %al
128 ; FAST_NOAVX-NEXT: andb $1, %al
129 ; FAST_NOAVX-NEXT: movzbl %al, %eax
130 ; FAST_NOAVX-NEXT: retq
132 ; FAST_AVX-LABEL: fcmp_ole:
133 ; FAST_AVX: ## %bb.0:
134 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
135 ; FAST_AVX-NEXT: setae %al
136 ; FAST_AVX-NEXT: andb $1, %al
137 ; FAST_AVX-NEXT: movzbl %al, %eax
138 ; FAST_AVX-NEXT: retq
139 %1 = fcmp ole float %x, %y
143 define zeroext i1 @fcmp_one(float %x, float %y) {
144 ; SDAG-LABEL: fcmp_one:
146 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
147 ; SDAG-NEXT: setne %al
150 ; FAST_NOAVX-LABEL: fcmp_one:
151 ; FAST_NOAVX: ## %bb.0:
152 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
153 ; FAST_NOAVX-NEXT: setne %al
154 ; FAST_NOAVX-NEXT: andb $1, %al
155 ; FAST_NOAVX-NEXT: movzbl %al, %eax
156 ; FAST_NOAVX-NEXT: retq
158 ; FAST_AVX-LABEL: fcmp_one:
159 ; FAST_AVX: ## %bb.0:
160 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
161 ; FAST_AVX-NEXT: setne %al
162 ; FAST_AVX-NEXT: andb $1, %al
163 ; FAST_AVX-NEXT: movzbl %al, %eax
164 ; FAST_AVX-NEXT: retq
165 %1 = fcmp one float %x, %y
169 define zeroext i1 @fcmp_ord(float %x, float %y) {
170 ; SDAG-LABEL: fcmp_ord:
172 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
173 ; SDAG-NEXT: setnp %al
176 ; FAST_NOAVX-LABEL: fcmp_ord:
177 ; FAST_NOAVX: ## %bb.0:
178 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
179 ; FAST_NOAVX-NEXT: setnp %al
180 ; FAST_NOAVX-NEXT: andb $1, %al
181 ; FAST_NOAVX-NEXT: movzbl %al, %eax
182 ; FAST_NOAVX-NEXT: retq
184 ; FAST_AVX-LABEL: fcmp_ord:
185 ; FAST_AVX: ## %bb.0:
186 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
187 ; FAST_AVX-NEXT: setnp %al
188 ; FAST_AVX-NEXT: andb $1, %al
189 ; FAST_AVX-NEXT: movzbl %al, %eax
190 ; FAST_AVX-NEXT: retq
191 %1 = fcmp ord float %x, %y
195 define zeroext i1 @fcmp_uno(float %x, float %y) {
196 ; SDAG-LABEL: fcmp_uno:
198 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
199 ; SDAG-NEXT: setp %al
202 ; FAST_NOAVX-LABEL: fcmp_uno:
203 ; FAST_NOAVX: ## %bb.0:
204 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
205 ; FAST_NOAVX-NEXT: setp %al
206 ; FAST_NOAVX-NEXT: andb $1, %al
207 ; FAST_NOAVX-NEXT: movzbl %al, %eax
208 ; FAST_NOAVX-NEXT: retq
210 ; FAST_AVX-LABEL: fcmp_uno:
211 ; FAST_AVX: ## %bb.0:
212 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
213 ; FAST_AVX-NEXT: setp %al
214 ; FAST_AVX-NEXT: andb $1, %al
215 ; FAST_AVX-NEXT: movzbl %al, %eax
216 ; FAST_AVX-NEXT: retq
217 %1 = fcmp uno float %x, %y
221 define zeroext i1 @fcmp_ueq(float %x, float %y) {
222 ; SDAG-LABEL: fcmp_ueq:
224 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
225 ; SDAG-NEXT: sete %al
228 ; FAST_NOAVX-LABEL: fcmp_ueq:
229 ; FAST_NOAVX: ## %bb.0:
230 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
231 ; FAST_NOAVX-NEXT: sete %al
232 ; FAST_NOAVX-NEXT: andb $1, %al
233 ; FAST_NOAVX-NEXT: movzbl %al, %eax
234 ; FAST_NOAVX-NEXT: retq
236 ; FAST_AVX-LABEL: fcmp_ueq:
237 ; FAST_AVX: ## %bb.0:
238 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
239 ; FAST_AVX-NEXT: sete %al
240 ; FAST_AVX-NEXT: andb $1, %al
241 ; FAST_AVX-NEXT: movzbl %al, %eax
242 ; FAST_AVX-NEXT: retq
243 %1 = fcmp ueq float %x, %y
247 define zeroext i1 @fcmp_ugt(float %x, float %y) {
248 ; SDAG-LABEL: fcmp_ugt:
250 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
251 ; SDAG-NEXT: setb %al
254 ; FAST_NOAVX-LABEL: fcmp_ugt:
255 ; FAST_NOAVX: ## %bb.0:
256 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
257 ; FAST_NOAVX-NEXT: setb %al
258 ; FAST_NOAVX-NEXT: andb $1, %al
259 ; FAST_NOAVX-NEXT: movzbl %al, %eax
260 ; FAST_NOAVX-NEXT: retq
262 ; FAST_AVX-LABEL: fcmp_ugt:
263 ; FAST_AVX: ## %bb.0:
264 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
265 ; FAST_AVX-NEXT: setb %al
266 ; FAST_AVX-NEXT: andb $1, %al
267 ; FAST_AVX-NEXT: movzbl %al, %eax
268 ; FAST_AVX-NEXT: retq
269 %1 = fcmp ugt float %x, %y
273 define zeroext i1 @fcmp_uge(float %x, float %y) {
274 ; SDAG-LABEL: fcmp_uge:
276 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
277 ; SDAG-NEXT: setbe %al
280 ; FAST_NOAVX-LABEL: fcmp_uge:
281 ; FAST_NOAVX: ## %bb.0:
282 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
283 ; FAST_NOAVX-NEXT: setbe %al
284 ; FAST_NOAVX-NEXT: andb $1, %al
285 ; FAST_NOAVX-NEXT: movzbl %al, %eax
286 ; FAST_NOAVX-NEXT: retq
288 ; FAST_AVX-LABEL: fcmp_uge:
289 ; FAST_AVX: ## %bb.0:
290 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
291 ; FAST_AVX-NEXT: setbe %al
292 ; FAST_AVX-NEXT: andb $1, %al
293 ; FAST_AVX-NEXT: movzbl %al, %eax
294 ; FAST_AVX-NEXT: retq
295 %1 = fcmp uge float %x, %y
299 define zeroext i1 @fcmp_ult(float %x, float %y) {
300 ; SDAG-LABEL: fcmp_ult:
302 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
303 ; SDAG-NEXT: setb %al
306 ; FAST_NOAVX-LABEL: fcmp_ult:
307 ; FAST_NOAVX: ## %bb.0:
308 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
309 ; FAST_NOAVX-NEXT: setb %al
310 ; FAST_NOAVX-NEXT: andb $1, %al
311 ; FAST_NOAVX-NEXT: movzbl %al, %eax
312 ; FAST_NOAVX-NEXT: retq
314 ; FAST_AVX-LABEL: fcmp_ult:
315 ; FAST_AVX: ## %bb.0:
316 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
317 ; FAST_AVX-NEXT: setb %al
318 ; FAST_AVX-NEXT: andb $1, %al
319 ; FAST_AVX-NEXT: movzbl %al, %eax
320 ; FAST_AVX-NEXT: retq
321 %1 = fcmp ult float %x, %y
325 define zeroext i1 @fcmp_ule(float %x, float %y) {
326 ; SDAG-LABEL: fcmp_ule:
328 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
329 ; SDAG-NEXT: setbe %al
332 ; FAST_NOAVX-LABEL: fcmp_ule:
333 ; FAST_NOAVX: ## %bb.0:
334 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
335 ; FAST_NOAVX-NEXT: setbe %al
336 ; FAST_NOAVX-NEXT: andb $1, %al
337 ; FAST_NOAVX-NEXT: movzbl %al, %eax
338 ; FAST_NOAVX-NEXT: retq
340 ; FAST_AVX-LABEL: fcmp_ule:
341 ; FAST_AVX: ## %bb.0:
342 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
343 ; FAST_AVX-NEXT: setbe %al
344 ; FAST_AVX-NEXT: andb $1, %al
345 ; FAST_AVX-NEXT: movzbl %al, %eax
346 ; FAST_AVX-NEXT: retq
347 %1 = fcmp ule float %x, %y
351 define zeroext i1 @fcmp_une(float %x, float %y) {
352 ; SDAG-LABEL: fcmp_une:
354 ; SDAG-NEXT: cmpneqss %xmm1, %xmm0
355 ; SDAG-NEXT: movd %xmm0, %eax
356 ; SDAG-NEXT: andl $1, %eax
357 ; SDAG-NEXT: ## kill: def $al killed $al killed $eax
360 ; FAST_NOAVX-LABEL: fcmp_une:
361 ; FAST_NOAVX: ## %bb.0:
362 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
363 ; FAST_NOAVX-NEXT: setne %al
364 ; FAST_NOAVX-NEXT: setp %cl
365 ; FAST_NOAVX-NEXT: orb %al, %cl
366 ; FAST_NOAVX-NEXT: andb $1, %cl
367 ; FAST_NOAVX-NEXT: movzbl %cl, %eax
368 ; FAST_NOAVX-NEXT: retq
370 ; FAST_AVX-LABEL: fcmp_une:
371 ; FAST_AVX: ## %bb.0:
372 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
373 ; FAST_AVX-NEXT: setne %al
374 ; FAST_AVX-NEXT: setp %cl
375 ; FAST_AVX-NEXT: orb %al, %cl
376 ; FAST_AVX-NEXT: andb $1, %cl
377 ; FAST_AVX-NEXT: movzbl %cl, %eax
378 ; FAST_AVX-NEXT: retq
379 %1 = fcmp une float %x, %y
383 define zeroext i1 @icmp_eq(i32 %x, i32 %y) {
384 ; SDAG-LABEL: icmp_eq:
386 ; SDAG-NEXT: cmpl %esi, %edi
387 ; SDAG-NEXT: sete %al
390 ; FAST-LABEL: icmp_eq:
392 ; FAST-NEXT: cmpl %esi, %edi
393 ; FAST-NEXT: sete %al
394 ; FAST-NEXT: andb $1, %al
395 ; FAST-NEXT: movzbl %al, %eax
397 %1 = icmp eq i32 %x, %y
401 define zeroext i1 @icmp_ne(i32 %x, i32 %y) {
402 ; SDAG-LABEL: icmp_ne:
404 ; SDAG-NEXT: cmpl %esi, %edi
405 ; SDAG-NEXT: setne %al
408 ; FAST-LABEL: icmp_ne:
410 ; FAST-NEXT: cmpl %esi, %edi
411 ; FAST-NEXT: setne %al
412 ; FAST-NEXT: andb $1, %al
413 ; FAST-NEXT: movzbl %al, %eax
415 %1 = icmp ne i32 %x, %y
419 define zeroext i1 @icmp_ugt(i32 %x, i32 %y) {
420 ; SDAG-LABEL: icmp_ugt:
422 ; SDAG-NEXT: cmpl %esi, %edi
423 ; SDAG-NEXT: seta %al
426 ; FAST-LABEL: icmp_ugt:
428 ; FAST-NEXT: cmpl %esi, %edi
429 ; FAST-NEXT: seta %al
430 ; FAST-NEXT: andb $1, %al
431 ; FAST-NEXT: movzbl %al, %eax
433 %1 = icmp ugt i32 %x, %y
437 define zeroext i1 @icmp_uge(i32 %x, i32 %y) {
438 ; SDAG-LABEL: icmp_uge:
440 ; SDAG-NEXT: cmpl %esi, %edi
441 ; SDAG-NEXT: setae %al
444 ; FAST-LABEL: icmp_uge:
446 ; FAST-NEXT: cmpl %esi, %edi
447 ; FAST-NEXT: setae %al
448 ; FAST-NEXT: andb $1, %al
449 ; FAST-NEXT: movzbl %al, %eax
451 %1 = icmp uge i32 %x, %y
455 define zeroext i1 @icmp_ult(i32 %x, i32 %y) {
456 ; SDAG-LABEL: icmp_ult:
458 ; SDAG-NEXT: cmpl %esi, %edi
459 ; SDAG-NEXT: setb %al
462 ; FAST-LABEL: icmp_ult:
464 ; FAST-NEXT: cmpl %esi, %edi
465 ; FAST-NEXT: setb %al
466 ; FAST-NEXT: andb $1, %al
467 ; FAST-NEXT: movzbl %al, %eax
469 %1 = icmp ult i32 %x, %y
473 define zeroext i1 @icmp_ule(i32 %x, i32 %y) {
474 ; SDAG-LABEL: icmp_ule:
476 ; SDAG-NEXT: cmpl %esi, %edi
477 ; SDAG-NEXT: setbe %al
480 ; FAST-LABEL: icmp_ule:
482 ; FAST-NEXT: cmpl %esi, %edi
483 ; FAST-NEXT: setbe %al
484 ; FAST-NEXT: andb $1, %al
485 ; FAST-NEXT: movzbl %al, %eax
487 %1 = icmp ule i32 %x, %y
491 define zeroext i1 @icmp_sgt(i32 %x, i32 %y) {
492 ; SDAG-LABEL: icmp_sgt:
494 ; SDAG-NEXT: cmpl %esi, %edi
495 ; SDAG-NEXT: setg %al
498 ; FAST-LABEL: icmp_sgt:
500 ; FAST-NEXT: cmpl %esi, %edi
501 ; FAST-NEXT: setg %al
502 ; FAST-NEXT: andb $1, %al
503 ; FAST-NEXT: movzbl %al, %eax
505 %1 = icmp sgt i32 %x, %y
509 define zeroext i1 @icmp_sge(i32 %x, i32 %y) {
510 ; SDAG-LABEL: icmp_sge:
512 ; SDAG-NEXT: cmpl %esi, %edi
513 ; SDAG-NEXT: setge %al
516 ; FAST-LABEL: icmp_sge:
518 ; FAST-NEXT: cmpl %esi, %edi
519 ; FAST-NEXT: setge %al
520 ; FAST-NEXT: andb $1, %al
521 ; FAST-NEXT: movzbl %al, %eax
523 %1 = icmp sge i32 %x, %y
527 define zeroext i1 @icmp_slt(i32 %x, i32 %y) {
528 ; SDAG-LABEL: icmp_slt:
530 ; SDAG-NEXT: cmpl %esi, %edi
531 ; SDAG-NEXT: setl %al
534 ; FAST-LABEL: icmp_slt:
536 ; FAST-NEXT: cmpl %esi, %edi
537 ; FAST-NEXT: setl %al
538 ; FAST-NEXT: andb $1, %al
539 ; FAST-NEXT: movzbl %al, %eax
541 %1 = icmp slt i32 %x, %y
545 define zeroext i1 @icmp_sle(i32 %x, i32 %y) {
546 ; SDAG-LABEL: icmp_sle:
548 ; SDAG-NEXT: cmpl %esi, %edi
549 ; SDAG-NEXT: setle %al
552 ; FAST-LABEL: icmp_sle:
554 ; FAST-NEXT: cmpl %esi, %edi
555 ; FAST-NEXT: setle %al
556 ; FAST-NEXT: andb $1, %al
557 ; FAST-NEXT: movzbl %al, %eax
559 %1 = icmp sle i32 %x, %y
563 ; Test cmp folding and condition optimization.
564 define zeroext i1 @fcmp_oeq2(float %x) {
565 ; SDAG-LABEL: fcmp_oeq2:
567 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
568 ; SDAG-NEXT: setnp %al
571 ; FAST_NOAVX-LABEL: fcmp_oeq2:
572 ; FAST_NOAVX: ## %bb.0:
573 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
574 ; FAST_NOAVX-NEXT: setnp %al
575 ; FAST_NOAVX-NEXT: andb $1, %al
576 ; FAST_NOAVX-NEXT: movzbl %al, %eax
577 ; FAST_NOAVX-NEXT: retq
579 ; FAST_AVX-LABEL: fcmp_oeq2:
580 ; FAST_AVX: ## %bb.0:
581 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
582 ; FAST_AVX-NEXT: setnp %al
583 ; FAST_AVX-NEXT: andb $1, %al
584 ; FAST_AVX-NEXT: movzbl %al, %eax
585 ; FAST_AVX-NEXT: retq
586 %1 = fcmp oeq float %x, %x
590 define zeroext i1 @fcmp_oeq3(float %x) {
591 ; SDAG-LABEL: fcmp_oeq3:
593 ; SDAG-NEXT: xorps %xmm1, %xmm1
594 ; SDAG-NEXT: cmpeqss %xmm0, %xmm1
595 ; SDAG-NEXT: movd %xmm1, %eax
596 ; SDAG-NEXT: andl $1, %eax
597 ; SDAG-NEXT: ## kill: def $al killed $al killed $eax
600 ; FAST_NOAVX-LABEL: fcmp_oeq3:
601 ; FAST_NOAVX: ## %bb.0:
602 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
603 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
604 ; FAST_NOAVX-NEXT: sete %al
605 ; FAST_NOAVX-NEXT: setnp %cl
606 ; FAST_NOAVX-NEXT: andb %al, %cl
607 ; FAST_NOAVX-NEXT: andb $1, %cl
608 ; FAST_NOAVX-NEXT: movzbl %cl, %eax
609 ; FAST_NOAVX-NEXT: retq
611 ; FAST_AVX-LABEL: fcmp_oeq3:
612 ; FAST_AVX: ## %bb.0:
613 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
614 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
615 ; FAST_AVX-NEXT: sete %al
616 ; FAST_AVX-NEXT: setnp %cl
617 ; FAST_AVX-NEXT: andb %al, %cl
618 ; FAST_AVX-NEXT: andb $1, %cl
619 ; FAST_AVX-NEXT: movzbl %cl, %eax
620 ; FAST_AVX-NEXT: retq
621 %1 = fcmp oeq float %x, 0.000000e+00
625 define zeroext i1 @fcmp_ogt2(float %x) {
626 ; SDAG-LABEL: fcmp_ogt2:
628 ; SDAG-NEXT: xorl %eax, %eax
631 ; FAST-LABEL: fcmp_ogt2:
633 ; FAST-NEXT: xorl %eax, %eax
634 ; FAST-NEXT: andb $1, %al
635 ; FAST-NEXT: movzbl %al, %eax
637 %1 = fcmp ogt float %x, %x
641 define zeroext i1 @fcmp_ogt3(float %x) {
642 ; SDAG-LABEL: fcmp_ogt3:
644 ; SDAG-NEXT: xorps %xmm1, %xmm1
645 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
646 ; SDAG-NEXT: seta %al
649 ; FAST_NOAVX-LABEL: fcmp_ogt3:
650 ; FAST_NOAVX: ## %bb.0:
651 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
652 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
653 ; FAST_NOAVX-NEXT: seta %al
654 ; FAST_NOAVX-NEXT: andb $1, %al
655 ; FAST_NOAVX-NEXT: movzbl %al, %eax
656 ; FAST_NOAVX-NEXT: retq
658 ; FAST_AVX-LABEL: fcmp_ogt3:
659 ; FAST_AVX: ## %bb.0:
660 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
661 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
662 ; FAST_AVX-NEXT: seta %al
663 ; FAST_AVX-NEXT: andb $1, %al
664 ; FAST_AVX-NEXT: movzbl %al, %eax
665 ; FAST_AVX-NEXT: retq
666 %1 = fcmp ogt float %x, 0.000000e+00
670 define zeroext i1 @fcmp_oge2(float %x) {
671 ; SDAG-LABEL: fcmp_oge2:
673 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
674 ; SDAG-NEXT: setnp %al
677 ; FAST_NOAVX-LABEL: fcmp_oge2:
678 ; FAST_NOAVX: ## %bb.0:
679 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
680 ; FAST_NOAVX-NEXT: setnp %al
681 ; FAST_NOAVX-NEXT: andb $1, %al
682 ; FAST_NOAVX-NEXT: movzbl %al, %eax
683 ; FAST_NOAVX-NEXT: retq
685 ; FAST_AVX-LABEL: fcmp_oge2:
686 ; FAST_AVX: ## %bb.0:
687 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
688 ; FAST_AVX-NEXT: setnp %al
689 ; FAST_AVX-NEXT: andb $1, %al
690 ; FAST_AVX-NEXT: movzbl %al, %eax
691 ; FAST_AVX-NEXT: retq
692 %1 = fcmp oge float %x, %x
696 define zeroext i1 @fcmp_oge3(float %x) {
697 ; SDAG-LABEL: fcmp_oge3:
699 ; SDAG-NEXT: xorps %xmm1, %xmm1
700 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
701 ; SDAG-NEXT: setae %al
704 ; FAST_NOAVX-LABEL: fcmp_oge3:
705 ; FAST_NOAVX: ## %bb.0:
706 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
707 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
708 ; FAST_NOAVX-NEXT: setae %al
709 ; FAST_NOAVX-NEXT: andb $1, %al
710 ; FAST_NOAVX-NEXT: movzbl %al, %eax
711 ; FAST_NOAVX-NEXT: retq
713 ; FAST_AVX-LABEL: fcmp_oge3:
714 ; FAST_AVX: ## %bb.0:
715 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
716 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
717 ; FAST_AVX-NEXT: setae %al
718 ; FAST_AVX-NEXT: andb $1, %al
719 ; FAST_AVX-NEXT: movzbl %al, %eax
720 ; FAST_AVX-NEXT: retq
721 %1 = fcmp oge float %x, 0.000000e+00
725 define zeroext i1 @fcmp_olt2(float %x) {
726 ; SDAG-LABEL: fcmp_olt2:
728 ; SDAG-NEXT: xorl %eax, %eax
731 ; FAST-LABEL: fcmp_olt2:
733 ; FAST-NEXT: xorl %eax, %eax
734 ; FAST-NEXT: andb $1, %al
735 ; FAST-NEXT: movzbl %al, %eax
737 %1 = fcmp olt float %x, %x
741 define zeroext i1 @fcmp_olt3(float %x) {
742 ; SDAG-LABEL: fcmp_olt3:
744 ; SDAG-NEXT: xorps %xmm1, %xmm1
745 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
746 ; SDAG-NEXT: seta %al
749 ; FAST_NOAVX-LABEL: fcmp_olt3:
750 ; FAST_NOAVX: ## %bb.0:
751 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
752 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
753 ; FAST_NOAVX-NEXT: seta %al
754 ; FAST_NOAVX-NEXT: andb $1, %al
755 ; FAST_NOAVX-NEXT: movzbl %al, %eax
756 ; FAST_NOAVX-NEXT: retq
758 ; FAST_AVX-LABEL: fcmp_olt3:
759 ; FAST_AVX: ## %bb.0:
760 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
761 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
762 ; FAST_AVX-NEXT: seta %al
763 ; FAST_AVX-NEXT: andb $1, %al
764 ; FAST_AVX-NEXT: movzbl %al, %eax
765 ; FAST_AVX-NEXT: retq
766 %1 = fcmp olt float %x, 0.000000e+00
770 define zeroext i1 @fcmp_ole2(float %x) {
771 ; SDAG-LABEL: fcmp_ole2:
773 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
774 ; SDAG-NEXT: setnp %al
777 ; FAST_NOAVX-LABEL: fcmp_ole2:
778 ; FAST_NOAVX: ## %bb.0:
779 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
780 ; FAST_NOAVX-NEXT: setnp %al
781 ; FAST_NOAVX-NEXT: andb $1, %al
782 ; FAST_NOAVX-NEXT: movzbl %al, %eax
783 ; FAST_NOAVX-NEXT: retq
785 ; FAST_AVX-LABEL: fcmp_ole2:
786 ; FAST_AVX: ## %bb.0:
787 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
788 ; FAST_AVX-NEXT: setnp %al
789 ; FAST_AVX-NEXT: andb $1, %al
790 ; FAST_AVX-NEXT: movzbl %al, %eax
791 ; FAST_AVX-NEXT: retq
792 %1 = fcmp ole float %x, %x
796 define zeroext i1 @fcmp_ole3(float %x) {
797 ; SDAG-LABEL: fcmp_ole3:
799 ; SDAG-NEXT: xorps %xmm1, %xmm1
800 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
801 ; SDAG-NEXT: setae %al
804 ; FAST_NOAVX-LABEL: fcmp_ole3:
805 ; FAST_NOAVX: ## %bb.0:
806 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
807 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
808 ; FAST_NOAVX-NEXT: setae %al
809 ; FAST_NOAVX-NEXT: andb $1, %al
810 ; FAST_NOAVX-NEXT: movzbl %al, %eax
811 ; FAST_NOAVX-NEXT: retq
813 ; FAST_AVX-LABEL: fcmp_ole3:
814 ; FAST_AVX: ## %bb.0:
815 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
816 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
817 ; FAST_AVX-NEXT: setae %al
818 ; FAST_AVX-NEXT: andb $1, %al
819 ; FAST_AVX-NEXT: movzbl %al, %eax
820 ; FAST_AVX-NEXT: retq
821 %1 = fcmp ole float %x, 0.000000e+00
825 define zeroext i1 @fcmp_one2(float %x) {
826 ; SDAG-LABEL: fcmp_one2:
828 ; SDAG-NEXT: xorl %eax, %eax
831 ; FAST-LABEL: fcmp_one2:
833 ; FAST-NEXT: xorl %eax, %eax
834 ; FAST-NEXT: andb $1, %al
835 ; FAST-NEXT: movzbl %al, %eax
837 %1 = fcmp one float %x, %x
841 define zeroext i1 @fcmp_one3(float %x) {
842 ; SDAG-LABEL: fcmp_one3:
844 ; SDAG-NEXT: xorps %xmm1, %xmm1
845 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
846 ; SDAG-NEXT: setne %al
849 ; FAST_NOAVX-LABEL: fcmp_one3:
850 ; FAST_NOAVX: ## %bb.0:
851 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
852 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
853 ; FAST_NOAVX-NEXT: setne %al
854 ; FAST_NOAVX-NEXT: andb $1, %al
855 ; FAST_NOAVX-NEXT: movzbl %al, %eax
856 ; FAST_NOAVX-NEXT: retq
858 ; FAST_AVX-LABEL: fcmp_one3:
859 ; FAST_AVX: ## %bb.0:
860 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
861 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
862 ; FAST_AVX-NEXT: setne %al
863 ; FAST_AVX-NEXT: andb $1, %al
864 ; FAST_AVX-NEXT: movzbl %al, %eax
865 ; FAST_AVX-NEXT: retq
866 %1 = fcmp one float %x, 0.000000e+00
870 define zeroext i1 @fcmp_ord2(float %x) {
871 ; SDAG-LABEL: fcmp_ord2:
873 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
874 ; SDAG-NEXT: setnp %al
877 ; FAST_NOAVX-LABEL: fcmp_ord2:
878 ; FAST_NOAVX: ## %bb.0:
879 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
880 ; FAST_NOAVX-NEXT: setnp %al
881 ; FAST_NOAVX-NEXT: andb $1, %al
882 ; FAST_NOAVX-NEXT: movzbl %al, %eax
883 ; FAST_NOAVX-NEXT: retq
885 ; FAST_AVX-LABEL: fcmp_ord2:
886 ; FAST_AVX: ## %bb.0:
887 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
888 ; FAST_AVX-NEXT: setnp %al
889 ; FAST_AVX-NEXT: andb $1, %al
890 ; FAST_AVX-NEXT: movzbl %al, %eax
891 ; FAST_AVX-NEXT: retq
892 %1 = fcmp ord float %x, %x
896 define zeroext i1 @fcmp_ord3(float %x) {
897 ; SDAG-LABEL: fcmp_ord3:
899 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
900 ; SDAG-NEXT: setnp %al
903 ; FAST_NOAVX-LABEL: fcmp_ord3:
904 ; FAST_NOAVX: ## %bb.0:
905 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
906 ; FAST_NOAVX-NEXT: setnp %al
907 ; FAST_NOAVX-NEXT: andb $1, %al
908 ; FAST_NOAVX-NEXT: movzbl %al, %eax
909 ; FAST_NOAVX-NEXT: retq
911 ; FAST_AVX-LABEL: fcmp_ord3:
912 ; FAST_AVX: ## %bb.0:
913 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
914 ; FAST_AVX-NEXT: setnp %al
915 ; FAST_AVX-NEXT: andb $1, %al
916 ; FAST_AVX-NEXT: movzbl %al, %eax
917 ; FAST_AVX-NEXT: retq
918 %1 = fcmp ord float %x, 0.000000e+00
922 define zeroext i1 @fcmp_uno2(float %x) {
923 ; SDAG-LABEL: fcmp_uno2:
925 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
926 ; SDAG-NEXT: setp %al
929 ; FAST_NOAVX-LABEL: fcmp_uno2:
930 ; FAST_NOAVX: ## %bb.0:
931 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
932 ; FAST_NOAVX-NEXT: setp %al
933 ; FAST_NOAVX-NEXT: andb $1, %al
934 ; FAST_NOAVX-NEXT: movzbl %al, %eax
935 ; FAST_NOAVX-NEXT: retq
937 ; FAST_AVX-LABEL: fcmp_uno2:
938 ; FAST_AVX: ## %bb.0:
939 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
940 ; FAST_AVX-NEXT: setp %al
941 ; FAST_AVX-NEXT: andb $1, %al
942 ; FAST_AVX-NEXT: movzbl %al, %eax
943 ; FAST_AVX-NEXT: retq
944 %1 = fcmp uno float %x, %x
948 define zeroext i1 @fcmp_uno3(float %x) {
949 ; SDAG-LABEL: fcmp_uno3:
951 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
952 ; SDAG-NEXT: setp %al
955 ; FAST_NOAVX-LABEL: fcmp_uno3:
956 ; FAST_NOAVX: ## %bb.0:
957 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
958 ; FAST_NOAVX-NEXT: setp %al
959 ; FAST_NOAVX-NEXT: andb $1, %al
960 ; FAST_NOAVX-NEXT: movzbl %al, %eax
961 ; FAST_NOAVX-NEXT: retq
963 ; FAST_AVX-LABEL: fcmp_uno3:
964 ; FAST_AVX: ## %bb.0:
965 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
966 ; FAST_AVX-NEXT: setp %al
967 ; FAST_AVX-NEXT: andb $1, %al
968 ; FAST_AVX-NEXT: movzbl %al, %eax
969 ; FAST_AVX-NEXT: retq
970 %1 = fcmp uno float %x, 0.000000e+00
974 define zeroext i1 @fcmp_ueq2(float %x) {
975 ; SDAG-LABEL: fcmp_ueq2:
977 ; SDAG-NEXT: movb $1, %al
980 ; FAST-LABEL: fcmp_ueq2:
982 ; FAST-NEXT: movb $1, %al
983 ; FAST-NEXT: andb $1, %al
984 ; FAST-NEXT: movzbl %al, %eax
986 %1 = fcmp ueq float %x, %x
990 define zeroext i1 @fcmp_ueq3(float %x) {
991 ; SDAG-LABEL: fcmp_ueq3:
993 ; SDAG-NEXT: xorps %xmm1, %xmm1
994 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
995 ; SDAG-NEXT: sete %al
998 ; FAST_NOAVX-LABEL: fcmp_ueq3:
999 ; FAST_NOAVX: ## %bb.0:
1000 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1001 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
1002 ; FAST_NOAVX-NEXT: sete %al
1003 ; FAST_NOAVX-NEXT: andb $1, %al
1004 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1005 ; FAST_NOAVX-NEXT: retq
1007 ; FAST_AVX-LABEL: fcmp_ueq3:
1008 ; FAST_AVX: ## %bb.0:
1009 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1010 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
1011 ; FAST_AVX-NEXT: sete %al
1012 ; FAST_AVX-NEXT: andb $1, %al
1013 ; FAST_AVX-NEXT: movzbl %al, %eax
1014 ; FAST_AVX-NEXT: retq
1015 %1 = fcmp ueq float %x, 0.000000e+00
1019 define zeroext i1 @fcmp_ugt2(float %x) {
1020 ; SDAG-LABEL: fcmp_ugt2:
1022 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
1023 ; SDAG-NEXT: setp %al
1026 ; FAST_NOAVX-LABEL: fcmp_ugt2:
1027 ; FAST_NOAVX: ## %bb.0:
1028 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
1029 ; FAST_NOAVX-NEXT: setp %al
1030 ; FAST_NOAVX-NEXT: andb $1, %al
1031 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1032 ; FAST_NOAVX-NEXT: retq
1034 ; FAST_AVX-LABEL: fcmp_ugt2:
1035 ; FAST_AVX: ## %bb.0:
1036 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
1037 ; FAST_AVX-NEXT: setp %al
1038 ; FAST_AVX-NEXT: andb $1, %al
1039 ; FAST_AVX-NEXT: movzbl %al, %eax
1040 ; FAST_AVX-NEXT: retq
1041 %1 = fcmp ugt float %x, %x
1045 define zeroext i1 @fcmp_ugt3(float %x) {
1046 ; SDAG-LABEL: fcmp_ugt3:
1048 ; SDAG-NEXT: xorps %xmm1, %xmm1
1049 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
1050 ; SDAG-NEXT: setb %al
1053 ; FAST_NOAVX-LABEL: fcmp_ugt3:
1054 ; FAST_NOAVX: ## %bb.0:
1055 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1056 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
1057 ; FAST_NOAVX-NEXT: setb %al
1058 ; FAST_NOAVX-NEXT: andb $1, %al
1059 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1060 ; FAST_NOAVX-NEXT: retq
1062 ; FAST_AVX-LABEL: fcmp_ugt3:
1063 ; FAST_AVX: ## %bb.0:
1064 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1065 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
1066 ; FAST_AVX-NEXT: setb %al
1067 ; FAST_AVX-NEXT: andb $1, %al
1068 ; FAST_AVX-NEXT: movzbl %al, %eax
1069 ; FAST_AVX-NEXT: retq
1070 %1 = fcmp ugt float %x, 0.000000e+00
1074 define zeroext i1 @fcmp_uge2(float %x) {
1075 ; SDAG-LABEL: fcmp_uge2:
1077 ; SDAG-NEXT: movb $1, %al
1080 ; FAST-LABEL: fcmp_uge2:
1082 ; FAST-NEXT: movb $1, %al
1083 ; FAST-NEXT: andb $1, %al
1084 ; FAST-NEXT: movzbl %al, %eax
1086 %1 = fcmp uge float %x, %x
1090 define zeroext i1 @fcmp_uge3(float %x) {
1091 ; SDAG-LABEL: fcmp_uge3:
1093 ; SDAG-NEXT: xorps %xmm1, %xmm1
1094 ; SDAG-NEXT: ucomiss %xmm0, %xmm1
1095 ; SDAG-NEXT: setbe %al
1098 ; FAST_NOAVX-LABEL: fcmp_uge3:
1099 ; FAST_NOAVX: ## %bb.0:
1100 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1101 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1
1102 ; FAST_NOAVX-NEXT: setbe %al
1103 ; FAST_NOAVX-NEXT: andb $1, %al
1104 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1105 ; FAST_NOAVX-NEXT: retq
1107 ; FAST_AVX-LABEL: fcmp_uge3:
1108 ; FAST_AVX: ## %bb.0:
1109 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1110 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1
1111 ; FAST_AVX-NEXT: setbe %al
1112 ; FAST_AVX-NEXT: andb $1, %al
1113 ; FAST_AVX-NEXT: movzbl %al, %eax
1114 ; FAST_AVX-NEXT: retq
1115 %1 = fcmp uge float %x, 0.000000e+00
1119 define zeroext i1 @fcmp_ult2(float %x) {
1120 ; SDAG-LABEL: fcmp_ult2:
1122 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
1123 ; SDAG-NEXT: setp %al
1126 ; FAST_NOAVX-LABEL: fcmp_ult2:
1127 ; FAST_NOAVX: ## %bb.0:
1128 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
1129 ; FAST_NOAVX-NEXT: setp %al
1130 ; FAST_NOAVX-NEXT: andb $1, %al
1131 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1132 ; FAST_NOAVX-NEXT: retq
1134 ; FAST_AVX-LABEL: fcmp_ult2:
1135 ; FAST_AVX: ## %bb.0:
1136 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
1137 ; FAST_AVX-NEXT: setp %al
1138 ; FAST_AVX-NEXT: andb $1, %al
1139 ; FAST_AVX-NEXT: movzbl %al, %eax
1140 ; FAST_AVX-NEXT: retq
1141 %1 = fcmp ult float %x, %x
1145 define zeroext i1 @fcmp_ult3(float %x) {
1146 ; SDAG-LABEL: fcmp_ult3:
1148 ; SDAG-NEXT: xorps %xmm1, %xmm1
1149 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
1150 ; SDAG-NEXT: setb %al
1153 ; FAST_NOAVX-LABEL: fcmp_ult3:
1154 ; FAST_NOAVX: ## %bb.0:
1155 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1156 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
1157 ; FAST_NOAVX-NEXT: setb %al
1158 ; FAST_NOAVX-NEXT: andb $1, %al
1159 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1160 ; FAST_NOAVX-NEXT: retq
1162 ; FAST_AVX-LABEL: fcmp_ult3:
1163 ; FAST_AVX: ## %bb.0:
1164 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1165 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
1166 ; FAST_AVX-NEXT: setb %al
1167 ; FAST_AVX-NEXT: andb $1, %al
1168 ; FAST_AVX-NEXT: movzbl %al, %eax
1169 ; FAST_AVX-NEXT: retq
1170 %1 = fcmp ult float %x, 0.000000e+00
1174 define zeroext i1 @fcmp_ule2(float %x) {
1175 ; SDAG-LABEL: fcmp_ule2:
1177 ; SDAG-NEXT: movb $1, %al
1180 ; FAST-LABEL: fcmp_ule2:
1182 ; FAST-NEXT: movb $1, %al
1183 ; FAST-NEXT: andb $1, %al
1184 ; FAST-NEXT: movzbl %al, %eax
1186 %1 = fcmp ule float %x, %x
1190 define zeroext i1 @fcmp_ule3(float %x) {
1191 ; SDAG-LABEL: fcmp_ule3:
1193 ; SDAG-NEXT: xorps %xmm1, %xmm1
1194 ; SDAG-NEXT: ucomiss %xmm1, %xmm0
1195 ; SDAG-NEXT: setbe %al
1198 ; FAST_NOAVX-LABEL: fcmp_ule3:
1199 ; FAST_NOAVX: ## %bb.0:
1200 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1201 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
1202 ; FAST_NOAVX-NEXT: setbe %al
1203 ; FAST_NOAVX-NEXT: andb $1, %al
1204 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1205 ; FAST_NOAVX-NEXT: retq
1207 ; FAST_AVX-LABEL: fcmp_ule3:
1208 ; FAST_AVX: ## %bb.0:
1209 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1210 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
1211 ; FAST_AVX-NEXT: setbe %al
1212 ; FAST_AVX-NEXT: andb $1, %al
1213 ; FAST_AVX-NEXT: movzbl %al, %eax
1214 ; FAST_AVX-NEXT: retq
1215 %1 = fcmp ule float %x, 0.000000e+00
1219 define zeroext i1 @fcmp_une2(float %x) {
1220 ; SDAG-LABEL: fcmp_une2:
1222 ; SDAG-NEXT: ucomiss %xmm0, %xmm0
1223 ; SDAG-NEXT: setp %al
1226 ; FAST_NOAVX-LABEL: fcmp_une2:
1227 ; FAST_NOAVX: ## %bb.0:
1228 ; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0
1229 ; FAST_NOAVX-NEXT: setp %al
1230 ; FAST_NOAVX-NEXT: andb $1, %al
1231 ; FAST_NOAVX-NEXT: movzbl %al, %eax
1232 ; FAST_NOAVX-NEXT: retq
1234 ; FAST_AVX-LABEL: fcmp_une2:
1235 ; FAST_AVX: ## %bb.0:
1236 ; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0
1237 ; FAST_AVX-NEXT: setp %al
1238 ; FAST_AVX-NEXT: andb $1, %al
1239 ; FAST_AVX-NEXT: movzbl %al, %eax
1240 ; FAST_AVX-NEXT: retq
1241 %1 = fcmp une float %x, %x
1245 define zeroext i1 @fcmp_une3(float %x) {
1246 ; SDAG-LABEL: fcmp_une3:
1248 ; SDAG-NEXT: xorps %xmm1, %xmm1
1249 ; SDAG-NEXT: cmpneqss %xmm0, %xmm1
1250 ; SDAG-NEXT: movd %xmm1, %eax
1251 ; SDAG-NEXT: andl $1, %eax
1252 ; SDAG-NEXT: ## kill: def $al killed $al killed $eax
1255 ; FAST_NOAVX-LABEL: fcmp_une3:
1256 ; FAST_NOAVX: ## %bb.0:
1257 ; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1
1258 ; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0
1259 ; FAST_NOAVX-NEXT: setne %al
1260 ; FAST_NOAVX-NEXT: setp %cl
1261 ; FAST_NOAVX-NEXT: orb %al, %cl
1262 ; FAST_NOAVX-NEXT: andb $1, %cl
1263 ; FAST_NOAVX-NEXT: movzbl %cl, %eax
1264 ; FAST_NOAVX-NEXT: retq
1266 ; FAST_AVX-LABEL: fcmp_une3:
1267 ; FAST_AVX: ## %bb.0:
1268 ; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
1269 ; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0
1270 ; FAST_AVX-NEXT: setne %al
1271 ; FAST_AVX-NEXT: setp %cl
1272 ; FAST_AVX-NEXT: orb %al, %cl
1273 ; FAST_AVX-NEXT: andb $1, %cl
1274 ; FAST_AVX-NEXT: movzbl %cl, %eax
1275 ; FAST_AVX-NEXT: retq
1276 %1 = fcmp une float %x, 0.000000e+00
1280 define zeroext i1 @icmp_eq2(i32 %x) {
1281 ; SDAG-LABEL: icmp_eq2:
1283 ; SDAG-NEXT: movb $1, %al
1286 ; FAST-LABEL: icmp_eq2:
1288 ; FAST-NEXT: movb $1, %al
1289 ; FAST-NEXT: andb $1, %al
1290 ; FAST-NEXT: movzbl %al, %eax
1292 %1 = icmp eq i32 %x, %x
1296 define zeroext i1 @icmp_ne2(i32 %x) {
1297 ; SDAG-LABEL: icmp_ne2:
1299 ; SDAG-NEXT: xorl %eax, %eax
1302 ; FAST-LABEL: icmp_ne2:
1304 ; FAST-NEXT: xorl %eax, %eax
1305 ; FAST-NEXT: andb $1, %al
1306 ; FAST-NEXT: movzbl %al, %eax
1308 %1 = icmp ne i32 %x, %x
1312 define zeroext i1 @icmp_ugt2(i32 %x) {
1313 ; SDAG-LABEL: icmp_ugt2:
1315 ; SDAG-NEXT: xorl %eax, %eax
1318 ; FAST-LABEL: icmp_ugt2:
1320 ; FAST-NEXT: xorl %eax, %eax
1321 ; FAST-NEXT: andb $1, %al
1322 ; FAST-NEXT: movzbl %al, %eax
1324 %1 = icmp ugt i32 %x, %x
1328 define zeroext i1 @icmp_uge2(i32 %x) {
1329 ; SDAG-LABEL: icmp_uge2:
1331 ; SDAG-NEXT: movb $1, %al
1334 ; FAST-LABEL: icmp_uge2:
1336 ; FAST-NEXT: movb $1, %al
1337 ; FAST-NEXT: andb $1, %al
1338 ; FAST-NEXT: movzbl %al, %eax
1340 %1 = icmp uge i32 %x, %x
1344 define zeroext i1 @icmp_ult2(i32 %x) {
1345 ; SDAG-LABEL: icmp_ult2:
1347 ; SDAG-NEXT: xorl %eax, %eax
1350 ; FAST-LABEL: icmp_ult2:
1352 ; FAST-NEXT: xorl %eax, %eax
1353 ; FAST-NEXT: andb $1, %al
1354 ; FAST-NEXT: movzbl %al, %eax
1356 %1 = icmp ult i32 %x, %x
1360 define zeroext i1 @icmp_ule2(i32 %x) {
1361 ; SDAG-LABEL: icmp_ule2:
1363 ; SDAG-NEXT: movb $1, %al
1366 ; FAST-LABEL: icmp_ule2:
1368 ; FAST-NEXT: movb $1, %al
1369 ; FAST-NEXT: andb $1, %al
1370 ; FAST-NEXT: movzbl %al, %eax
1372 %1 = icmp ule i32 %x, %x
1376 define zeroext i1 @icmp_sgt2(i32 %x) {
1377 ; SDAG-LABEL: icmp_sgt2:
1379 ; SDAG-NEXT: xorl %eax, %eax
1382 ; FAST-LABEL: icmp_sgt2:
1384 ; FAST-NEXT: xorl %eax, %eax
1385 ; FAST-NEXT: andb $1, %al
1386 ; FAST-NEXT: movzbl %al, %eax
1388 %1 = icmp sgt i32 %x, %x
1392 define zeroext i1 @icmp_sge2(i32 %x) {
1393 ; SDAG-LABEL: icmp_sge2:
1395 ; SDAG-NEXT: movb $1, %al
1398 ; FAST-LABEL: icmp_sge2:
1400 ; FAST-NEXT: movb $1, %al
1401 ; FAST-NEXT: andb $1, %al
1402 ; FAST-NEXT: movzbl %al, %eax
1404 %1 = icmp sge i32 %x, %x
1408 define zeroext i1 @icmp_slt2(i32 %x) {
1409 ; SDAG-LABEL: icmp_slt2:
1411 ; SDAG-NEXT: xorl %eax, %eax
1414 ; FAST-LABEL: icmp_slt2:
1416 ; FAST-NEXT: xorl %eax, %eax
1417 ; FAST-NEXT: andb $1, %al
1418 ; FAST-NEXT: movzbl %al, %eax
1420 %1 = icmp slt i32 %x, %x
1424 define zeroext i1 @icmp_sle2(i32 %x) {
1425 ; SDAG-LABEL: icmp_sle2:
1427 ; SDAG-NEXT: movb $1, %al
1430 ; FAST-LABEL: icmp_sle2:
1432 ; FAST-NEXT: movb $1, %al
1433 ; FAST-NEXT: andb $1, %al
1434 ; FAST-NEXT: movzbl %al, %eax
1436 %1 = icmp sle i32 %x, %x