From: Craig Topper Date: Sat, 28 Oct 2017 02:03:59 +0000 (+0000) Subject: [X86] Add avx command lines to two fast-isel tests to get coverage of selecting vucom... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd0a35a6495fce7f4e5254665680b47f7cd51d64;p=platform%2Fupstream%2Fllvm.git [X86] Add avx command lines to two fast-isel tests to get coverage of selecting vucomiss/vucomisd. The selection of these shows up as a code coverage hole when looking at the llvm-cov link on llvm.org llvm-svn: 316823 --- diff --git a/llvm/test/CodeGen/X86/fast-isel-cmp.ll b/llvm/test/CodeGen/X86/fast-isel-cmp.ll index 59c5363..9ca9464 100644 --- a/llvm/test/CodeGen/X86/fast-isel-cmp.ll +++ b/llvm/test/CodeGen/X86/fast-isel-cmp.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=ALL --check-prefix=SDAG -; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=ALL --check-prefix=FAST +; 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 +; 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 define zeroext i1 @fcmp_oeq(float %x, float %y) { ; SDAG-LABEL: fcmp_oeq: @@ -11,15 +12,25 @@ define zeroext i1 @fcmp_oeq(float %x, float %y) { ; SDAG-NEXT: ## kill: %AL %AL %EAX ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oeq: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: sete %al -; FAST-NEXT: setnp %cl -; FAST-NEXT: andb %al, %cl -; FAST-NEXT: andb $1, %cl -; FAST-NEXT: movzbl %cl, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oeq: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: sete %al +; FAST_NOAVX-NEXT: setnp %cl +; FAST_NOAVX-NEXT: andb %al, %cl +; FAST_NOAVX-NEXT: andb $1, %cl +; FAST_NOAVX-NEXT: movzbl %cl, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oeq: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: sete %al +; FAST_AVX-NEXT: setnp %cl +; FAST_AVX-NEXT: andb %al, %cl +; FAST_AVX-NEXT: andb $1, %cl +; FAST_AVX-NEXT: movzbl %cl, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oeq float %x, %y ret i1 %1 } @@ -31,13 +42,21 @@ define zeroext i1 @fcmp_ogt(float %x, float %y) { ; SDAG-NEXT: seta %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ogt: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: seta %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ogt: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: seta %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ogt: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: seta %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ogt float %x, %y ret i1 %1 } @@ -49,13 +68,21 @@ define zeroext i1 @fcmp_oge(float %x, float %y) { ; SDAG-NEXT: setae %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oge: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setae %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oge: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setae %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oge: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setae %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oge float %x, %y ret i1 %1 } @@ -67,13 +94,21 @@ define zeroext i1 @fcmp_olt(float %x, float %y) { ; SDAG-NEXT: seta %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_olt: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: seta %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_olt: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: seta %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_olt: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: seta %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp olt float %x, %y ret i1 %1 } @@ -85,13 +120,21 @@ define zeroext i1 @fcmp_ole(float %x, float %y) { ; SDAG-NEXT: setae %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ole: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setae %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ole: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setae %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ole: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setae %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ole float %x, %y ret i1 %1 } @@ -103,13 +146,21 @@ define zeroext i1 @fcmp_one(float %x, float %y) { ; SDAG-NEXT: setne %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_one: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setne %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_one: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setne %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_one: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setne %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp one float %x, %y ret i1 %1 } @@ -121,13 +172,21 @@ define zeroext i1 @fcmp_ord(float %x, float %y) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ord: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ord: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ord: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ord float %x, %y ret i1 %1 } @@ -139,13 +198,21 @@ define zeroext i1 @fcmp_uno(float %x, float %y) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_uno: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_uno: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_uno: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp uno float %x, %y ret i1 %1 } @@ -157,13 +224,21 @@ define zeroext i1 @fcmp_ueq(float %x, float %y) { ; SDAG-NEXT: sete %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ueq: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: sete %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ueq: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: sete %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ueq: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: sete %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ueq float %x, %y ret i1 %1 } @@ -175,13 +250,21 @@ define zeroext i1 @fcmp_ugt(float %x, float %y) { ; SDAG-NEXT: setb %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ugt: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setb %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ugt: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setb %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ugt: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setb %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ugt float %x, %y ret i1 %1 } @@ -193,13 +276,21 @@ define zeroext i1 @fcmp_uge(float %x, float %y) { ; SDAG-NEXT: setbe %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_uge: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setbe %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_uge: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setbe %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_uge: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setbe %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp uge float %x, %y ret i1 %1 } @@ -211,13 +302,21 @@ define zeroext i1 @fcmp_ult(float %x, float %y) { ; SDAG-NEXT: setb %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ult: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setb %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ult: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setb %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ult: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setb %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ult float %x, %y ret i1 %1 } @@ -229,13 +328,21 @@ define zeroext i1 @fcmp_ule(float %x, float %y) { ; SDAG-NEXT: setbe %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ule: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setbe %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ule: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setbe %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ule: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setbe %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ule float %x, %y ret i1 %1 } @@ -249,15 +356,25 @@ define zeroext i1 @fcmp_une(float %x, float %y) { ; SDAG-NEXT: ## kill: %AL %AL %EAX ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_une: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setne %al -; FAST-NEXT: setp %cl -; FAST-NEXT: orb %al, %cl -; FAST-NEXT: andb $1, %cl -; FAST-NEXT: movzbl %cl, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_une: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setne %al +; FAST_NOAVX-NEXT: setp %cl +; FAST_NOAVX-NEXT: orb %al, %cl +; FAST_NOAVX-NEXT: andb $1, %cl +; FAST_NOAVX-NEXT: movzbl %cl, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_une: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setne %al +; FAST_AVX-NEXT: setp %cl +; FAST_AVX-NEXT: orb %al, %cl +; FAST_AVX-NEXT: andb $1, %cl +; FAST_AVX-NEXT: movzbl %cl, %eax +; FAST_AVX-NEXT: retq %1 = fcmp une float %x, %y ret i1 %1 } @@ -450,13 +567,21 @@ define zeroext i1 @fcmp_oeq2(float %x) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oeq2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oeq2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oeq2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oeq float %x, %x ret i1 %1 } @@ -471,16 +596,27 @@ define zeroext i1 @fcmp_oeq3(float %x) { ; SDAG-NEXT: ## kill: %AL %AL %EAX ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oeq3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: sete %al -; FAST-NEXT: setnp %cl -; FAST-NEXT: andb %al, %cl -; FAST-NEXT: andb $1, %cl -; FAST-NEXT: movzbl %cl, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oeq3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: sete %al +; FAST_NOAVX-NEXT: setnp %cl +; FAST_NOAVX-NEXT: andb %al, %cl +; FAST_NOAVX-NEXT: andb $1, %cl +; FAST_NOAVX-NEXT: movzbl %cl, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oeq3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: sete %al +; FAST_AVX-NEXT: setnp %cl +; FAST_AVX-NEXT: andb %al, %cl +; FAST_AVX-NEXT: andb $1, %cl +; FAST_AVX-NEXT: movzbl %cl, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oeq float %x, 0.000000e+00 ret i1 %1 } @@ -509,14 +645,23 @@ define zeroext i1 @fcmp_ogt3(float %x) { ; SDAG-NEXT: seta %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ogt3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: seta %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ogt3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: seta %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ogt3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: seta %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ogt float %x, 0.000000e+00 ret i1 %1 } @@ -528,13 +673,21 @@ define zeroext i1 @fcmp_oge2(float %x) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oge2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oge2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oge2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oge float %x, %x ret i1 %1 } @@ -547,14 +700,23 @@ define zeroext i1 @fcmp_oge3(float %x) { ; SDAG-NEXT: setae %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_oge3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setae %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_oge3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setae %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_oge3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setae %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp oge float %x, 0.000000e+00 ret i1 %1 } @@ -583,14 +745,23 @@ define zeroext i1 @fcmp_olt3(float %x) { ; SDAG-NEXT: seta %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_olt3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: seta %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_olt3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: seta %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_olt3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: seta %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp olt float %x, 0.000000e+00 ret i1 %1 } @@ -602,13 +773,21 @@ define zeroext i1 @fcmp_ole2(float %x) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ole2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ole2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ole2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ole float %x, %x ret i1 %1 } @@ -621,14 +800,23 @@ define zeroext i1 @fcmp_ole3(float %x) { ; SDAG-NEXT: setae %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ole3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setae %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ole3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setae %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ole3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setae %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ole float %x, 0.000000e+00 ret i1 %1 } @@ -657,14 +845,23 @@ define zeroext i1 @fcmp_one3(float %x) { ; SDAG-NEXT: setne %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_one3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setne %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_one3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setne %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_one3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setne %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp one float %x, 0.000000e+00 ret i1 %1 } @@ -676,13 +873,21 @@ define zeroext i1 @fcmp_ord2(float %x) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ord2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ord2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ord2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ord float %x, %x ret i1 %1 } @@ -694,13 +899,21 @@ define zeroext i1 @fcmp_ord3(float %x) { ; SDAG-NEXT: setnp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ord3: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setnp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ord3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setnp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ord3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ord float %x, 0.000000e+00 ret i1 %1 } @@ -712,13 +925,21 @@ define zeroext i1 @fcmp_uno2(float %x) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_uno2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_uno2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_uno2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp uno float %x, %x ret i1 %1 } @@ -730,13 +951,21 @@ define zeroext i1 @fcmp_uno3(float %x) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_uno3: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_uno3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_uno3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp uno float %x, 0.000000e+00 ret i1 %1 } @@ -765,14 +994,23 @@ define zeroext i1 @fcmp_ueq3(float %x) { ; SDAG-NEXT: sete %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ueq3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: sete %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ueq3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: sete %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ueq3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: sete %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ueq float %x, 0.000000e+00 ret i1 %1 } @@ -784,13 +1022,21 @@ define zeroext i1 @fcmp_ugt2(float %x) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ugt2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ugt2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ugt2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ugt float %x, %x ret i1 %1 } @@ -803,14 +1049,23 @@ define zeroext i1 @fcmp_ugt3(float %x) { ; SDAG-NEXT: setb %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ugt3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setb %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ugt3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setb %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ugt3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setb %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ugt float %x, 0.000000e+00 ret i1 %1 } @@ -839,14 +1094,23 @@ define zeroext i1 @fcmp_uge3(float %x) { ; SDAG-NEXT: setbe %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_uge3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm0, %xmm1 -; FAST-NEXT: setbe %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_uge3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm1 +; FAST_NOAVX-NEXT: setbe %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_uge3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm1 +; FAST_AVX-NEXT: setbe %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp uge float %x, 0.000000e+00 ret i1 %1 } @@ -858,13 +1122,21 @@ define zeroext i1 @fcmp_ult2(float %x) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ult2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ult2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ult2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ult float %x, %x ret i1 %1 } @@ -877,14 +1149,23 @@ define zeroext i1 @fcmp_ult3(float %x) { ; SDAG-NEXT: setb %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ult3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setb %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ult3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setb %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ult3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setb %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ult float %x, 0.000000e+00 ret i1 %1 } @@ -913,14 +1194,23 @@ define zeroext i1 @fcmp_ule3(float %x) { ; SDAG-NEXT: setbe %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_ule3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setbe %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_ule3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setbe %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_ule3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setbe %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp ule float %x, 0.000000e+00 ret i1 %1 } @@ -932,13 +1222,21 @@ define zeroext i1 @fcmp_une2(float %x) { ; SDAG-NEXT: setp %al ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_une2: -; FAST: ## BB#0: -; FAST-NEXT: ucomiss %xmm0, %xmm0 -; FAST-NEXT: setp %al -; FAST-NEXT: andb $1, %al -; FAST-NEXT: movzbl %al, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_une2: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: ucomiss %xmm0, %xmm0 +; FAST_NOAVX-NEXT: setp %al +; FAST_NOAVX-NEXT: andb $1, %al +; FAST_NOAVX-NEXT: movzbl %al, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_une2: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomiss %xmm0, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: andb $1, %al +; FAST_AVX-NEXT: movzbl %al, %eax +; FAST_AVX-NEXT: retq %1 = fcmp une float %x, %x ret i1 %1 } @@ -953,16 +1251,27 @@ define zeroext i1 @fcmp_une3(float %x) { ; SDAG-NEXT: ## kill: %AL %AL %EAX ; SDAG-NEXT: retq ; -; FAST-LABEL: fcmp_une3: -; FAST: ## BB#0: -; FAST-NEXT: xorps %xmm1, %xmm1 -; FAST-NEXT: ucomiss %xmm1, %xmm0 -; FAST-NEXT: setne %al -; FAST-NEXT: setp %cl -; FAST-NEXT: orb %al, %cl -; FAST-NEXT: andb $1, %cl -; FAST-NEXT: movzbl %cl, %eax -; FAST-NEXT: retq +; FAST_NOAVX-LABEL: fcmp_une3: +; FAST_NOAVX: ## BB#0: +; FAST_NOAVX-NEXT: xorps %xmm1, %xmm1 +; FAST_NOAVX-NEXT: ucomiss %xmm1, %xmm0 +; FAST_NOAVX-NEXT: setne %al +; FAST_NOAVX-NEXT: setp %cl +; FAST_NOAVX-NEXT: orb %al, %cl +; FAST_NOAVX-NEXT: andb $1, %cl +; FAST_NOAVX-NEXT: movzbl %cl, %eax +; FAST_NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: fcmp_une3: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 +; FAST_AVX-NEXT: vucomiss %xmm1, %xmm0 +; FAST_AVX-NEXT: setne %al +; FAST_AVX-NEXT: setp %cl +; FAST_AVX-NEXT: orb %al, %cl +; FAST_AVX-NEXT: andb $1, %cl +; FAST_AVX-NEXT: movzbl %cl, %eax +; FAST_AVX-NEXT: retq %1 = fcmp une float %x, 0.000000e+00 ret i1 %1 } diff --git a/llvm/test/CodeGen/X86/fast-isel-select-cmov2.ll b/llvm/test/CodeGen/X86/fast-isel-select-cmov2.ll index 309030a..4e9eda0 100644 --- a/llvm/test/CodeGen/X86/fast-isel-select-cmov2.ll +++ b/llvm/test/CodeGen/X86/fast-isel-select-cmov2.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=SDAG -; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=CHECK --check-prefix=FAST +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=NOAVX --check-prefix=SDAG +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOAVX --check-prefix=FAST +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 -mattr=avx | FileCheck %s --check-prefix=CHECK --check-prefix=FAST_AVX ; Test all the cmp predicates that can feed an integer conditional move. @@ -32,150 +33,244 @@ define i64 @select_fcmp_oeq_cmov(double %a, double %b, i64 %c, i64 %d) { ; FAST-NEXT: cmoveq %rsi, %rdi ; FAST-NEXT: movq %rdi, %rax ; FAST-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_oeq_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: setnp %al +; FAST_AVX-NEXT: sete %cl +; FAST_AVX-NEXT: testb %al, %cl +; FAST_AVX-NEXT: cmoveq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp oeq double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ogt_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ogt_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovbeq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ogt_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovbeq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ogt_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovbeq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ogt double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_oge_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_oge_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovbq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_oge_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovbq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_oge_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovbq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp oge double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_olt_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_olt_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; CHECK-NEXT: cmovbeq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_olt_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm0, %xmm1 +; NOAVX-NEXT: cmovbeq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_olt_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm0, %xmm1 +; FAST_AVX-NEXT: cmovbeq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp olt double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ole_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ole_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; CHECK-NEXT: cmovbq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ole_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm0, %xmm1 +; NOAVX-NEXT: cmovbq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ole_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm0, %xmm1 +; FAST_AVX-NEXT: cmovbq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ole double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_one_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_one_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmoveq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_one_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmoveq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_one_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmoveq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp one double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ord_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ord_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovpq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ord_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovpq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ord_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovpq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ord double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_uno_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_uno_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovnpq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_uno_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovnpq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_uno_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovnpq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp uno double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ueq_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ueq_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovneq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ueq_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovneq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ueq_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovneq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ueq double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ugt_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ugt_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; CHECK-NEXT: cmovaeq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ugt_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm0, %xmm1 +; NOAVX-NEXT: cmovaeq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ugt_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm0, %xmm1 +; FAST_AVX-NEXT: cmovaeq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ugt double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_uge_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_uge_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; CHECK-NEXT: cmovaq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_uge_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm0, %xmm1 +; NOAVX-NEXT: cmovaq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_uge_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm0, %xmm1 +; FAST_AVX-NEXT: cmovaq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp uge double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ult_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ult_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovaeq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ult_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovaeq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ult_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovaeq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ult double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 } define i64 @select_fcmp_ule_cmov(double %a, double %b, i64 %c, i64 %d) { -; CHECK-LABEL: select_fcmp_ule_cmov: -; CHECK: ## BB#0: -; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; CHECK-NEXT: cmovaq %rsi, %rdi -; CHECK-NEXT: movq %rdi, %rax -; CHECK-NEXT: retq +; NOAVX-LABEL: select_fcmp_ule_cmov: +; NOAVX: ## BB#0: +; NOAVX-NEXT: ucomisd %xmm1, %xmm0 +; NOAVX-NEXT: cmovaq %rsi, %rdi +; NOAVX-NEXT: movq %rdi, %rax +; NOAVX-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_ule_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: cmovaq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp ule double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2 @@ -199,6 +294,16 @@ define i64 @select_fcmp_une_cmov(double %a, double %b, i64 %c, i64 %d) { ; FAST-NEXT: cmoveq %rsi, %rdi ; FAST-NEXT: movq %rdi, %rax ; FAST-NEXT: retq +; +; FAST_AVX-LABEL: select_fcmp_une_cmov: +; FAST_AVX: ## BB#0: +; FAST_AVX-NEXT: vucomisd %xmm1, %xmm0 +; FAST_AVX-NEXT: setp %al +; FAST_AVX-NEXT: setne %cl +; FAST_AVX-NEXT: orb %al, %cl +; FAST_AVX-NEXT: cmoveq %rsi, %rdi +; FAST_AVX-NEXT: movq %rdi, %rax +; FAST_AVX-NEXT: retq %1 = fcmp une double %a, %b %2 = select i1 %1, i64 %c, i64 %d ret i64 %2