[llvm] [X86][GlobalISel] Reorganize br/brcond tests (NFC) (PR #80204)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 13:47:31 PST 2024
https://github.com/turinevgeny updated https://github.com/llvm/llvm-project/pull/80204
>From 5e538ae67cfcf1772edd05b0b205a063acff293d Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Wed, 31 Jan 2024 11:59:25 -0800
Subject: [PATCH 1/6] [X86][GlobalISel] Reorganize br/brcond tests (NFC)
Removing duplicating tests under GlobalISel, consolidating
to perform checks with all three selectors.
---
llvm/test/CodeGen/X86/GlobalISel/br.ll | 19 -
llvm/test/CodeGen/X86/GlobalISel/brcond.ll | 91 -
.../test/CodeGen/X86/fast-isel-cmp-branch2.ll | 293 ----
.../test/CodeGen/X86/fast-isel-cmp-branch3.ll | 469 -----
llvm/test/CodeGen/X86/isel-br.ll | 39 +
llvm/test/CodeGen/X86/isel-brcond-fcmp.ll | 1325 +++++++++++++++
llvm/test/CodeGen/X86/isel-brcond-icmp.ll | 1508 +++++++++++++++++
7 files changed, 2872 insertions(+), 872 deletions(-)
delete mode 100644 llvm/test/CodeGen/X86/GlobalISel/br.ll
delete mode 100644 llvm/test/CodeGen/X86/GlobalISel/brcond.ll
delete mode 100644 llvm/test/CodeGen/X86/fast-isel-cmp-branch2.ll
delete mode 100644 llvm/test/CodeGen/X86/fast-isel-cmp-branch3.ll
create mode 100644 llvm/test/CodeGen/X86/isel-br.ll
create mode 100644 llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
create mode 100644 llvm/test/CodeGen/X86/isel-brcond-icmp.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..bb69e1deaa0c9
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-br.ll
@@ -0,0 +1,39 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=SDAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=FASTISEL
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=SDAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=FASTISEL
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL
+
+define void @uncondbr() {
+; SDAG-LABEL: uncondbr:
+; SDAG: # %bb.0: # %entry
+; SDAG-NEXT: jmp .LBB0_2
+; SDAG-NEXT: .LBB0_1: # %end
+; SDAG-NEXT: ret{{[l|q]}}
+; SDAG-NEXT: .LBB0_2: # %bb2
+; SDAG-NEXT: jmp .LBB0_1
+;
+; FASTISEL-LABEL: uncondbr:
+; FASTISEL: # %bb.0: # %entry
+; FASTISEL-NEXT: jmp .LBB0_2
+; FASTISEL-NEXT: .LBB0_1: # %end
+; FASTISEL-NEXT: ret{{[l|q]}}
+; FASTISEL-NEXT: .LBB0_2: # %bb2
+; FASTISEL-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..f4cac6a6d8fbe
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
@@ -0,0 +1,1325 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=X64
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=X64
+; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=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) {
+; 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..9d0f9d477b11c
--- /dev/null
+++ b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
@@ -0,0 +1,1508 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=SDAG-X64
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=FASTISEL-X64
+; 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 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=SDAG-X86
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=FASTISEL-X86
+; 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) {
+; SDAG-X64-LABEL: icmp_eq_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jne LBB0_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB0_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_eq_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jne LBB0_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB0_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_eq_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jne LBB0_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB0_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_eq_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jne LBB0_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB0_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_ne_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: je LBB1_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB1_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ne_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: je LBB1_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB1_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_ne_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: je LBB1_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB1_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ne_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: je LBB1_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB1_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_ugt_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jbe LBB2_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB2_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ugt_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jbe LBB2_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB2_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_ugt_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jbe LBB2_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB2_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ugt_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jbe LBB2_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB2_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_uge_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jb LBB3_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB3_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_uge_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jb LBB3_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB3_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_uge_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jb LBB3_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB3_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_uge_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jb LBB3_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB3_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_ult_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jae LBB4_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB4_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ult_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jae LBB4_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB4_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_ult_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jae LBB4_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB4_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ult_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jae LBB4_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB4_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_ule_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: ja LBB5_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB5_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ule_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: ja LBB5_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB5_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_ule_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: ja LBB5_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB5_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ule_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: ja LBB5_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB5_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_sgt_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jle LBB6_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB6_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_sgt_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jle LBB6_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB6_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_sgt_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jle LBB6_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB6_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sgt_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jle LBB6_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB6_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_sge_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jl LBB7_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB7_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_sge_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jl LBB7_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB7_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_sge_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jl LBB7_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB7_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sge_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jl LBB7_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB7_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_slt_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jge LBB8_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB8_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_slt_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jge LBB8_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB8_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_slt_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jge LBB8_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB8_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_slt_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jge LBB8_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB8_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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) {
+; SDAG-X64-LABEL: icmp_sle_2:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: cmpl %esi, %edi
+; SDAG-X64-NEXT: jg LBB9_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB9_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_sle_2:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: cmpl %esi, %edi
+; FASTISEL-X64-NEXT: jg LBB9_1
+; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+; FASTISEL-X64-NEXT: LBB9_1: ## %bb2
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-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
+;
+; SDAG-X86-LABEL: icmp_sle_2:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
+; SDAG-X86-NEXT: jg LBB9_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB9_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sle_2:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
+; FASTISEL-X86-NEXT: jg LBB9_1
+; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+; FASTISEL-X86-NEXT: LBB9_1: ## %bb2
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-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-X64-LABEL: icmp_eq:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: movb $1, %al
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB10_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB10_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_eq:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_eq:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movb $1, %al
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB10_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB10_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_eq:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_ne:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB11_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB11_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ne:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_ne:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB11_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB11_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ne:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_ugt:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB12_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB12_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ugt:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_ugt:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB12_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB12_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ugt:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_uge:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: movb $1, %al
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB13_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB13_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_uge:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movb $1, %al
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB13_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB13_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_uge:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_ult:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB14_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB14_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ult:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_ult:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB14_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB14_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ult:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_ule:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: movb $1, %al
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB15_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB15_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_ule:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_ule:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movb $1, %al
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB15_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB15_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_ule:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_sgt:
+; 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: icmp_sgt:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_sgt:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB16_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB16_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sgt:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_sge:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: movb $1, %al
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB17_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB17_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_sge:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_sge:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movb $1, %al
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB17_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB17_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sge:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_slt:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB18_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB18_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_slt:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: movl $1, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_slt:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB18_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB18_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_slt:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: movl $1, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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-X64-LABEL: icmp_sle:
+; SDAG-X64: ## %bb.0:
+; SDAG-X64-NEXT: movb $1, %al
+; SDAG-X64-NEXT: testb %al, %al
+; SDAG-X64-NEXT: je LBB19_1
+; SDAG-X64-NEXT: ## %bb.2: ## %bb1
+; SDAG-X64-NEXT: xorl %eax, %eax
+; SDAG-X64-NEXT: retq
+; SDAG-X64-NEXT: LBB19_1: ## %bb2
+; SDAG-X64-NEXT: movl $1, %eax
+; SDAG-X64-NEXT: retq
+;
+; FASTISEL-X64-LABEL: icmp_sle:
+; FASTISEL-X64: ## %bb.0:
+; FASTISEL-X64-NEXT: xorl %eax, %eax
+; FASTISEL-X64-NEXT: retq
+;
+; 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
+;
+; SDAG-X86-LABEL: icmp_sle:
+; SDAG-X86: ## %bb.0:
+; SDAG-X86-NEXT: movb $1, %al
+; SDAG-X86-NEXT: testb %al, %al
+; SDAG-X86-NEXT: je LBB19_1
+; SDAG-X86-NEXT: ## %bb.2: ## %bb1
+; SDAG-X86-NEXT: xorl %eax, %eax
+; SDAG-X86-NEXT: retl
+; SDAG-X86-NEXT: LBB19_1: ## %bb2
+; SDAG-X86-NEXT: movl $1, %eax
+; SDAG-X86-NEXT: retl
+;
+; FASTISEL-X86-LABEL: icmp_sle:
+; FASTISEL-X86: ## %bb.0:
+; FASTISEL-X86-NEXT: xorl %eax, %eax
+; FASTISEL-X86-NEXT: retl
+;
+; 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
+}
+
>From 3d1f8648f60a36ae9109091f070fa811ea75c537 Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Fri, 2 Feb 2024 17:32:19 -0800
Subject: [PATCH 2/6] Use common prefixes for isel-brcond-icmp.ll
---
llvm/test/CodeGen/X86/isel-brcond-icmp.ll | 1133 +++++++--------------
1 file changed, 366 insertions(+), 767 deletions(-)
diff --git a/llvm/test/CodeGen/X86/isel-brcond-icmp.ll b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
index 9d0f9d477b11c..db274571b2cc0 100644
--- a/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
+++ b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
@@ -1,33 +1,22 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=SDAG-X64
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=FASTISEL-X64
+; RUN: llc < %s -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 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=SDAG-X86
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=FASTISEL-X86
-; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=GISEL-X86
+; RUN: llc < %s -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) {
-; SDAG-X64-LABEL: icmp_eq_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jne LBB0_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB0_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_eq_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jne LBB0_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB0_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -42,29 +31,17 @@ define i32 @icmp_eq_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_eq_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jne LBB0_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB0_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_eq_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jne LBB0_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB0_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -88,27 +65,16 @@ bb1:
}
define i32 @icmp_ne_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_ne_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: je LBB1_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB1_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ne_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: je LBB1_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB1_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -123,29 +89,17 @@ define i32 @icmp_ne_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ne_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: je LBB1_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB1_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ne_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: je LBB1_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB1_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -169,27 +123,16 @@ bb1:
}
define i32 @icmp_ugt_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_ugt_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jbe LBB2_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB2_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ugt_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jbe LBB2_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB2_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -204,29 +147,17 @@ define i32 @icmp_ugt_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ugt_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jbe LBB2_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB2_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ugt_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jbe LBB2_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB2_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -250,27 +181,16 @@ bb1:
}
define i32 @icmp_uge_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_uge_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jb LBB3_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB3_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_uge_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jb LBB3_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB3_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -285,29 +205,17 @@ define i32 @icmp_uge_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_uge_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jb LBB3_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB3_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_uge_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jb LBB3_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB3_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -331,27 +239,16 @@ bb1:
}
define i32 @icmp_ult_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_ult_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jae LBB4_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB4_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ult_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jae LBB4_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB4_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -366,29 +263,17 @@ define i32 @icmp_ult_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ult_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jae LBB4_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB4_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ult_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jae LBB4_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB4_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -412,27 +297,16 @@ bb1:
}
define i32 @icmp_ule_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_ule_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: ja LBB5_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB5_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ule_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: ja LBB5_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB5_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -447,29 +321,17 @@ define i32 @icmp_ule_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ule_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: ja LBB5_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB5_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ule_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: ja LBB5_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB5_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -493,27 +355,16 @@ bb1:
}
define i32 @icmp_sgt_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_sgt_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jle LBB6_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB6_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_sgt_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jle LBB6_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB6_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -528,29 +379,17 @@ define i32 @icmp_sgt_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sgt_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jle LBB6_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB6_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sgt_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jle LBB6_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB6_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -574,27 +413,16 @@ bb1:
}
define i32 @icmp_sge_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_sge_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jl LBB7_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB7_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_sge_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jl LBB7_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB7_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -609,29 +437,17 @@ define i32 @icmp_sge_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sge_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jl LBB7_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB7_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sge_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jl LBB7_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB7_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -655,27 +471,16 @@ bb1:
}
define i32 @icmp_slt_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_slt_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jge LBB8_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB8_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_slt_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jge LBB8_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB8_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -690,29 +495,17 @@ define i32 @icmp_slt_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_slt_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jge LBB8_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB8_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_slt_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jge LBB8_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB8_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -736,27 +529,16 @@ bb1:
}
define i32 @icmp_sle_2(i32 %x, i32 %y) {
-; SDAG-X64-LABEL: icmp_sle_2:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: cmpl %esi, %edi
-; SDAG-X64-NEXT: jg LBB9_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB9_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_sle_2:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: cmpl %esi, %edi
-; FASTISEL-X64-NEXT: jg LBB9_1
-; FASTISEL-X64-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
-; FASTISEL-X64-NEXT: LBB9_1: ## %bb2
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -771,29 +553,17 @@ define i32 @icmp_sle_2(i32 %x, i32 %y) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sle_2:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: cmpl {{[0-9]+}}(%esp), %eax
-; SDAG-X86-NEXT: jg LBB9_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB9_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sle_2:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; FASTISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; FASTISEL-X86-NEXT: jg LBB9_1
-; FASTISEL-X86-NEXT: ## %bb.2: ## %bb1
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-; FASTISEL-X86-NEXT: LBB9_1: ## %bb2
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
+; 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:
@@ -817,22 +587,22 @@ bb1:
}
define i32 @icmp_eq(i32 %x) {
-; SDAG-X64-LABEL: icmp_eq:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: movb $1, %al
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB10_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB10_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_eq:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -847,23 +617,6 @@ define i32 @icmp_eq(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_eq:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movb $1, %al
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB10_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB10_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_eq:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_eq:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -886,22 +639,22 @@ bb1:
}
define i32 @icmp_ne(i32 %x) {
-; SDAG-X64-LABEL: icmp_ne:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB11_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB11_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ne:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -916,23 +669,6 @@ define i32 @icmp_ne(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ne:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB11_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB11_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ne:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_ne:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -955,22 +691,22 @@ bb1:
}
define i32 @icmp_ugt(i32 %x) {
-; SDAG-X64-LABEL: icmp_ugt:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB12_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB12_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ugt:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -985,23 +721,6 @@ define i32 @icmp_ugt(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ugt:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB12_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB12_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ugt:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_ugt:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1024,17 +743,17 @@ bb1:
}
define i32 @icmp_uge(i32 %x) {
-; SDAG-X64-LABEL: icmp_uge:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: movb $1, %al
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB13_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB13_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
+; 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:
@@ -1054,23 +773,6 @@ define i32 @icmp_uge(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_uge:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movb $1, %al
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB13_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB13_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_uge:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_uge:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1093,22 +795,22 @@ bb1:
}
define i32 @icmp_ult(i32 %x) {
-; SDAG-X64-LABEL: icmp_ult:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB14_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB14_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
+; 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: retq
+; FASTISEL-X64-NEXT: ret{{q|l}}
;
; GISEL-X64-LABEL: icmp_ult:
; GISEL-X64: ## %bb.0:
@@ -1123,23 +825,6 @@ define i32 @icmp_ult(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ult:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB14_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB14_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ult:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_ult:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1162,22 +847,22 @@ bb1:
}
define i32 @icmp_ule(i32 %x) {
-; SDAG-X64-LABEL: icmp_ule:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: movb $1, %al
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB15_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB15_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_ule:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -1192,23 +877,6 @@ define i32 @icmp_ule(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_ule:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movb $1, %al
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB15_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB15_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_ule:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_ule:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1231,22 +899,22 @@ bb1:
}
define i32 @icmp_sgt(i32 %x) {
-; SDAG-X64-LABEL: icmp_sgt:
-; 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: icmp_sgt:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -1261,23 +929,6 @@ define i32 @icmp_sgt(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sgt:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB16_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB16_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sgt:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_sgt:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1300,22 +951,22 @@ bb1:
}
define i32 @icmp_sge(i32 %x) {
-; SDAG-X64-LABEL: icmp_sge:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: movb $1, %al
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB17_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB17_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_sge:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -1330,23 +981,6 @@ define i32 @icmp_sge(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sge:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movb $1, %al
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB17_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB17_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sge:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_sge:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1369,22 +1003,22 @@ bb1:
}
define i32 @icmp_slt(i32 %x) {
-; SDAG-X64-LABEL: icmp_slt:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB18_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB18_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_slt:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: movl $1, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -1399,23 +1033,6 @@ define i32 @icmp_slt(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_slt:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB18_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB18_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_slt:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: movl $1, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_slt:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1438,22 +1055,22 @@ bb1:
}
define i32 @icmp_sle(i32 %x) {
-; SDAG-X64-LABEL: icmp_sle:
-; SDAG-X64: ## %bb.0:
-; SDAG-X64-NEXT: movb $1, %al
-; SDAG-X64-NEXT: testb %al, %al
-; SDAG-X64-NEXT: je LBB19_1
-; SDAG-X64-NEXT: ## %bb.2: ## %bb1
-; SDAG-X64-NEXT: xorl %eax, %eax
-; SDAG-X64-NEXT: retq
-; SDAG-X64-NEXT: LBB19_1: ## %bb2
-; SDAG-X64-NEXT: movl $1, %eax
-; SDAG-X64-NEXT: retq
-;
-; FASTISEL-X64-LABEL: icmp_sle:
-; FASTISEL-X64: ## %bb.0:
-; FASTISEL-X64-NEXT: xorl %eax, %eax
-; FASTISEL-X64-NEXT: retq
+; 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:
@@ -1468,23 +1085,6 @@ define i32 @icmp_sle(i32 %x) {
; GISEL-X64-NEXT: movl $1, %eax
; GISEL-X64-NEXT: retq
;
-; SDAG-X86-LABEL: icmp_sle:
-; SDAG-X86: ## %bb.0:
-; SDAG-X86-NEXT: movb $1, %al
-; SDAG-X86-NEXT: testb %al, %al
-; SDAG-X86-NEXT: je LBB19_1
-; SDAG-X86-NEXT: ## %bb.2: ## %bb1
-; SDAG-X86-NEXT: xorl %eax, %eax
-; SDAG-X86-NEXT: retl
-; SDAG-X86-NEXT: LBB19_1: ## %bb2
-; SDAG-X86-NEXT: movl $1, %eax
-; SDAG-X86-NEXT: retl
-;
-; FASTISEL-X86-LABEL: icmp_sle:
-; FASTISEL-X86: ## %bb.0:
-; FASTISEL-X86-NEXT: xorl %eax, %eax
-; FASTISEL-X86-NEXT: retl
-;
; GISEL-X86-LABEL: icmp_sle:
; GISEL-X86: ## %bb.0:
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1505,4 +1105,3 @@ bb2:
bb1:
ret i32 0
}
-
>From adf8c74ed8cd8fd3bb051f8a51097529c950242a Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Fri, 2 Feb 2024 17:59:08 -0800
Subject: [PATCH 3/6] Include lost CHECKs for SDAG/FastISel in
isel-brcond-fcmp.ll
---
llvm/test/CodeGen/X86/isel-brcond-fcmp.ll | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
index f4cac6a6d8fbe..e749413afeab2 100644
--- a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
+++ b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=X64
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=X64
-; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=GISEL-X64
+; RUN: llc < %s -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:
@@ -529,6 +529,23 @@ bb1:
}
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
>From 5d8cfd355ce2b3bbf40cf1a4c4cd92775105827b Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Fri, 2 Feb 2024 18:09:17 -0800
Subject: [PATCH 4/6] Use common prefix for isel-br.ll
---
llvm/test/CodeGen/X86/isel-br.ll | 34 ++++++++++++--------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/llvm/test/CodeGen/X86/isel-br.ll b/llvm/test/CodeGen/X86/isel-br.ll
index bb69e1deaa0c9..d143169242cd3 100644
--- a/llvm/test/CodeGen/X86/isel-br.ll
+++ b/llvm/test/CodeGen/X86/isel-br.ll
@@ -1,27 +1,19 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=SDAG
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=FASTISEL
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=SDAG
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=FASTISEL
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -verify-machineinstrs -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | 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 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=GISEL
define void @uncondbr() {
-; SDAG-LABEL: uncondbr:
-; SDAG: # %bb.0: # %entry
-; SDAG-NEXT: jmp .LBB0_2
-; SDAG-NEXT: .LBB0_1: # %end
-; SDAG-NEXT: ret{{[l|q]}}
-; SDAG-NEXT: .LBB0_2: # %bb2
-; SDAG-NEXT: jmp .LBB0_1
-;
-; FASTISEL-LABEL: uncondbr:
-; FASTISEL: # %bb.0: # %entry
-; FASTISEL-NEXT: jmp .LBB0_2
-; FASTISEL-NEXT: .LBB0_1: # %end
-; FASTISEL-NEXT: ret{{[l|q]}}
-; FASTISEL-NEXT: .LBB0_2: # %bb2
-; FASTISEL-NEXT: jmp .LBB0_1
+; 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
>From d9ed04728dc883f1cbc17e08a2002d741fffb611 Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Fri, 2 Feb 2024 18:12:06 -0800
Subject: [PATCH 5/6] minor whitespace adjustments...
---
llvm/test/CodeGen/X86/isel-br.ll | 10 +++++-----
llvm/test/CodeGen/X86/isel-brcond-fcmp.ll | 1 -
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/llvm/test/CodeGen/X86/isel-br.ll b/llvm/test/CodeGen/X86/isel-br.ll
index d143169242cd3..e82b168d0bf11 100644
--- a/llvm/test/CodeGen/X86/isel-br.ll
+++ b/llvm/test/CodeGen/X86/isel-br.ll
@@ -1,9 +1,9 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=DAG
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | 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 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | 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 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
+; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=GISEL
define void @uncondbr() {
diff --git a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
index e749413afeab2..8a4e5ca8ec899 100644
--- a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
+++ b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
@@ -1339,4 +1339,3 @@ bb2:
bb1:
ret i32 0
}
-
>From 5ed41fee2f2c0b58e1e30cb25df94dc6786c4b75 Mon Sep 17 00:00:00 2001
From: Evgeniy Tyurin <evgeniy.tyurin at intel.com>
Date: Tue, 6 Feb 2024 13:44:55 -0800
Subject: [PATCH 6/6] Use -global-isel=0 for SelectionDAG, lighten verifier
checks in isel-br.ll
---
llvm/test/CodeGen/X86/isel-br.ll | 12 ++++++------
llvm/test/CodeGen/X86/isel-brcond-fcmp.ll | 2 +-
llvm/test/CodeGen/X86/isel-brcond-icmp.ll | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/llvm/test/CodeGen/X86/isel-br.ll b/llvm/test/CodeGen/X86/isel-br.ll
index e82b168d0bf11..5388c89e18199 100644
--- a/llvm/test/CodeGen/X86/isel-br.ll
+++ b/llvm/test/CodeGen/X86/isel-br.ll
@@ -1,10 +1,10 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefix=DAG
-; RUN: llc < %s -O0 -mtriple=i686-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | 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 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=DAG
-; RUN: llc < %s -O0 -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefix=GISEL
+; 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:
diff --git a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
index 8a4e5ca8ec899..5a28e094f8a3c 100644
--- a/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
+++ b/llvm/test/CodeGen/X86/isel-brcond-fcmp.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s --check-prefixes=X64,SDAG-X64
+; 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
diff --git a/llvm/test/CodeGen/X86/isel-brcond-icmp.ll b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
index db274571b2cc0..59a45d9d72f5b 100644
--- a/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
+++ b/llvm/test/CodeGen/X86/isel-brcond-icmp.ll
@@ -1,8 +1,8 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X64,SDAG
+; 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 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X86,SDAG
+; 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
More information about the llvm-commits
mailing list