[llvm] 49ee2ff - [X86][GlobalISel] Reorganize br/brcond tests (NFC) (#80204)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 02:06:26 PST 2024
Author: Evgeniy
Date: 2024-02-08T15:36:22+05:30
New Revision: 49ee2ffc65b7660bfe84cd842e083d6c0ee3e991
URL: https://github.com/llvm/llvm-project/commit/49ee2ffc65b7660bfe84cd842e083d6c0ee3e991
DIFF: https://github.com/llvm/llvm-project/commit/49ee2ffc65b7660bfe84cd842e083d6c0ee3e991.diff
LOG: [X86][GlobalISel] Reorganize br/brcond tests (NFC) (#80204)
Removing duplicating tests under GlobalISel, consolidating to perform
checks with all three selectors.
Added:
llvm/test/CodeGen/X86/isel-br.ll
llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
llvm/test/CodeGen/X86/isel-brcond-icmp.ll
Modified:
Removed:
llvm/test/CodeGen/X86/GlobalISel/br.ll
llvm/test/CodeGen/X86/GlobalISel/brcond.ll
llvm/test/CodeGen/X86/fast-isel-cmp-branch2.ll
llvm/test/CodeGen/X86/fast-isel-cmp-branch3.ll
################################################################################
diff --git a/llvm/test/CodeGen/X86/GlobalISel/br.ll b/llvm/test/CodeGen/X86/GlobalISel/br.ll
deleted file mode 100644
index 878fe981c9884..0000000000000
--- a/llvm/test/CodeGen/X86/GlobalISel/br.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -O0 -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs %s -o - | FileCheck %s
-
-define void @uncondbr() {
-; CHECK-LABEL: uncondbr:
-; CHECK: # %bb.1: # %entry
-; CHECK-NEXT: jmp .LBB0_3
-; CHECK-NEXT: .LBB0_2: # %end
-; CHECK-NEXT: retq
-; CHECK-NEXT: .LBB0_3: # %bb2
-; CHECK-NEXT: jmp .LBB0_2
-entry:
- br label %bb2
-end:
- ret void
-bb2:
- br label %end
-}
-
diff --git a/llvm/test/CodeGen/X86/GlobalISel/brcond.ll b/llvm/test/CodeGen/X86/GlobalISel/brcond.ll
deleted file mode 100644
index b38fbfdcc83c8..0000000000000
--- a/llvm/test/CodeGen/X86/GlobalISel/brcond.ll
+++ /dev/null
@@ -1,91 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=X64
-; RUN: llc -mtriple=i386-linux-gnu -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=X86
-
-define i32 @test_1(i32 %a, i32 %b, i32 %tValue, i32 %fValue) {
-; X64-LABEL: test_1:
-; X64: # %bb.0: # %entry
-; X64-NEXT: cmpl %esi, %edi
-; X64-NEXT: setl %al
-; X64-NEXT: testb $1, %al
-; X64-NEXT: je .LBB0_2
-; X64-NEXT: # %bb.1: # %if.then
-; X64-NEXT: movl %edx, -{{[0-9]+}}(%rsp)
-; X64-NEXT: movl -{{[0-9]+}}(%rsp), %eax
-; X64-NEXT: retq
-; X64-NEXT: .LBB0_2: # %if.else
-; X64-NEXT: movl %ecx, -{{[0-9]+}}(%rsp)
-; X64-NEXT: movl -{{[0-9]+}}(%rsp), %eax
-; X64-NEXT: retq
-;
-; X86-LABEL: test_1:
-; X86: # %bb.0: # %entry
-; X86-NEXT: pushl %eax
-; X86-NEXT: .cfi_def_cfa_offset 8
-; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; X86-NEXT: setl %al
-; X86-NEXT: testb $1, %al
-; X86-NEXT: je .LBB0_2
-; X86-NEXT: # %bb.1: # %if.then
-; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: jmp .LBB0_3
-; X86-NEXT: .LBB0_2: # %if.else
-; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: .LBB0_3: # %return
-; X86-NEXT: movl %eax, (%esp)
-; X86-NEXT: movl (%esp), %eax
-; X86-NEXT: popl %ecx
-; X86-NEXT: .cfi_def_cfa_offset 4
-; X86-NEXT: retl
-entry:
- %retval = alloca i32, align 4
- %cmp = icmp slt i32 %a, %b
- br i1 %cmp, label %if.then, label %if.else
-
-if.then:
- store i32 %tValue, ptr %retval, align 4
- br label %return
-
-if.else:
- store i32 %fValue, ptr %retval, align 4
- br label %return
-
-return:
- %0 = load i32, ptr %retval, align 4
- ret i32 %0
-}
-
-define i32 @test_2(i32 %a) {
-; X64-LABEL: test_2:
-; X64: # %bb.0: # %entry
-; X64-NEXT: testb $1, %dil
-; X64-NEXT: je .LBB1_2
-; X64-NEXT: # %bb.1: # %if.then
-; X64-NEXT: xorl %eax, %eax
-; X64-NEXT: retq
-; X64-NEXT: .LBB1_2: # %if.else
-; X64-NEXT: movl $1, %eax
-; X64-NEXT: retq
-;
-; X86-LABEL: test_2:
-; X86: # %bb.0: # %entry
-; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: testb $1, %al
-; X86-NEXT: je .LBB1_2
-; X86-NEXT: # %bb.1: # %if.then
-; X86-NEXT: xorl %eax, %eax
-; X86-NEXT: retl
-; X86-NEXT: .LBB1_2: # %if.else
-; X86-NEXT: movl $1, %eax
-; X86-NEXT: retl
-entry:
- %cmp = trunc i32 %a to i1
- br i1 %cmp, label %if.then, label %if.else
-
-if.then:
- ret i32 0
-if.else:
- ret i32 1
-}
-
diff --git a/llvm/test/CodeGen/X86/fast-isel-cmp-branch2.ll b/llvm/test/CodeGen/X86/fast-isel-cmp-branch2.ll
deleted file mode 100644
index 475d8fcf7f35a..0000000000000
--- a/llvm/test/CodeGen/X86/fast-isel-cmp-branch2.ll
+++ /dev/null
@@ -1,293 +0,0 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s
-
-define i32 @fcmp_oeq(float %x, float %y) {
-; CHECK-LABEL: fcmp_oeq
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jne {{LBB.+_1}}
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp oeq float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ogt(float %x, float %y) {
-; CHECK-LABEL: fcmp_ogt
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jbe {{LBB.+_1}}
- %1 = fcmp ogt float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_oge(float %x, float %y) {
-; CHECK-LABEL: fcmp_oge
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jb {{LBB.+_1}}
- %1 = fcmp oge float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_olt(float %x, float %y) {
-; CHECK-LABEL: fcmp_olt
-; CHECK: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jbe {{LBB.+_1}}
- %1 = fcmp olt float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ole(float %x, float %y) {
-; CHECK-LABEL: fcmp_ole
-; CHECK: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jb {{LBB.+_1}}
- %1 = fcmp ole float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_one(float %x, float %y) {
-; CHECK-LABEL: fcmp_one
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: je {{LBB.+_1}}
- %1 = fcmp one float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ord(float %x, float %y) {
-; CHECK-LABEL: fcmp_ord
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp ord float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uno(float %x, float %y) {
-; CHECK-LABEL: fcmp_uno
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jp {{LBB.+_2}}
- %1 = fcmp uno float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ueq(float %x, float %y) {
-; CHECK-LABEL: fcmp_ueq
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: je {{LBB.+_2}}
- %1 = fcmp ueq float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ugt(float %x, float %y) {
-; CHECK-LABEL: fcmp_ugt
-; CHECK: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jae {{LBB.+_1}}
- %1 = fcmp ugt float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uge(float %x, float %y) {
-; CHECK-LABEL: fcmp_uge
-; CHECK: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: ja {{LBB.+_1}}
- %1 = fcmp uge float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ult(float %x, float %y) {
-; CHECK-LABEL: fcmp_ult
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jae {{LBB.+_1}}
- %1 = fcmp ult float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ule(float %x, float %y) {
-; CHECK-LABEL: fcmp_ule
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: ja {{LBB.+_1}}
- %1 = fcmp ule float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_une(float %x, float %y) {
-; CHECK-LABEL: fcmp_une
-; CHECK: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jne {{LBB.+_2}}
-; CHECK-NEXT: jnp {{LBB.+_1}}
- %1 = fcmp une float %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_eq(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_eq
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jne {{LBB.+_1}}
- %1 = icmp eq i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ne(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_ne
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: je {{LBB.+_1}}
- %1 = icmp ne i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ugt(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_ugt
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jbe {{LBB.+_1}}
- %1 = icmp ugt i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_uge(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_uge
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jb {{LBB.+_1}}
- %1 = icmp uge i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ult(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_ult
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jae {{LBB.+_1}}
- %1 = icmp ult i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ule(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_ule
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: ja {{LBB.+_1}}
- %1 = icmp ule i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sgt(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_sgt
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jle {{LBB.+_1}}
- %1 = icmp sgt i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sge(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_sge
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jl {{LBB.+_1}}
- %1 = icmp sge i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_slt(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_slt
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jge {{LBB.+_1}}
- %1 = icmp slt i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sle(i32 %x, i32 %y) {
-; CHECK-LABEL: icmp_sle
-; CHECK: cmpl %esi, %edi
-; CHECK-NEXT: jg {{LBB.+_1}}
- %1 = icmp sle i32 %x, %y
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
diff --git a/llvm/test/CodeGen/X86/fast-isel-cmp-branch3.ll b/llvm/test/CodeGen/X86/fast-isel-cmp-branch3.ll
deleted file mode 100644
index 8f09b2e383567..0000000000000
--- a/llvm/test/CodeGen/X86/fast-isel-cmp-branch3.ll
+++ /dev/null
@@ -1,469 +0,0 @@
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s
-
-define i32 @fcmp_oeq1(float %x) {
-; CHECK-LABEL: fcmp_oeq1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp oeq float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_oeq2(float %x) {
-; CHECK-LABEL: fcmp_oeq2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jne {{LBB.+_1}}
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp oeq float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ogt1(float %x) {
-; CHECK-LABEL: fcmp_ogt1
-; CHECK-NOT: ucomiss
-; CHECK: movl $1, %eax
- %1 = fcmp ogt float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ogt2(float %x) {
-; CHECK-LABEL: fcmp_ogt2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jbe {{LBB.+_1}}
- %1 = fcmp ogt float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_oge1(float %x) {
-; CHECK-LABEL: fcmp_oge1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp oge float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_oge2(float %x) {
-; CHECK-LABEL: fcmp_oge2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jb {{LBB.+_1}}
- %1 = fcmp oge float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_olt1(float %x) {
-; CHECK-LABEL: fcmp_olt1
-; CHECK-NOT: ucomiss
-; CHECK: movl $1, %eax
- %1 = fcmp olt float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_olt2(float %x) {
-; CHECK-LABEL: fcmp_olt2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jbe {{LBB.+_1}}
- %1 = fcmp olt float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ole1(float %x) {
-; CHECK-LABEL: fcmp_ole1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp ole float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ole2(float %x) {
-; CHECK-LABEL: fcmp_ole2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jb {{LBB.+_1}}
- %1 = fcmp ole float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_one1(float %x) {
-; CHECK-LABEL: fcmp_one1
-; CHECK-NOT: ucomiss
-; CHECK: movl $1, %eax
- %1 = fcmp one float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_one2(float %x) {
-; CHECK-LABEL: fcmp_one2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: je {{LBB.+_1}}
- %1 = fcmp one float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ord1(float %x) {
-; CHECK-LABEL: fcmp_ord1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp ord float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ord2(float %x) {
-; CHECK-LABEL: fcmp_ord2
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_1}}
- %1 = fcmp ord float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uno1(float %x) {
-; CHECK-LABEL: fcmp_uno1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_2}}
- %1 = fcmp uno float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uno2(float %x) {
-; CHECK-LABEL: fcmp_uno2
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jp {{LBB.+_2}}
- %1 = fcmp uno float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ueq1(float %x) {
-; CHECK-LABEL: fcmp_ueq1
-; CHECK-NOT: ucomiss
- %1 = fcmp ueq float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ueq2(float %x) {
-; CHECK-LABEL: fcmp_ueq2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: je {{LBB.+_2}}
- %1 = fcmp ueq float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ugt1(float %x) {
-; CHECK-LABEL: fcmp_ugt1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jnp {{LBB.+_1}}
- %1 = fcmp ugt float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ugt2(float %x) {
-; CHECK-LABEL: fcmp_ugt2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: jae {{LBB.+_1}}
- %1 = fcmp ugt float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uge1(float %x) {
-; CHECK-LABEL: fcmp_uge1
-; CHECK-NOT: ucomiss
- %1 = fcmp uge float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_uge2(float %x) {
-; CHECK-LABEL: fcmp_uge2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm0, %xmm1
-; CHECK-NEXT: ja {{LBB.+_1}}
- %1 = fcmp uge float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ult1(float %x) {
-; CHECK-LABEL: fcmp_ult1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jnp {{LBB.+_1}}
- %1 = fcmp ult float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ult2(float %x) {
-; CHECK-LABEL: fcmp_ult2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jae {{LBB.+_1}}
- %1 = fcmp ult float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ule1(float %x) {
-; CHECK-LABEL: fcmp_ule1
-; CHECK-NOT: ucomiss
- %1 = fcmp ule float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_ule2(float %x) {
-; CHECK-LABEL: fcmp_ule2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: ja {{LBB.+_1}}
- %1 = fcmp ule float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_une1(float %x) {
-; CHECK-LABEL: fcmp_une1
-; CHECK: ucomiss %xmm0, %xmm0
-; CHECK-NEXT: jnp {{LBB.+_1}}
- %1 = fcmp une float %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @fcmp_une2(float %x) {
-; CHECK-LABEL: fcmp_une2
-; CHECK: xorps %xmm1, %xmm1
-; CHECK-NEXT: ucomiss %xmm1, %xmm0
-; CHECK-NEXT: jne {{LBB.+_2}}
-; CHECK-NEXT: jnp {{LBB.+_1}}
- %1 = fcmp une float %x, 0.000000e+00
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_eq(i32 %x) {
-; CHECK-LABEL: icmp_eq
-; CHECK-NOT: cmpl
-; CHECK: xorl %eax, %eax
- %1 = icmp eq i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ne(i32 %x) {
-; CHECK-LABEL: icmp_ne
-; CHECK-NOT: cmpl
-; CHECK: movl $1, %eax
- %1 = icmp ne i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ugt(i32 %x) {
-; CHECK-LABEL: icmp_ugt
-; CHECK-NOT: cmpl
-; CHECK: movl $1, %eax
- %1 = icmp ugt i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_uge(i32 %x) {
-; CHECK-LABEL: icmp_uge
-; CHECK-NOT: cmpl
-; CHECK: xorl %eax, %eax
- %1 = icmp uge i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ult(i32 %x) {
-; CHECK-LABEL: icmp_ult
-; CHECK-NOT: cmpl
-; CHECK: movl $1, %eax
- %1 = icmp ult i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_ule(i32 %x) {
-; CHECK-LABEL: icmp_ule
-; CHECK-NOT: cmpl
-; CHECK: xorl %eax, %eax
- %1 = icmp ule i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sgt(i32 %x) {
-; CHECK-LABEL: icmp_sgt
-; CHECK-NOT: cmpl
-; CHECK: movl $1, %eax
- %1 = icmp sgt i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sge(i32 %x) {
-; CHECK-LABEL: icmp_sge
-; CHECK-NOT: cmpl
-; CHECK: xorl %eax, %eax
- %1 = icmp sge i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_slt(i32 %x) {
-; CHECK-LABEL: icmp_slt
-; CHECK-NOT: cmpl
-; CHECK: movl $1, %eax
- %1 = icmp slt i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
-define i32 @icmp_sle(i32 %x) {
-; CHECK-LABEL: icmp_sle
-; CHECK-NOT: cmpl
-; CHECK: xorl %eax, %eax
- %1 = icmp sle i32 %x, %x
- br i1 %1, label %bb1, label %bb2
-bb2:
- ret i32 1
-bb1:
- ret i32 0
-}
-
diff --git a/llvm/test/CodeGen/X86/isel-br.ll b/llvm/test/CodeGen/X86/isel-br.ll
new file mode 100644
index 0000000000000..5388c89e18199
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-br.ll
@@ -0,0 +1,31 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -global-isel=0 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=GISEL
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -global-isel=0 | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL
+
+define void @uncondbr() {
+; DAG-LABEL: uncondbr:
+; DAG: # %bb.0: # %entry
+; DAG-NEXT: jmp .LBB0_2
+; DAG-NEXT: .LBB0_1: # %end
+; DAG-NEXT: ret{{[l|q]}}
+; DAG-NEXT: .LBB0_2: # %bb2
+; DAG-NEXT: jmp .LBB0_1
+;
+; GISEL-LABEL: uncondbr:
+; GISEL: # %bb.1: # %entry
+; GISEL-NEXT: jmp .LBB0_3
+; GISEL-NEXT: .LBB0_2: # %end
+; GISEL-NEXT: ret{{[l|q]}}
+; GISEL-NEXT: .LBB0_3: # %bb2
+; GISEL-NEXT: jmp .LBB0_2
+entry:
+ br label %bb2
+end:
+ ret void
+bb2:
+ br label %end
+}
diff --git a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
new file mode 100644
index 0000000000000..5a28e094f8a3c
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
@@ -0,0 +1,1341 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -global-isel=0 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefixes=X64,SDAG-X64
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefixes=X64,FASTISEL-X64
+; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefixes=GISEL-X64
+
+define i32 @fcmp_oeq(float %x, float %y) {
+; X64-LABEL: fcmp_oeq:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jne LBB0_1
+; X64-NEXT: jp LBB0_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB0_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oeq:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: setnp %cl
+; GISEL-X64-NEXT: andb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB0_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB0_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oeq float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ogt(float %x, float %y) {
+; X64-LABEL: fcmp_ogt:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jbe LBB1_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB1_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ogt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB1_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB1_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ogt float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_oge(float %x, float %y) {
+; X64-LABEL: fcmp_oge:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jb LBB2_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB2_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oge:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB2_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB2_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oge float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_olt(float %x, float %y) {
+; X64-LABEL: fcmp_olt:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jbe LBB3_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB3_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_olt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB3_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB3_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp olt float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ole(float %x, float %y) {
+; X64-LABEL: fcmp_ole:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jb LBB4_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB4_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ole:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB4_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB4_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ole float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_one(float %x, float %y) {
+; X64-LABEL: fcmp_one:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: je LBB5_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB5_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_one:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB5_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB5_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp one float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ord(float %x, float %y) {
+; X64-LABEL: fcmp_ord:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jp LBB6_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB6_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ord:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setnp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB6_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB6_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ord float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uno(float %x, float %y) {
+; X64-LABEL: fcmp_uno:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jp LBB7_2
+; X64-NEXT: ## %bb.1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB7_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_uno:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB7_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB7_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uno float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ueq(float %x, float %y) {
+; X64-LABEL: fcmp_ueq:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: je LBB8_2
+; X64-NEXT: ## %bb.1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB8_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ueq:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB8_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB8_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ueq float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ugt(float %x, float %y) {
+; X64-LABEL: fcmp_ugt:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jae LBB9_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB9_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ugt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB9_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB9_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ugt float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uge(float %x, float %y) {
+; X64-LABEL: fcmp_uge:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: ja LBB10_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB10_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_uge:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB10_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB10_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uge float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ult(float %x, float %y) {
+; X64-LABEL: fcmp_ult:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jae LBB11_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB11_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ult:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB11_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB11_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ult float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ule(float %x, float %y) {
+; X64-LABEL: fcmp_ule:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: ja LBB12_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB12_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ule:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB12_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB12_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ule float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_une(float %x, float %y) {
+; X64-LABEL: fcmp_une:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jne LBB13_2
+; X64-NEXT: jnp LBB13_1
+; X64-NEXT: LBB13_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB13_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_une:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: setp %cl
+; GISEL-X64-NEXT: orb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB13_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB13_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp une float %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_oeq1(float %x) {
+; X64-LABEL: fcmp_oeq1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB14_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB14_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oeq1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: setnp %cl
+; GISEL-X64-NEXT: andb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB14_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB14_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oeq float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_oeq2(float %x) {
+; X64-LABEL: fcmp_oeq2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jne LBB15_1
+; X64-NEXT: jp LBB15_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB15_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oeq2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: setnp %cl
+; GISEL-X64-NEXT: andb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB15_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB15_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oeq float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ogt1(float %x) {
+; SDAG-X64-LABEL: fcmp_ogt1:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB16_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB16_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+
+; FASTISEL-X64-LABEL: fcmp_ogt1:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64: movl $1, %eax
+; FASTISEL-X64: retq
+
+; GISEL-X64-LABEL: fcmp_ogt1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB16_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB16_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ogt float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ogt2(float %x) {
+; X64-LABEL: fcmp_ogt2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jbe LBB17_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB17_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ogt2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB17_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB17_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ogt float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_oge1(float %x) {
+; X64-LABEL: fcmp_oge1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB18_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB18_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oge1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB18_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB18_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oge float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_oge2(float %x) {
+; X64-LABEL: fcmp_oge2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jb LBB19_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB19_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_oge2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB19_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB19_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp oge float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_olt1(float %x) {
+; GISEL-X64-LABEL: fcmp_olt1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB20_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB20_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp olt float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_olt2(float %x) {
+; X64-LABEL: fcmp_olt2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jbe LBB21_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB21_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_olt2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB21_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB21_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp olt float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ole1(float %x) {
+; X64-LABEL: fcmp_ole1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB22_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB22_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ole1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB22_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB22_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ole float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ole2(float %x) {
+; X64-LABEL: fcmp_ole2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jb LBB23_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB23_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ole2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB23_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB23_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ole float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_one1(float %x) {
+; GISEL-X64-LABEL: fcmp_one1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB24_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB24_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp one float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_one2(float %x) {
+; X64-LABEL: fcmp_one2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: je LBB25_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB25_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_one2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB25_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB25_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp one float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ord1(float %x) {
+; X64-LABEL: fcmp_ord1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB26_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB26_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ord1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setnp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB26_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB26_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ord float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ord2(float %x) {
+; X64-LABEL: fcmp_ord2:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB27_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB27_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ord2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setnp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB27_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB27_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ord float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uno1(float %x) {
+; X64-LABEL: fcmp_uno1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB28_2
+; X64-NEXT: ## %bb.1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB28_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_uno1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB28_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB28_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uno float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uno2(float %x) {
+; X64-LABEL: fcmp_uno2:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jp LBB29_2
+; X64-NEXT: ## %bb.1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB29_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_uno2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setp %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB29_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB29_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uno float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ueq1(float %x) {
+; GISEL-X64-LABEL: fcmp_ueq1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB30_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB30_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ueq float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ueq2(float %x) {
+; X64-LABEL: fcmp_ueq2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: je LBB31_2
+; X64-NEXT: ## %bb.1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB31_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ueq2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: jne LBB31_2
+; GISEL-X64-NEXT: ## %bb.1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB31_2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ueq float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ugt1(float %x) {
+; X64-LABEL: fcmp_ugt1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jnp LBB32_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB32_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ugt1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB32_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB32_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ugt float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ugt2(float %x) {
+; X64-LABEL: fcmp_ugt2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: jae LBB33_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB33_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ugt2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB33_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB33_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ugt float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uge1(float %x) {
+; GISEL-X64-LABEL: fcmp_uge1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB34_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB34_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uge float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_uge2(float %x) {
+; X64-LABEL: fcmp_uge2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm0, %xmm1
+; X64-NEXT: ja LBB35_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB35_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_uge2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm1
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB35_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB35_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp uge float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ult1(float %x) {
+; X64-LABEL: fcmp_ult1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jnp LBB36_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB36_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ult1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB36_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB36_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ult float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ult2(float %x) {
+; X64-LABEL: fcmp_ult2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jae LBB37_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB37_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ult2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB37_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB37_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ult float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ule1(float %x) {
+; GISEL-X64-LABEL: fcmp_ule1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB38_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB38_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ule float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_ule2(float %x) {
+; X64-LABEL: fcmp_ule2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: ja LBB39_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB39_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_ule2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB39_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB39_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp ule float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_une1(float %x) {
+; X64-LABEL: fcmp_une1:
+; X64: ## %bb.0:
+; X64-NEXT: ucomiss %xmm0, %xmm0
+; X64-NEXT: jnp LBB40_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB40_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_une1:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: ucomiss %xmm0, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: setp %cl
+; GISEL-X64-NEXT: orb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB40_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB40_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp une float %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @fcmp_une2(float %x) {
+; X64-LABEL: fcmp_une2:
+; X64: ## %bb.0:
+; X64-NEXT: xorps %xmm1, %xmm1
+; X64-NEXT: ucomiss %xmm1, %xmm0
+; X64-NEXT: jne LBB41_2
+; X64-NEXT: jnp LBB41_1
+; X64-NEXT: LBB41_2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB41_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: fcmp_une2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: movss {{.*#+}} xmm1 = [0.0E+0,0.0E+0,0.0E+0,0.0E+0]
+; GISEL-X64-NEXT: ucomiss %xmm1, %xmm0
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: setp %cl
+; GISEL-X64-NEXT: orb %al, %cl
+; GISEL-X64-NEXT: testb $1, %cl
+; GISEL-X64-NEXT: je LBB41_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB41_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+ %1 = fcmp une float %x, 0.000000e+00
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
diff --git a/llvm/test/CodeGen/X86/isel-brcond-icmp.ll b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
new file mode 100644
index 0000000000000..59a45d9d72f5b
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
@@ -0,0 +1,1107 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -global-isel=0 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X64,SDAG
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X64,FASTISEL
+; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=GISEL-X64
+; RUN: llc < %s -global-isel=0 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X86,SDAG
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X86,FASTISEL
+; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=GISEL-X86
+
+define i32 @icmp_eq_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_eq_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jne LBB0_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB0_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_eq_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB0_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB0_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_eq_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jne LBB0_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB0_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_eq_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: sete %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB0_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB0_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp eq i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ne_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_ne_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: je LBB1_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB1_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_ne_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB1_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB1_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_ne_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: je LBB1_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB1_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_ne_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setne %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB1_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB1_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ne i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ugt_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_ugt_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jbe LBB2_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB2_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_ugt_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB2_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB2_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_ugt_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jbe LBB2_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB2_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_ugt_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: seta %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB2_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB2_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ugt i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_uge_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_uge_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jb LBB3_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB3_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_uge_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB3_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB3_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_uge_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jb LBB3_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB3_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_uge_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setae %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB3_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB3_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp uge i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ult_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_ult_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jae LBB4_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB4_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_ult_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB4_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB4_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_ult_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jae LBB4_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB4_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_ult_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setb %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB4_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB4_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ult i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ule_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_ule_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: ja LBB5_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB5_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_ule_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB5_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB5_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_ule_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: ja LBB5_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB5_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_ule_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setbe %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB5_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB5_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ule i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sgt_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_sgt_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jle LBB6_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB6_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_sgt_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setg %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB6_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB6_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_sgt_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jle LBB6_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB6_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_sgt_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setg %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB6_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB6_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sgt i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sge_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_sge_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jl LBB7_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB7_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_sge_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setge %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB7_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB7_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_sge_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jl LBB7_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB7_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_sge_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setge %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB7_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB7_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sge i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_slt_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_slt_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jge LBB8_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB8_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_slt_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setl %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB8_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB8_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_slt_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jge LBB8_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB8_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_slt_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setl %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB8_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB8_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp slt i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sle_2(i32 %x, i32 %y) {
+; X64-LABEL: icmp_sle_2:
+; X64: ## %bb.0:
+; X64-NEXT: cmpl %esi, %edi
+; X64-NEXT: jg LBB9_1
+; X64-NEXT: ## %bb.2: ## %bb1
+; X64-NEXT: xorl %eax, %eax
+; X64-NEXT: retq
+; X64-NEXT: LBB9_1: ## %bb2
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_sle_2:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %esi, %edi
+; GISEL-X64-NEXT: setle %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB9_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB9_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; X86-LABEL: icmp_sle_2:
+; X86: ## %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}}
+; X86-NEXT: jg LBB9_1
+; X86-NEXT: ## %bb.2: ## %bb1
+; X86-NEXT: xorl %eax, %eax
+; X86-NEXT: retl
+; X86-NEXT: LBB9_1: ## %bb2
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: retl
+;
+; GISEL-X86-LABEL: icmp_sle_2:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; GISEL-X86-NEXT: setle %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB9_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB9_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sle i32 %x, %y
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_eq(i32 %x) {
+; SDAG-LABEL: icmp_eq:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: movb $1, %al
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB10_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB10_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_eq:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: xorl %eax, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_eq:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: sete %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB10_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB10_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_eq:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: sete %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB10_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB10_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp eq i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ne(i32 %x) {
+; SDAG-LABEL: icmp_ne:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB11_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB11_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_ne:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: movl $1, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_ne:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setne %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB11_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB11_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_ne:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setne %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB11_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB11_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ne i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ugt(i32 %x) {
+; SDAG-LABEL: icmp_ugt:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB12_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB12_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_ugt:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: movl $1, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_ugt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: seta %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB12_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB12_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_ugt:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: seta %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB12_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB12_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ugt i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_uge(i32 %x) {
+; SDAG-LABEL: icmp_uge:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: movb $1, %al
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB13_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB13_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-X64-LABEL: icmp_uge:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; GISEL-X64-LABEL: icmp_uge:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setae %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB13_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB13_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_uge:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setae %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB13_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB13_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp uge i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ult(i32 %x) {
+; SDAG-LABEL: icmp_ult:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB14_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB14_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-X64-LABEL: icmp_ult:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_ult:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setb %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB14_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB14_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_ult:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setb %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB14_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB14_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ult i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_ule(i32 %x) {
+; SDAG-LABEL: icmp_ule:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: movb $1, %al
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB15_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB15_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_ule:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: xorl %eax, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_ule:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setbe %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB15_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB15_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_ule:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setbe %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB15_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB15_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp ule i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sgt(i32 %x) {
+; SDAG-LABEL: icmp_sgt:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB16_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB16_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_sgt:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: movl $1, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_sgt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setg %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB16_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB16_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_sgt:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setg %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB16_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB16_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sgt i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sge(i32 %x) {
+; SDAG-LABEL: icmp_sge:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: movb $1, %al
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB17_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB17_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_sge:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: xorl %eax, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_sge:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setge %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB17_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB17_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_sge:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setge %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB17_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB17_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sge i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_slt(i32 %x) {
+; SDAG-LABEL: icmp_slt:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB18_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB18_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_slt:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: movl $1, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_slt:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setl %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB18_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB18_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_slt:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setl %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB18_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB18_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp slt i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
+
+define i32 @icmp_sle(i32 %x) {
+; SDAG-LABEL: icmp_sle:
+; SDAG: ## %bb.0:
+; SDAG-NEXT: movb $1, %al
+; SDAG-NEXT: testb %al, %al
+; SDAG-NEXT: je LBB19_1
+; SDAG-NEXT: ## %bb.2: ## %bb1
+; SDAG-NEXT: xorl %eax, %eax
+; SDAG-NEXT: ret{{q|l}}
+; SDAG-NEXT: LBB19_1: ## %bb2
+; SDAG-NEXT: movl $1, %eax
+; SDAG-NEXT: ret{{q|l}}
+;
+; FASTISEL-LABEL: icmp_sle:
+; FASTISEL: ## %bb.0:
+; FASTISEL-NEXT: xorl %eax, %eax
+; FASTISEL-NEXT: ret{{q|l}}
+;
+; GISEL-X64-LABEL: icmp_sle:
+; GISEL-X64: ## %bb.0:
+; GISEL-X64-NEXT: cmpl %edi, %edi
+; GISEL-X64-NEXT: setle %al
+; GISEL-X64-NEXT: testb $1, %al
+; GISEL-X64-NEXT: je LBB19_1
+; GISEL-X64-NEXT: ## %bb.2: ## %bb1
+; GISEL-X64-NEXT: xorl %eax, %eax
+; GISEL-X64-NEXT: retq
+; GISEL-X64-NEXT: LBB19_1: ## %bb2
+; GISEL-X64-NEXT: movl $1, %eax
+; GISEL-X64-NEXT: retq
+;
+; GISEL-X86-LABEL: icmp_sle:
+; GISEL-X86: ## %bb.0:
+; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GISEL-X86-NEXT: cmpl %eax, %eax
+; GISEL-X86-NEXT: setle %al
+; GISEL-X86-NEXT: testb $1, %al
+; GISEL-X86-NEXT: je LBB19_1
+; GISEL-X86-NEXT: ## %bb.2: ## %bb1
+; GISEL-X86-NEXT: xorl %eax, %eax
+; GISEL-X86-NEXT: retl
+; GISEL-X86-NEXT: LBB19_1: ## %bb2
+; GISEL-X86-NEXT: movl $1, %eax
+; GISEL-X86-NEXT: retl
+ %1 = icmp sle i32 %x, %x
+ br i1 %1, label %bb1, label %bb2
+bb2:
+ ret i32 1
+bb1:
+ ret i32 0
+}
More information about the llvm-commits
mailing list