1 ; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -filetype=obj -o - \
2 ; RUN: | llvm-objdump --no-print-imm-hex --triple=aarch64-unknown-linux-gnu --show-all-symbols -d - \
5 %struct.c = type { ptr }
7 @l = common hidden local_unnamed_addr global i32 0, align 4
9 ; CHECK-LABEL: <test1>:
12 ; CHECK-NEXT: b 0x2c <test1+0x2c>
14 ; CHECK-NEXT: mov w0, wzr
15 ; CHECK-NEXT: ldr x30, [sp], #16
17 define hidden i32 @test1() {
18 %1 = tail call i32 @g()
19 %2 = icmp eq i32 %1, 0
20 br i1 %2, label %3, label %5
23 callbr void asm sideeffect "1: nop\0A\09.quad a\0A\09b ${1:l}\0A\09.quad ${0:c}", "i,!i"(ptr null)
24 to label %4 [label %7]
30 %6 = tail call i32 @i()
33 7: ; preds = %3, %4, %5
34 %8 = phi i32 [ %6, %5 ], [ 0, %4 ], [ 0, %3 ]
38 declare dso_local i32 @g(...) local_unnamed_addr
40 declare dso_local i32 @i(...) local_unnamed_addr
42 ; CHECK-LABEL: <test2>:
43 ; CHECK: b {{.*}} <test2+0x1c>
46 ; CHECK-NEXT: b {{.*}} <test2+0x18>
47 define hidden i32 @test2() local_unnamed_addr {
48 %1 = load i32, ptr @l, align 4
49 %2 = icmp eq i32 %1, 0
50 br i1 %2, label %10, label %3
53 %4 = tail call i32 @g()
54 %5 = icmp eq i32 %4, 0
55 br i1 %5, label %6, label %7
58 callbr void asm sideeffect "1: nop\0A\09.quad b\0A\09b ${1:l}\0A\09.quad ${0:c}", "i,!i"(ptr null)
59 to label %10 [label %7]
62 %8 = tail call i32 @i()
68 10: ; preds = %7, %0, %6, %9
72 ; CHECK-LABEL: <test3>:
75 ; CHECK-NEXT: b {{.*}} <test3+0x34>
77 ; CHECK-NEXT: ldr x30, [sp], #16
79 define internal i1 @test3() {
80 %1 = tail call i32 @g()
81 %2 = icmp eq i32 %1, 0
82 br i1 %2, label %3, label %5
85 callbr void asm sideeffect "1: nop\0A\09.quad c\0A\09b ${1:l}\0A\09.quad ${0:c}", "i,!i"(ptr null)
86 to label %4 [label %8]
92 %6 = tail call i32 @i()
93 %7 = icmp ne i32 %6, 0
96 8: ; preds = %3, %4, %5
97 %9 = phi i1 [ %7, %5 ], [ false, %4 ], [ false, %3 ]