1 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple=aarch64 -frame-pointer=non-leaf < %s | FileCheck %s --check-prefix=NOOMIT
2 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple=aarch64 -frame-pointer=none < %s | FileCheck %s --check-prefix=OMITFP
4 define void @_Z1giii(i32 %x, i32 %y, i32 %z) minsize {
5 ; NOOMIT-LABEL: _Z1giii:
6 ; NOOMIT: // %bb.0: // %entry
7 ; NOOMIT-NEXT: b _Z1hiii
9 ; OMITFP-LABEL: _Z1giii:
10 ; OMITFP: // %bb.0: // %entry
11 ; OMITFP-NEXT: b _Z1hiii
13 tail call void @_Z1hiii(i32 %x, i32 %y, i32 %z)
17 declare void @_Z1hiii(i32, i32, i32) minsize
19 define void @_Z2f1v() minsize {
20 ; NOOMIT-LABEL: _Z2f1v:
21 ; NOOMIT: // %bb.0: // %entry
22 ; NOOMIT-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
23 ; NOOMIT-NEXT: mov x29, sp
24 ; NOOMIT-NEXT: .cfi_def_cfa w29, 16
25 ; NOOMIT-NEXT: .cfi_offset w30, -8
26 ; NOOMIT-NEXT: .cfi_offset w29, -16
27 ; NOOMIT-NEXT: bl OUTLINED_FUNCTION_0
28 ; NOOMIT-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload
29 ; NOOMIT-NEXT: b _Z1giii
31 ; OMITFP-LABEL: _Z2f1v:
32 ; OMITFP: // %bb.0: // %entry
33 ; OMITFP-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
34 ; OMITFP-NEXT: .cfi_def_cfa_offset 16
35 ; OMITFP-NEXT: .cfi_offset w30, -16
36 ; OMITFP-NEXT: bl OUTLINED_FUNCTION_0
37 ; OMITFP-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
38 ; OMITFP-NEXT: b _Z1giii
40 tail call void @_Z1giii(i32 1, i32 2, i32 3)
41 tail call void @_Z1giii(i32 1, i32 2, i32 3)
45 define void @_Z2f2v() minsize {
46 ; NOOMIT-LABEL: _Z2f2v:
47 ; NOOMIT: // %bb.0: // %entry
48 ; NOOMIT-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
49 ; NOOMIT-NEXT: mov x29, sp
50 ; NOOMIT-NEXT: .cfi_def_cfa w29, 16
51 ; NOOMIT-NEXT: .cfi_offset w30, -8
52 ; NOOMIT-NEXT: .cfi_offset w29, -16
53 ; NOOMIT-NEXT: bl OUTLINED_FUNCTION_0
54 ; NOOMIT-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload
55 ; NOOMIT-NEXT: b _Z1giii
57 ; OMITFP-LABEL: _Z2f2v:
58 ; OMITFP: // %bb.0: // %entry
59 ; OMITFP-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
60 ; OMITFP-NEXT: .cfi_def_cfa_offset 16
61 ; OMITFP-NEXT: .cfi_offset w30, -16
62 ; OMITFP-NEXT: bl OUTLINED_FUNCTION_0
63 ; OMITFP-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
64 ; OMITFP-NEXT: b _Z1giii
66 tail call void @_Z1giii(i32 1, i32 2, i32 3)
67 tail call void @_Z1giii(i32 1, i32 2, i32 3)
71 ; OMITFP-LABEL: OUTLINED_FUNCTION_0:
72 ; OMITFP: .cfi_startproc
73 ; OMITFP-NEXT: // %bb.0:
74 ; OMITFP-NEXT: .cfi_def_cfa_offset 16
75 ; OMITFP-NEXT: .cfi_offset w30, -16
76 ; OMITFP-NEXT: str x30, [sp, #-16]!
77 ; OMITFP-NEXT: mov w0, #1
78 ; OMITFP-NEXT: mov w1, #2
79 ; OMITFP-NEXT: mov w2, #3
80 ; OMITFP-NEXT: bl _Z1giii
81 ; OMITFP-NEXT: mov w0, #1
82 ; OMITFP-NEXT: mov w1, #2
83 ; OMITFP-NEXT: mov w2, #3
84 ; OMITFP-NEXT: ldr x30, [sp], #16
87 ; NOOMIT-LABEL: OUTLINED_FUNCTION_0:
88 ; NOOMIT: .cfi_startproc
89 ; NOOMIT-NEXT: // %bb.0:
90 ; NOOMIT-NEXT: .cfi_def_cfa_offset 16
91 ; NOOMIT-NEXT: .cfi_offset w30, -16
92 ; NOOMIT-NEXT: str x30, [sp, #-16]!
93 ; NOOMIT-NEXT: mov w0, #1
94 ; NOOMIT-NEXT: mov w1, #2
95 ; NOOMIT-NEXT: mov w2, #3
96 ; NOOMIT-NEXT: bl _Z1giii
97 ; NOOMIT-NEXT: mov w0, #1
98 ; NOOMIT-NEXT: mov w1, #2
99 ; NOOMIT-NEXT: mov w2, #3
100 ; NOOMIT-NEXT: ldr x30, [sp], #16