1 # RUN: llc -mtriple=aarch64--- -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
2 # RUN: llc -mtriple=aarch64-pc-windows-msvc -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s -check-prefix=WINDOWS
4 define void @baz() #0 {
8 define void @bar(i32 %a) #0 {
12 attributes #0 = { noredzone }
17 tracksRegLiveness: true
20 liveins: $w0, $lr, $w8
21 $sp = frame-setup SUBXri $sp, 32, 0
22 $fp = frame-setup ADDXri $sp, 16, 0
25 BL @baz, implicit-def dead $lr, implicit $sp
30 BL @baz, implicit-def dead $lr, implicit $sp
35 BL @baz, implicit-def dead $lr, implicit $sp
40 BL @baz, implicit-def dead $lr, implicit $sp
47 $fp, $lr = LDPXi $sp, 2
52 tracksRegLiveness: true
55 liveins: $w0, $lr, $w8
58 # CHECK: name: OUTLINED_FUNCTION_0
60 # CHECK: liveins: $x19, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28, $d8, $d9, $d10, $d11, $d12, $d13, $d14, $d15, $lr
61 # CHECK-DAG: frame-setup CFI_INSTRUCTION def_cfa_offset 16
62 # CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $w30, -16
63 # CHECK-NEXT: early-clobber $sp = STRXpre $lr, $sp, -16
64 # CHECK-NEXT: BL @baz, implicit-def dead $lr, implicit $sp
65 # CHECK-NEXT: $w17 = ORRWri $wzr, 1
66 # CHECK-NEXT: $w17 = ORRWri $wzr, 1
67 # CHECK-NEXT: early-clobber $sp, $lr = LDRXpost $sp, 16
69 # WINDOWS-NOT: OUTLINED