[AArch64][GlobalISel] Re-generate checks for a test.
authorAmara Emerson <amara@apple.com>
Wed, 12 Jan 2022 22:54:11 +0000 (14:54 -0800)
committerAmara Emerson <amara@apple.com>
Wed, 12 Jan 2022 23:12:53 +0000 (15:12 -0800)
llvm/test/CodeGen/AArch64/arm64-ccmp.ll

index d3721d3..256d22d 100644 (file)
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc < %s -debugify-and-strip-all-safe -mcpu=cyclone -verify-machineinstrs -aarch64-enable-ccmp -aarch64-stress-ccmp | FileCheck %s
+; RUN: llc < %s -debugify-and-strip-all-safe -mcpu=cyclone -verify-machineinstrs -aarch64-enable-ccmp -aarch64-stress-ccmp -global-isel -global-isel-abort=2 | FileCheck %s --check-prefix=GISEL
 target triple = "arm64-apple-ios"
 
 define i32 @single_same(i32 %a, i32 %b) nounwind ssp {
@@ -15,6 +16,19 @@ define i32 @single_same(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB0_2: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: single_same:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #5
+; GISEL-NEXT:    ccmp w1, #17, #4, ne
+; GISEL-NEXT:    b.ne LBB0_2
+; GISEL-NEXT:  ; %bb.1: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB0_2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 5
   %cmp1 = icmp eq i32 %b, 17
@@ -43,6 +57,19 @@ define i32 @single_different(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB1_2: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: single_different:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #5
+; GISEL-NEXT:    ccmp w1, #17, #0, gt
+; GISEL-NEXT:    b.eq LBB1_2
+; GISEL-NEXT:  ; %bb.1: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB1_2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp sle i32 %a, 5
   %cmp1 = icmp ne i32 %b, 17
@@ -76,6 +103,24 @@ define i32 @single_flagclobber(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB2_3: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: single_flagclobber:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #5
+; GISEL-NEXT:    b.eq LBB2_2
+; GISEL-NEXT:  ; %bb.1: ; %lor.lhs.false
+; GISEL-NEXT:    lsl w8, w1, #1
+; GISEL-NEXT:    cmp w1, #7
+; GISEL-NEXT:    csinc w8, w8, w1, lt
+; GISEL-NEXT:    cmp w8, #17
+; GISEL-NEXT:    b.ge LBB2_3
+; GISEL-NEXT:  LBB2_2: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB2_3: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 5
   br i1 %cmp, label %if.then, label %lor.lhs.false
@@ -114,6 +159,23 @@ define i32 @single_flagclobber_tbz(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB3_3: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: single_flagclobber_tbz:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #5
+; GISEL-NEXT:    b.eq LBB3_2
+; GISEL-NEXT:  ; %bb.1: ; %lor.lhs.false
+; GISEL-NEXT:    lsl w8, w1, #1
+; GISEL-NEXT:    cmp w1, #7
+; GISEL-NEXT:    csinc w8, w8, w1, lt
+; GISEL-NEXT:    tbz w8, #3, LBB3_3
+; GISEL-NEXT:  LBB3_2: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB3_3: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 5
   br i1 %cmp, label %if.then, label %lor.lhs.false
@@ -154,6 +216,22 @@ define i32 @speculate_division(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: speculate_division:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    sdiv w8, w1, w0
+; GISEL-NEXT:    ccmp w8, #17, #0, gt
+; GISEL-NEXT:    b.lt LBB4_2
+; GISEL-NEXT:  ; %bb.1: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
+; GISEL-NEXT:  LBB4_2: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp sgt i32 %a, 0
   br i1 %cmp, label %land.lhs.true, label %if.end
@@ -190,6 +268,24 @@ define i32 @single_fcmp(i32 %a, float %b) nounwind ssp {
 ; CHECK-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: single_fcmp:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    scvtf s1, w0
+; GISEL-NEXT:    fdiv s0, s0, s1
+; GISEL-NEXT:    fmov s1, #17.00000000
+; GISEL-NEXT:    fccmp s0, s1, #8, gt
+; GISEL-NEXT:    b.ge LBB5_2
+; GISEL-NEXT:  ; %bb.1: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
+; GISEL-NEXT:  LBB5_2: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp sgt i32 %a, 0
   br i1 %cmp, label %land.lhs.true, label %if.end
@@ -221,6 +317,18 @@ define void @multi_different(i32 %a, i32 %b, i32 %c) nounwind ssp {
 ; CHECK-NEXT:    ret
 ; CHECK-NEXT:  LBB6_2: ; %if.then
 ; CHECK-NEXT:    b _foo
+;
+; GISEL-LABEL: multi_different:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, w1
+; GISEL-NEXT:    sdiv w8, w1, w0
+; GISEL-NEXT:    ccmp w8, #5, #0, gt
+; GISEL-NEXT:    ccmp w8, w2, #4, eq
+; GISEL-NEXT:    b.gt LBB6_2
+; GISEL-NEXT:  ; %bb.1: ; %if.end
+; GISEL-NEXT:    ret
+; GISEL-NEXT:  LBB6_2: ; %if.then
+; GISEL-NEXT:    b _foo
 entry:
   %cmp = icmp sgt i32 %a, %b
   br i1 %cmp, label %land.lhs.true, label %if.end
@@ -254,6 +362,19 @@ define i32 @cbz_head(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB7_2: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: cbz_head:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    ccmp w1, #17, #0, ne
+; GISEL-NEXT:    b.eq LBB7_2
+; GISEL-NEXT:  ; %bb.1: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB7_2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 0
   %cmp1 = icmp ne i32 %b, 17
@@ -288,6 +409,23 @@ define i32 @immediate_range(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: immediate_range:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #5
+; GISEL-NEXT:    b.eq LBB8_3
+; GISEL-NEXT:  ; %bb.1: ; %entry
+; GISEL-NEXT:    cmp w1, #32
+; GISEL-NEXT:    b.eq LBB8_3
+; GISEL-NEXT:  ; %bb.2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
+; GISEL-NEXT:  LBB8_3: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 5
   %cmp1 = icmp eq i32 %b, 32
@@ -316,6 +454,19 @@ define i32 @cbz_second(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB9_2: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: cbz_second:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    ccmp w1, #0, #0, ne
+; GISEL-NEXT:    b.eq LBB9_2
+; GISEL-NEXT:  ; %bb.1: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB9_2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 0
   %cmp1 = icmp ne i32 %b, 0
@@ -344,6 +495,19 @@ define i32 @cbnz_second(i32 %a, i32 %b) nounwind ssp {
 ; CHECK-NEXT:  LBB10_2: ; %if.end
 ; CHECK-NEXT:    mov w0, #7
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: cbnz_second:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    ccmp w1, #0, #4, ne
+; GISEL-NEXT:    b.ne LBB10_2
+; GISEL-NEXT:  ; %bb.1: ; %if.then
+; GISEL-NEXT:    stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
+; GISEL-NEXT:    bl _foo
+; GISEL-NEXT:    ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
+; GISEL-NEXT:  LBB10_2: ; %if.end
+; GISEL-NEXT:    mov w0, #7
+; GISEL-NEXT:    ret
 entry:
   %cmp = icmp eq i32 %a, 0
   %cmp1 = icmp eq i32 %b, 0
@@ -368,6 +532,10 @@ define void @build_modify_expr() nounwind ssp {
 ; CHECK-LABEL: build_modify_expr:
 ; CHECK:       ; %bb.0: ; %entry
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: build_modify_expr:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    ret
 entry:
   switch i32 undef, label %sw.bb.i.i [
     i32 69, label %if.end85
@@ -398,6 +566,18 @@ define i64 @select_and(i32 %w0, i32 %w1, i64 %x2, i64 %x3) {
 ; CHECK-NEXT:    ccmp w0, w1, #0, ne
 ; CHECK-NEXT:    csel x0, x2, x3, lt
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_and:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, w1
+; GISEL-NEXT:    cset w8, lt
+; GISEL-NEXT:    mov w9, #5
+; GISEL-NEXT:    cmp w9, w1
+; GISEL-NEXT:    cset w9, ne
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel x0, x2, x3, ne
+; GISEL-NEXT:    ret
   %1 = icmp slt i32 %w0, %w1
   %2 = icmp ne i32 5, %w1
   %3 = and i1 %1, %2
@@ -412,6 +592,18 @@ define i64 @select_or(i32 %w0, i32 %w1, i64 %x2, i64 %x3) {
 ; CHECK-NEXT:    ccmp w0, w1, #8, eq
 ; CHECK-NEXT:    csel x0, x2, x3, lt
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, w1
+; GISEL-NEXT:    cset w8, lt
+; GISEL-NEXT:    mov w9, #5
+; GISEL-NEXT:    cmp w9, w1
+; GISEL-NEXT:    cset w9, ne
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel x0, x2, x3, ne
+; GISEL-NEXT:    ret
   %1 = icmp slt i32 %w0, %w1
   %2 = icmp ne i32 5, %w1
   %3 = or i1 %1, %2
@@ -428,6 +620,21 @@ define i64 @gccbug(i64 %x0, i64 %x1) {
 ; CHECK-NEXT:    mov w8, #1
 ; CHECK-NEXT:    cinc x0, x8, eq
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: gccbug:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp x1, #0
+; GISEL-NEXT:    cset w8, eq
+; GISEL-NEXT:    mov w9, #2
+; GISEL-NEXT:    cmp x0, #2
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    cmp x0, #4
+; GISEL-NEXT:    cset w11, eq
+; GISEL-NEXT:    orr w10, w11, w10
+; GISEL-NEXT:    and w8, w10, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csinc x0, x9, xzr, ne
+; GISEL-NEXT:    ret
   %cmp0 = icmp eq i64 %x1, 0
   %cmp1 = icmp eq i64 %x0, 2
   %cmp2 = icmp eq i64 %x0, 4
@@ -448,6 +655,23 @@ define i32 @select_ororand(i32 %w0, i32 %w1, i32 %w2, i32 %w3) {
 ; CHECK-NEXT:    ccmp w0, #0, #4, ls
 ; CHECK-NEXT:    csel w0, w3, wzr, eq
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_ororand:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, eq
+; GISEL-NEXT:    cmp w1, #13
+; GISEL-NEXT:    cset w9, hi
+; GISEL-NEXT:    cmp w2, #2
+; GISEL-NEXT:    cset w10, lt
+; GISEL-NEXT:    cmp w3, #4
+; GISEL-NEXT:    cset w11, gt
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    and w9, w10, w11
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w3, wzr, ne
+; GISEL-NEXT:    ret
   %c0 = icmp eq i32 %w0, 0
   %c1 = icmp ugt i32 %w1, 13
   %c2 = icmp slt i32 %w2, 2
@@ -467,6 +691,20 @@ define i32 @select_andor(i32 %v1, i32 %v2, i32 %v3) {
 ; CHECK-NEXT:    ccmp w0, w1, #0, eq
 ; CHECK-NEXT:    csel w0, w0, w1, eq
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_andor:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, w1
+; GISEL-NEXT:    cset w8, eq
+; GISEL-NEXT:    cmp w1, w2
+; GISEL-NEXT:    cset w9, ge
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    orr w9, w10, w9
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = icmp eq i32 %v1, %v2
   %c1 = icmp sge i32 %v2, %v3
   %c2 = icmp eq i32 %v1, 0
@@ -493,6 +731,23 @@ define i64 @select_noccmp1(i64 %v1, i64 %v2, i64 %v3, i64 %r) {
 ; CHECK-NEXT:    cmp w8, #0
 ; CHECK-NEXT:    csel x0, xzr, x3, ne
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_noccmp1:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp x0, #0
+; GISEL-NEXT:    cset w8, lt
+; GISEL-NEXT:    cmp x0, #13
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    cmp x2, #2
+; GISEL-NEXT:    cset w10, lt
+; GISEL-NEXT:    cmp x2, #4
+; GISEL-NEXT:    cset w11, gt
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    and w9, w10, w11
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel x0, xzr, x3, ne
+; GISEL-NEXT:    ret
   %c0 = icmp slt i64 %v1, 0
   %c1 = icmp sgt i64 %v1, 13
   %c2 = icmp slt i64 %v3, 2
@@ -522,6 +777,20 @@ define i64 @select_noccmp2(i64 %v1, i64 %v2, i64 %v3, i64 %r) {
 ; CHECK-NEXT:    adrp x9, _g@PAGE
 ; CHECK-NEXT:    str w8, [x9, _g@PAGEOFF]
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_noccmp2:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp x0, #0
+; GISEL-NEXT:    cset w8, lt
+; GISEL-NEXT:    cmp x0, #13
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel x0, xzr, x3, ne
+; GISEL-NEXT:    sbfx w8, w8, #0, #1
+; GISEL-NEXT:    adrp x9, _g@PAGE
+; GISEL-NEXT:    str w8, [x9, _g@PAGEOFF]
+; GISEL-NEXT:    ret
   %c0 = icmp slt i64 %v1, 0
   %c1 = icmp sgt i64 %v1, 13
   %or = or i1 %c0, %c1
@@ -555,6 +824,29 @@ define i32 @select_noccmp3(i32 %v0, i32 %v1, i32 %v2) {
 ; CHECK-NEXT:    tst w8, w9
 ; CHECK-NEXT:    csel w0, w1, w2, ne
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_noccmp3:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, lt
+; GISEL-NEXT:    cmp w0, #13
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    cmp w0, #22
+; GISEL-NEXT:    cset w10, lt
+; GISEL-NEXT:    cmp w0, #44
+; GISEL-NEXT:    cset w11, gt
+; GISEL-NEXT:    cmp w0, #99
+; GISEL-NEXT:    cset w12, eq
+; GISEL-NEXT:    cmp w0, #77
+; GISEL-NEXT:    cset w13, eq
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    orr w9, w10, w11
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    orr w9, w12, w13
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w1, w2, ne
+; GISEL-NEXT:    ret
   %c0 = icmp slt i32 %v0, 0
   %c1 = icmp sgt i32 %v0, 13
   %c2 = icmp slt i32 %v0, 22
@@ -580,6 +872,19 @@ define i32 @select_and_olt_one(double %v0, double %v1, double %v2, double %v3, i
 ; CHECK-NEXT:    fccmp d2, d3, #1, ne
 ; CHECK-NEXT:    csel w0, w0, w1, vc
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_and_olt_one:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    cset w10, gt
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp one double %v2, %v3
   %cr = and i1 %c1, %c0
@@ -595,6 +900,19 @@ define i32 @select_and_one_olt(double %v0, double %v1, double %v2, double %v3, i
 ; CHECK-NEXT:    fccmp d2, d3, #0, vc
 ; CHECK-NEXT:    csel w0, w0, w1, mi
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_and_one_olt:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp one double %v0, %v1
   %c1 = fcmp olt double %v2, %v3
   %cr = and i1 %c1, %c0
@@ -610,6 +928,19 @@ define i32 @select_and_olt_ueq(double %v0, double %v1, double %v2, double %v3, i
 ; CHECK-NEXT:    fccmp d2, d3, #8, le
 ; CHECK-NEXT:    csel w0, w0, w1, pl
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_and_olt_ueq:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, eq
+; GISEL-NEXT:    cset w10, vs
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp ueq double %v2, %v3
   %cr = and i1 %c1, %c0
@@ -625,6 +956,19 @@ define i32 @select_and_ueq_olt(double %v0, double %v1, double %v2, double %v3, i
 ; CHECK-NEXT:    fccmp d2, d3, #0, pl
 ; CHECK-NEXT:    csel w0, w0, w1, mi
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_and_ueq_olt:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, eq
+; GISEL-NEXT:    cset w9, vs
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp ueq double %v0, %v1
   %c1 = fcmp olt double %v2, %v3
   %cr = and i1 %c1, %c0
@@ -640,6 +984,19 @@ define i32 @select_or_olt_one(double %v0, double %v1, double %v2, double %v3, i3
 ; CHECK-NEXT:    fccmp d2, d3, #8, le
 ; CHECK-NEXT:    csel w0, w0, w1, mi
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_olt_one:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    cset w10, gt
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp one double %v2, %v3
   %cr = or i1 %c1, %c0
@@ -655,6 +1012,19 @@ define i32 @select_or_one_olt(double %v0, double %v1, double %v2, double %v3, i3
 ; CHECK-NEXT:    fccmp d2, d3, #8, pl
 ; CHECK-NEXT:    csel w0, w0, w1, mi
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_one_olt:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp one double %v0, %v1
   %c1 = fcmp olt double %v2, %v3
   %cr = or i1 %c1, %c0
@@ -670,6 +1040,19 @@ define i32 @select_or_olt_ueq(double %v0, double %v1, double %v2, double %v3, i3
 ; CHECK-NEXT:    fccmp d2, d3, #1, ne
 ; CHECK-NEXT:    csel w0, w0, w1, vs
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_olt_ueq:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, eq
+; GISEL-NEXT:    cset w10, vs
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp ueq double %v2, %v3
   %cr = or i1 %c1, %c0
@@ -685,6 +1068,19 @@ define i32 @select_or_ueq_olt(double %v0, double %v1, double %v2, double %v3, i3
 ; CHECK-NEXT:    fccmp d2, d3, #8, vc
 ; CHECK-NEXT:    csel w0, w0, w1, mi
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_ueq_olt:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, eq
+; GISEL-NEXT:    cset w9, vs
+; GISEL-NEXT:    orr w8, w8, w9
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp ueq double %v0, %v1
   %c1 = fcmp olt double %v2, %v3
   %cr = or i1 %c1, %c0
@@ -701,6 +1097,22 @@ define i32 @select_or_olt_ogt_ueq(double %v0, double %v1, double %v2, double %v3
 ; CHECK-NEXT:    fccmp d4, d5, #1, ne
 ; CHECK-NEXT:    csel w0, w0, w1, vs
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_olt_ogt_ueq:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, gt
+; GISEL-NEXT:    fcmp d4, d5
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    cset w11, vs
+; GISEL-NEXT:    orr w10, w10, w11
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    orr w8, w10, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp ogt double %v2, %v3
   %c2 = fcmp ueq double %v4, %v5
@@ -719,6 +1131,22 @@ define i32 @select_or_olt_ueq_ogt(double %v0, double %v1, double %v2, double %v3
 ; CHECK-NEXT:    fccmp d4, d5, #0, vc
 ; CHECK-NEXT:    csel w0, w0, w1, gt
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: select_or_olt_ueq_ogt:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcmp d0, d1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcmp d2, d3
+; GISEL-NEXT:    cset w9, eq
+; GISEL-NEXT:    cset w10, vs
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    fcmp d4, d5
+; GISEL-NEXT:    cset w10, gt
+; GISEL-NEXT:    orr w8, w9, w8
+; GISEL-NEXT:    orr w8, w10, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt double %v0, %v1
   %c1 = fcmp ueq double %v2, %v3
   %c2 = fcmp ogt double %v4, %v5
@@ -741,6 +1169,21 @@ define i32 @half_select_and_olt_oge(half %v0, half %v1, half %v2, half %v3, i32
 ; CHECK-NEXT:    fccmp s1, s0, #8, mi
 ; CHECK-NEXT:    csel w0, w0, w1, ge
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: half_select_and_olt_oge:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcvt s0, h0
+; GISEL-NEXT:    fcvt s1, h1
+; GISEL-NEXT:    fcmp s0, s1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcvt s0, h2
+; GISEL-NEXT:    fcvt s1, h3
+; GISEL-NEXT:    fcmp s0, s1
+; GISEL-NEXT:    cset w9, ge
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt half %v0, %v1
   %c1 = fcmp oge half %v2, %v3
   %cr = and i1 %c1, %c0
@@ -760,6 +1203,23 @@ define i32 @half_select_and_olt_one(half %v0, half %v1, half %v2, half %v3, i32
 ; CHECK-NEXT:    fccmp s1, s0, #1, ne
 ; CHECK-NEXT:    csel w0, w0, w1, vc
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: half_select_and_olt_one:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    fcvt s0, h0
+; GISEL-NEXT:    fcvt s1, h1
+; GISEL-NEXT:    fcmp s0, s1
+; GISEL-NEXT:    cset w8, mi
+; GISEL-NEXT:    fcvt s0, h2
+; GISEL-NEXT:    fcvt s1, h3
+; GISEL-NEXT:    fcmp s0, s1
+; GISEL-NEXT:    cset w9, mi
+; GISEL-NEXT:    cset w10, gt
+; GISEL-NEXT:    orr w9, w9, w10
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w0, w1, ne
+; GISEL-NEXT:    ret
   %c0 = fcmp olt half %v0, %v1
   %c1 = fcmp one half %v2, %v3
   %cr = and i1 %c1, %c0
@@ -793,6 +1253,30 @@ define i32 @f128_select_and_olt_oge(fp128 %v0, fp128 %v1, fp128 %v2, fp128 %v3,
 ; CHECK-NEXT:    ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
 ; CHECK-NEXT:    add sp, sp, #80
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: f128_select_and_olt_oge:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    sub sp, sp, #80
+; GISEL-NEXT:    stp x22, x21, [sp, #32] ; 16-byte Folded Spill
+; GISEL-NEXT:    stp x20, x19, [sp, #48] ; 16-byte Folded Spill
+; GISEL-NEXT:    stp x29, x30, [sp, #64] ; 16-byte Folded Spill
+; GISEL-NEXT:    mov x19, x1
+; GISEL-NEXT:    mov x20, x0
+; GISEL-NEXT:    stp q2, q3, [sp] ; 32-byte Folded Spill
+; GISEL-NEXT:    bl ___lttf2
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w21, lt
+; GISEL-NEXT:    ldp q0, q1, [sp] ; 32-byte Folded Reload
+; GISEL-NEXT:    bl ___getf2
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, ge
+; GISEL-NEXT:    tst w8, w21
+; GISEL-NEXT:    csel w0, w20, w19, ne
+; GISEL-NEXT:    ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
+; GISEL-NEXT:    ldp x20, x19, [sp, #48] ; 16-byte Folded Reload
+; GISEL-NEXT:    ldp x22, x21, [sp, #32] ; 16-byte Folded Reload
+; GISEL-NEXT:    add sp, sp, #80
+; GISEL-NEXT:    ret
   %c0 = fcmp olt fp128 %v0, %v1
   %c1 = fcmp oge fp128 %v2, %v3
   %cr = and i1 %c1, %c0
@@ -811,6 +1295,23 @@ define i32 @deep_or(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %x, i32 %y) {
 ; CHECK-NEXT:    ccmp w0, #0, #4, ne
 ; CHECK-NEXT:    csel w0, w4, w5, ne
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: deep_or:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, ne
+; GISEL-NEXT:    cmp w1, #0
+; GISEL-NEXT:    cset w9, ne
+; GISEL-NEXT:    cmp w2, #15
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    cmp w2, #20
+; GISEL-NEXT:    cset w11, eq
+; GISEL-NEXT:    orr w10, w10, w11
+; GISEL-NEXT:    and w9, w10, w9
+; GISEL-NEXT:    and w8, w9, w8
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w4, w5, ne
+; GISEL-NEXT:    ret
   %c0 = icmp ne i32 %a0, 0
   %c1 = icmp ne i32 %a1, 0
   %c2 = icmp eq i32 %a2, 15
@@ -833,6 +1334,23 @@ define i32 @deep_or1(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %x, i32 %y) {
 ; CHECK-NEXT:    ccmp w1, #0, #4, ne
 ; CHECK-NEXT:    csel w0, w4, w5, ne
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: deep_or1:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, ne
+; GISEL-NEXT:    cmp w1, #0
+; GISEL-NEXT:    cset w9, ne
+; GISEL-NEXT:    cmp w2, #15
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    cmp w2, #20
+; GISEL-NEXT:    cset w11, eq
+; GISEL-NEXT:    orr w10, w10, w11
+; GISEL-NEXT:    and w8, w8, w10
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w4, w5, ne
+; GISEL-NEXT:    ret
   %c0 = icmp ne i32 %a0, 0
   %c1 = icmp ne i32 %a1, 0
   %c2 = icmp eq i32 %a2, 15
@@ -855,6 +1373,23 @@ define i32 @deep_or2(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %x, i32 %y) {
 ; CHECK-NEXT:    ccmp w0, #0, #4, ne
 ; CHECK-NEXT:    csel w0, w4, w5, ne
 ; CHECK-NEXT:    ret
+;
+; GISEL-LABEL: deep_or2:
+; GISEL:       ; %bb.0:
+; GISEL-NEXT:    cmp w0, #0
+; GISEL-NEXT:    cset w8, ne
+; GISEL-NEXT:    cmp w1, #0
+; GISEL-NEXT:    cset w9, ne
+; GISEL-NEXT:    cmp w2, #15
+; GISEL-NEXT:    cset w10, eq
+; GISEL-NEXT:    cmp w2, #20
+; GISEL-NEXT:    cset w11, eq
+; GISEL-NEXT:    orr w10, w10, w11
+; GISEL-NEXT:    and w8, w8, w9
+; GISEL-NEXT:    and w8, w8, w10
+; GISEL-NEXT:    tst w8, #0x1
+; GISEL-NEXT:    csel w0, w4, w5, ne
+; GISEL-NEXT:    ret
   %c0 = icmp ne i32 %a0, 0
   %c1 = icmp ne i32 %a1, 0
   %c2 = icmp eq i32 %a2, 15