1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple aarch64-arm-linux-gnu --enable-machine-outliner -outliner-leaf-descendants=false \
3 ; RUN: -verify-machineinstrs %s -o - | FileCheck --check-prefixes CHECK,V8A %s
4 ; RUN: llc -mtriple aarch64 -enable-machine-outliner -outliner-leaf-descendants=false \
5 ; RUN: -verify-machineinstrs -mattr=+v8.3a %s -o - | \
6 ; RUN: FileCheck %s --check-prefixes CHECK,V83A
8 declare i32 @thunk_called_fn(i32, i32, i32, i32)
12 ; V8A: // %bb.0: // %entry
14 ; V8A-NEXT: .cfi_negate_ra_state
15 ; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
16 ; V8A-NEXT: .cfi_def_cfa_offset 16
17 ; V8A-NEXT: .cfi_offset w30, -16
18 ; V8A-NEXT: mov w0, #1 // =0x1
19 ; V8A-NEXT: mov w1, #2 // =0x2
20 ; V8A-NEXT: mov w2, #3 // =0x3
21 ; V8A-NEXT: mov w3, #4 // =0x4
22 ; V8A-NEXT: bl thunk_called_fn
23 ; V8A-NEXT: add w0, w0, #8
24 ; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
29 ; V83A: // %bb.0: // %entry
31 ; V83A-NEXT: .cfi_negate_ra_state
32 ; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
33 ; V83A-NEXT: .cfi_def_cfa_offset 16
34 ; V83A-NEXT: .cfi_offset w30, -16
35 ; V83A-NEXT: mov w0, #1 // =0x1
36 ; V83A-NEXT: mov w1, #2 // =0x2
37 ; V83A-NEXT: mov w2, #3 // =0x3
38 ; V83A-NEXT: mov w3, #4 // =0x4
39 ; V83A-NEXT: bl thunk_called_fn
40 ; V83A-NEXT: add w0, w0, #8
41 ; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
44 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
45 %cx = add i32 %call, 8
51 ; V8A: // %bb.0: // %entry
53 ; V8A-NEXT: .cfi_negate_ra_state
54 ; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
55 ; V8A-NEXT: .cfi_def_cfa_offset 16
56 ; V8A-NEXT: .cfi_offset w30, -16
57 ; V8A-NEXT: mov w0, #1 // =0x1
58 ; V8A-NEXT: mov w1, #2 // =0x2
59 ; V8A-NEXT: mov w2, #3 // =0x3
60 ; V8A-NEXT: mov w3, #4 // =0x4
61 ; V8A-NEXT: bl thunk_called_fn
62 ; V8A-NEXT: add w0, w0, #88
63 ; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
68 ; V83A: // %bb.0: // %entry
70 ; V83A-NEXT: .cfi_negate_ra_state
71 ; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
72 ; V83A-NEXT: .cfi_def_cfa_offset 16
73 ; V83A-NEXT: .cfi_offset w30, -16
74 ; V83A-NEXT: mov w0, #1 // =0x1
75 ; V83A-NEXT: mov w1, #2 // =0x2
76 ; V83A-NEXT: mov w2, #3 // =0x3
77 ; V83A-NEXT: mov w3, #4 // =0x4
78 ; V83A-NEXT: bl thunk_called_fn
79 ; V83A-NEXT: add w0, w0, #88
80 ; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
83 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
84 %cx = add i32 %call, 88
88 define hidden i32 @c(ptr %fptr) #0 {
90 ; V8A: // %bb.0: // %entry
92 ; V8A-NEXT: .cfi_negate_ra_state
93 ; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
94 ; V8A-NEXT: .cfi_def_cfa_offset 16
95 ; V8A-NEXT: .cfi_offset w30, -16
96 ; V8A-NEXT: mov x8, x0
97 ; V8A-NEXT: mov w0, #1 // =0x1
98 ; V8A-NEXT: mov w1, #2 // =0x2
99 ; V8A-NEXT: mov w2, #3 // =0x3
100 ; V8A-NEXT: mov w3, #4 // =0x4
102 ; V8A-NEXT: add w0, w0, #8
103 ; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
108 ; V83A: // %bb.0: // %entry
110 ; V83A-NEXT: .cfi_negate_ra_state
111 ; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
112 ; V83A-NEXT: .cfi_def_cfa_offset 16
113 ; V83A-NEXT: .cfi_offset w30, -16
114 ; V83A-NEXT: mov x8, x0
115 ; V83A-NEXT: mov w0, #1 // =0x1
116 ; V83A-NEXT: mov w1, #2 // =0x2
117 ; V83A-NEXT: mov w2, #3 // =0x3
118 ; V83A-NEXT: mov w3, #4 // =0x4
120 ; V83A-NEXT: add w0, w0, #8
121 ; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
124 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
125 %add = add nsw i32 %call, 8
129 define hidden i32 @d(ptr %fptr) #0 {
131 ; V8A: // %bb.0: // %entry
133 ; V8A-NEXT: .cfi_negate_ra_state
134 ; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
135 ; V8A-NEXT: .cfi_def_cfa_offset 16
136 ; V8A-NEXT: .cfi_offset w30, -16
137 ; V8A-NEXT: mov x8, x0
138 ; V8A-NEXT: mov w0, #1 // =0x1
139 ; V8A-NEXT: mov w1, #2 // =0x2
140 ; V8A-NEXT: mov w2, #3 // =0x3
141 ; V8A-NEXT: mov w3, #4 // =0x4
143 ; V8A-NEXT: add w0, w0, #88
144 ; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
149 ; V83A: // %bb.0: // %entry
151 ; V83A-NEXT: .cfi_negate_ra_state
152 ; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
153 ; V83A-NEXT: .cfi_def_cfa_offset 16
154 ; V83A-NEXT: .cfi_offset w30, -16
155 ; V83A-NEXT: mov x8, x0
156 ; V83A-NEXT: mov w0, #1 // =0x1
157 ; V83A-NEXT: mov w1, #2 // =0x2
158 ; V83A-NEXT: mov w2, #3 // =0x3
159 ; V83A-NEXT: mov w3, #4 // =0x4
161 ; V83A-NEXT: add w0, w0, #88
162 ; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
165 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
166 %add = add nsw i32 %call, 88
170 attributes #0 = { "sign-return-address"="non-leaf" minsize }
172 ; CHECK-NOT: OUTLINED_FUNCTION_{{.*}}
173 ; CHECK-NOT: .cfi_b_key_frame
174 ; CHECK-NOT: paci{{[a,b]}}sp
175 ; CHECK-NOT: hint #2{{[5,7]}}
176 ; CHECK-NOT: .cfi_negate_ra_state
177 ; CHECK-NOT: auti{{[a,b]}}sp
178 ; CHECK-NOT: hint #{{[29,31]}}