[llvm] cbe2352 - [AArch64][GlobalISel] Regenerate and add gisel coverage for tbz-tbnz.ll. NFC

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 00:29:51 PDT 2025


Author: David Green
Date: 2025-05-28T08:29:47+01:00
New Revision: cbe2352c4dc607da71e7bd40213b8922fbdee482

URL: https://github.com/llvm/llvm-project/commit/cbe2352c4dc607da71e7bd40213b8922fbdee482
DIFF: https://github.com/llvm/llvm-project/commit/cbe2352c4dc607da71e7bd40213b8922fbdee482.diff

LOG: [AArch64][GlobalISel] Regenerate and add gisel coverage for tbz-tbnz.ll. NFC

Added: 
    

Modified: 
    llvm/test/CodeGen/AArch64/tbz-tbnz.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/tbz-tbnz.ll b/llvm/test/CodeGen/AArch64/tbz-tbnz.ll
index d301a380dbb84..3fe7346b3db28 100644
--- a/llvm/test/CodeGen/AArch64/tbz-tbnz.ll
+++ b/llvm/test/CodeGen/AArch64/tbz-tbnz.ll
@@ -1,16 +1,28 @@
-; RUN: llc < %s -O1 -mtriple=aarch64 -aarch64-enable-cond-br-tune=false | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=aarch64 | FileCheck %s --check-prefixes=CHECK,CHECK-SD
+; RUN: llc < %s -mtriple=aarch64 -global-isel | FileCheck %s --check-prefixes=CHECK,CHECK-GI
 
 declare void @t()
 
 define void @test1(i32 %a) {
-; CHECK-LABEL: @test1
+; CHECK-LABEL: test1:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp w0, #12
+; CHECK-NEXT:    b.mi .LBB0_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB0_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i32 %a, -12
   %cmp = icmp slt i32 %sub, 0
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:w[0-9]+]], w0, #12
-; CHECK: tbnz [[CMP]], #31
 
 if.then:
   call void @t()
@@ -21,14 +33,24 @@ if.end:
 }
 
 define void @test2(i64 %a) {
-; CHECK-LABEL: @test2
+; CHECK-LABEL: test2:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp x0, #12
+; CHECK-NEXT:    b.mi .LBB1_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB1_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i64 %a, -12
   %cmp = icmp slt i64 %sub, 0
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:x[0-9]+]], x0, #12
-; CHECK: tbnz [[CMP]], #63
 
 if.then:
   call void @t()
@@ -39,14 +61,23 @@ if.end:
 }
 
 define void @test3(i32 %a) {
-; CHECK-LABEL: @test3
+; CHECK-LABEL: test3:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp w0, #12
+; CHECK-NEXT:    b.mi .LBB2_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB2_2: // %if.end
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i32 %a, -12
   %cmp = icmp sgt i32 %sub, -1
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:w[0-9]+]], w0, #12
-; CHECK: tbnz [[CMP]], #31
 
 if.then:
   call void @t()
@@ -57,14 +88,23 @@ if.end:
 }
 
 define void @test4(i64 %a) {
-; CHECK-LABEL: @test4
+; CHECK-LABEL: test4:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp x0, #12
+; CHECK-NEXT:    b.mi .LBB3_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB3_2: // %if.end
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i64 %a, -12
   %cmp = icmp sgt i64 %sub, -1
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:x[0-9]+]], x0, #12
-; CHECK: tbnz [[CMP]], #63
 
 if.then:
   call void @t()
@@ -75,14 +115,23 @@ if.end:
 }
 
 define void @test5(i32 %a) {
-; CHECK-LABEL: @test5
+; CHECK-LABEL: test5:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp w0, #12
+; CHECK-NEXT:    b.mi .LBB4_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB4_2: // %if.end
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i32 %a, -12
   %cmp = icmp sge i32 %sub, 0
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:w[0-9]+]], w0, #12
-; CHECK: tbnz [[CMP]], #31
 
 if.then:
   call void @t()
@@ -93,14 +142,23 @@ if.end:
 }
 
 define void @test6(i64 %a) {
-; CHECK-LABEL: @test6
+; CHECK-LABEL: test6:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp x0, #12
+; CHECK-NEXT:    b.mi .LBB5_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB5_2: // %if.end
+; CHECK-NEXT:    ret
 entry:
   %sub = add nsw i64 %a, -12
   %cmp = icmp sge i64 %sub, 0
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:x[0-9]+]], x0, #12
-; CHECK: tbnz [[CMP]], #63
 
 if.then:
   call void @t()
@@ -111,14 +169,24 @@ if.end:
 }
 
 define void @test7(i32 %a) {
-; CHECK-LABEL: @test7
+; CHECK-LABEL: test7:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    cmp w0, #12
+; CHECK-NEXT:    b.mi .LBB6_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB6_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
 entry:
   %sub = sub nsw i32 %a, 12
   %cmp = icmp slt i32 %sub, 0
   br i1 %cmp, label %if.then, label %if.end
 
-; CHECK: sub [[CMP:w[0-9]+]], w0, #12
-; CHECK: tbnz [[CMP]], #31
 
 if.then:
   call void @t()
@@ -129,22 +197,61 @@ if.end:
 }
 
 define void @test8(i64 %val1, i64 %val2, i64 %val3) {
-; CHECK-LABEL: @test8
+; CHECK-SD-LABEL: test8:
+; CHECK-SD:       // %bb.0:
+; CHECK-SD-NEXT:    tst x0, x1
+; CHECK-SD-NEXT:    b.ge .LBB7_3
+; CHECK-SD-NEXT:  // %bb.1:
+; CHECK-SD-NEXT:    and x8, x1, x2
+; CHECK-SD-NEXT:    tbnz x8, #63, .LBB7_3
+; CHECK-SD-NEXT:  // %bb.2: // %if.then2
+; CHECK-SD-NEXT:    tst x0, x1, lsl #63
+; CHECK-SD-NEXT:    b.lt .LBB7_4
+; CHECK-SD-NEXT:  .LBB7_3: // %if.end
+; CHECK-SD-NEXT:    ret
+; CHECK-SD-NEXT:  .LBB7_4: // %if.then3
+; CHECK-SD-NEXT:    tst x0, x1, lsl #62
+; CHECK-SD-NEXT:    b.lt .LBB7_3
+; CHECK-SD-NEXT:  // %bb.5: // %if.then4
+; CHECK-SD-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-SD-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-SD-NEXT:    .cfi_offset w30, -16
+; CHECK-SD-NEXT:    bl t
+; CHECK-SD-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-SD-NEXT:    ret
+;
+; CHECK-GI-LABEL: test8:
+; CHECK-GI:       // %bb.0:
+; CHECK-GI-NEXT:    tst x0, x1
+; CHECK-GI-NEXT:    b.ge .LBB7_3
+; CHECK-GI-NEXT:  // %bb.1:
+; CHECK-GI-NEXT:    tst x1, x2
+; CHECK-GI-NEXT:    b.lt .LBB7_3
+; CHECK-GI-NEXT:  // %bb.2: // %if.then2
+; CHECK-GI-NEXT:    tst x0, x1, lsl #63
+; CHECK-GI-NEXT:    b.lt .LBB7_4
+; CHECK-GI-NEXT:  .LBB7_3: // %if.end
+; CHECK-GI-NEXT:    ret
+; CHECK-GI-NEXT:  .LBB7_4: // %if.then3
+; CHECK-GI-NEXT:    tst x0, x1, lsl #62
+; CHECK-GI-NEXT:    b.lt .LBB7_3
+; CHECK-GI-NEXT:  // %bb.5: // %if.then4
+; CHECK-GI-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-GI-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-GI-NEXT:    .cfi_offset w30, -16
+; CHECK-GI-NEXT:    bl t
+; CHECK-GI-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-GI-NEXT:    ret
   %and1 = and i64 %val1, %val2
   %tst1 = icmp slt i64 %and1, 0
   br i1 %tst1, label %if.then1, label %if.end
 
-; CHECK: tst x0, x1
-; CHECK-NEXT: b.ge
 
 if.then1:
   %and2 = and i64 %val2, %val3
   %tst2 = icmp sge i64 %and2, 0
   br i1 %tst2, label %if.then2, label %if.end
 
-; CHECK: and [[CMP:x[0-9]+]], x1, x2
-; CHECK-NOT: cmp
-; CHECK: tbnz [[CMP]], #63
 
 if.then2:
   %shifted_op1 = shl i64 %val2, 63
@@ -152,8 +259,6 @@ if.then2:
   %tst3 = icmp slt i64 %shifted_and1, 0
   br i1 %tst3, label %if.then3, label %if.end
 
-; CHECK: tst x0, x1, lsl #63
-; CHECK: b.lt
 
 if.then3:
   %shifted_op2 = shl i64 %val2, 62
@@ -161,8 +266,6 @@ if.then3:
   %tst4 = icmp sge i64 %shifted_and2, 0
   br i1 %tst4, label %if.then4, label %if.end
 
-; CHECK: tst x0, x1, lsl #62
-; CHECK: b.lt
 
 if.then4:
   call void @t()
@@ -173,12 +276,21 @@ if.end:
 }
 
 define void @test9(i64 %val1) {
-; CHECK-LABEL: @test9
+; CHECK-LABEL: test9:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz x0, #63, .LBB8_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB8_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
   %tst = icmp slt i64 %val1, 0
   br i1 %tst, label %if.then, label %if.end
 
-; CHECK-NOT: cmp
-; CHECK: tbnz x0, #63
 
 if.then:
   call void @t()
@@ -189,12 +301,21 @@ if.end:
 }
 
 define void @test10(i64 %val1) {
-; CHECK-LABEL: @test10
+; CHECK-LABEL: test10:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz x0, #63, .LBB9_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB9_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
   %tst = icmp slt i64 %val1, 0
   br i1 %tst, label %if.then, label %if.end
 
-; CHECK-NOT: cmp
-; CHECK: tbnz x0, #63
 
 if.then:
   call void @t()
@@ -205,11 +326,20 @@ if.end:
 }
 
 define void @test11(i64 %val1, ptr %ptr) {
-; CHECK-LABEL: @test11
+; CHECK-LABEL: test11:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    ldr x8, [x1]
+; CHECK-NEXT:    tbnz x8, #63, .LBB10_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB10_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
 
-; CHECK: ldr [[CMP:x[0-9]+]], [x1]
-; CHECK-NOT: cmp
-; CHECK: tbnz [[CMP]], #63
 
   %val = load i64, ptr %ptr
   %tst = icmp slt i64 %val, 0
@@ -224,12 +354,21 @@ if.end:
 }
 
 define void @test12(i64 %val1) {
-; CHECK-LABEL: @test12
+; CHECK-LABEL: test12:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz x0, #63, .LBB11_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB11_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
   %tst = icmp slt i64 %val1, 0
   br i1 %tst, label %if.then, label %if.end
 
-; CHECK-NOT: cmp
-; CHECK: tbnz x0, #63
 
 if.then:
   call void @t()
@@ -240,14 +379,23 @@ if.end:
 }
 
 define void @test13(i64 %val1, i64 %val2) {
-; CHECK-LABEL: @test13
+; CHECK-LABEL: test13:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    orr x8, x0, x1
+; CHECK-NEXT:    tbnz x8, #63, .LBB12_2
+; CHECK-NEXT:  // %bb.1: // %if.end
+; CHECK-NEXT:    ret
+; CHECK-NEXT:  .LBB12_2: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
   %or = or i64 %val1, %val2
   %tst = icmp slt i64 %or, 0
   br i1 %tst, label %if.then, label %if.end
 
-; CHECK: orr [[CMP:x[0-9]+]], x0, x1
-; CHECK-NOT: cmp
-; CHECK: tbnz [[CMP]], #63
 
 if.then:
   call void @t()
@@ -258,11 +406,19 @@ if.end:
 }
 
 define void @test14(i1 %cond) {
-; CHECK-LABEL: @test14
+; CHECK-LABEL: test14:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #0, .LBB13_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB13_2: // %if.end
+; CHECK-NEXT:    ret
   br i1 %cond, label %if.end, label %if.then
 
-; CHECK-NOT: and
-; CHECK: tbnz w0, #0
 
 if.then:
   call void @t()
@@ -273,12 +429,20 @@ if.end:
 }
 
 define void @test15(i1 %cond) {
-; CHECK-LABEL: @test15
+; CHECK-LABEL: test15:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #0, .LBB14_2
+; CHECK-NEXT:  // %bb.1: // %if.then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB14_2: // %if.end
+; CHECK-NEXT:    ret
   %cond1 = xor i1 %cond, -1
   br i1 %cond1, label %if.then, label %if.end
 
-; CHECK-NOT: movn
-; CHECK: tbnz w0, #0
 
 if.then:
   call void @t()
@@ -289,14 +453,22 @@ if.end:
 }
 
 define void @test16(i64 %in) {
-; CHECK-LABEL: @test16
+; CHECK-LABEL: test16:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #2, .LBB15_2
+; CHECK-NEXT:  // %bb.1: // %then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB15_2: // %end
+; CHECK-NEXT:    ret
   %shl = shl i64 %in, 3
   %and = and i64 %shl, 32
   %cond = icmp eq i64 %and, 0
   br i1 %cond, label %then, label %end
 
-; CHECK-NOT: lsl
-; CHECK: tbnz w0, #2
 
 then:
   call void @t()
@@ -307,14 +479,22 @@ end:
 }
 
 define void @test17(i64 %in) {
-; CHECK-LABEL: @test17
+; CHECK-LABEL: test17:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #3, .LBB16_2
+; CHECK-NEXT:  // %bb.1: // %then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB16_2: // %end
+; CHECK-NEXT:    ret
   %shr = ashr i64 %in, 3
   %and = and i64 %shr, 1
   %cond = icmp eq i64 %and, 0
   br i1 %cond, label %then, label %end
 
-; CHECK-NOT: lsr
-; CHECK: tbnz w0, #3
 
 then:
   call void @t()
@@ -325,13 +505,21 @@ end:
 }
 
 define void @test18(i32 %in) {
-; CHECK-LABEL: @test18
+; CHECK-LABEL: test18:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #31, .LBB17_2
+; CHECK-NEXT:  // %bb.1: // %then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB17_2: // %end
+; CHECK-NEXT:    ret
   %shr = ashr i32 %in, 2
   %cond = icmp sge i32 %shr, 0
   br i1 %cond, label %then, label %end
 
-; CHECK-NOT: asr
-; CHECK: tbnz w0, #31
 
 then:
   call void @t()
@@ -342,15 +530,23 @@ end:
 }
 
 define void @test19(i64 %in) {
-; CHECK-LABEL: @test19
+; CHECK-LABEL: test19:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    tbnz w0, #3, .LBB18_2
+; CHECK-NEXT:  // %bb.1: // %then
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl t
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:  .LBB18_2: // %end
+; CHECK-NEXT:    ret
   %shl = lshr i64 %in, 3
   %trunc = trunc i64 %shl to i32
   %and = and i32 %trunc, 1
   %cond = icmp eq i32 %and, 0
   br i1 %cond, label %then, label %end
 
-; CHECK-NOT: ubfx
-; CHECK: tbnz w0, #3
 
 then:
   call void @t()


        


More information about the llvm-commits mailing list