1 ; RUN: llc -mtriple=aarch64-apple-darwin -aarch64-cbz-offset-bits=3 < %s | FileCheck %s
3 ; CHECK-LABEL: _split_block_no_fallthrough:
4 ; CHECK: cmn x{{[0-9]+}}, #5
5 ; CHECK-NEXT: b.le [[B2:LBB[0-9]+_[0-9]+]]
7 ; CHECK-NEXT: ; %bb.1: ; %b3
8 ; CHECK: ldr [[LOAD:w[0-9]+]]
9 ; CHECK: cbnz [[LOAD]], [[B8:LBB[0-9]+_[0-9]+]]
10 ; CHECK-NEXT: b [[B7:LBB[0-9]+_[0-9]+]]
12 ; CHECK-NEXT: [[B8]]: ; %b8
15 ; CHECK-NEXT: [[B2]]: ; %b2
16 ; CHECK: mov w{{[0-9]+}}, #93
18 ; CHECK: cbz w{{[0-9]+}}, [[B7]]
19 ; CHECK-NEXT: b [[B8]]
21 ; CHECK-NEXT: [[B7]]: ; %b7
22 ; CHECK: mov w{{[0-9]+}}, #13
25 define void @split_block_no_fallthrough(i64 %val) #0 {
27 %c0 = icmp sgt i64 %val, -5
28 br i1 %c0, label %b3, label %b2
31 %v0 = tail call i32 @extfunc(i32 93)
32 %c1 = icmp eq i32 %v0, 0
33 br i1 %c1, label %b7, label %b8
36 %v1 = load volatile i32, i32* undef, align 4
37 %c2 = icmp eq i32 %v1, 0
38 br i1 %c2, label %b7, label %b8
41 %tmp1 = tail call i32 @extfunc(i32 13)
48 declare i32 @extfunc(i32) #0
50 attributes #0 = { nounwind }