• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=aarch64-apple-darwin -aarch64-cbz-offset-bits=3 < %s | FileCheck %s
2
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]+]]
6
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]+]]
11
12; CHECK-NEXT: [[B8]]: ; %b8
13; CHECK-NEXT: ret
14
15; CHECK-NEXT: [[B2]]: ; %b2
16; CHECK: mov w{{[0-9]+}}, #93
17; CHECK: bl _extfunc
18; CHECK: cbz w{{[0-9]+}}, [[B7]]
19; CHECK-NEXT: b [[B8]]
20
21; CHECK-NEXT: [[B7]]: ; %b7
22; CHECK: mov w{{[0-9]+}}, #13
23; CHECK: b _extfunc
24
25define void @split_block_no_fallthrough(i64 %val) #0 {
26bb:
27  %c0 = icmp sgt i64 %val, -5
28  br i1 %c0, label %b3, label %b2
29
30b2:
31  %v0 = tail call i32 @extfunc(i32 93)
32  %c1 = icmp eq i32 %v0, 0
33  br i1 %c1, label %b7, label %b8
34
35b3:
36  %v1 = load volatile i32, i32* undef, align 4
37  %c2 = icmp eq i32 %v1, 0
38  br i1 %c2, label %b7, label %b8
39
40b7:
41  %tmp1 = tail call i32 @extfunc(i32 13)
42  ret void
43
44b8:
45  ret void
46}
47
48declare i32 @extfunc(i32) #0
49
50attributes #0 = { nounwind }
51