1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=riscv32 -x mir -run-pass=prologepilog -verify-machineinstrs < %s \
3 # RUN: | FileCheck -check-prefixes=CHECK-RV32-NO-COM %s
4 # RUN: llc -mtriple=riscv32 -mattr=+c -x mir -run-pass=prologepilog \
5 # RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK-RV32-COM %s
6 # RUN: llc -mtriple=riscv64 -x mir -run-pass=prologepilog -verify-machineinstrs < %s \
7 # RUN: | FileCheck -check-prefixes=CHECK-RV64-NO-COM %s
8 # RUN: llc -mtriple=riscv64 -mattr=+c -x mir -run-pass=prologepilog \
9 # RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK-RV64-COM %s
11 define dso_local void @_Z15stack_size_2048v() {
16 declare dso_local void @_Z6calleePi(ptr noundef)
18 define dso_local void @_Z15stack_size_4096v() {
23 define dso_local void @_Z15stack_size_8192v() {
30 name: _Z15stack_size_2048v
32 tracksRegLiveness: true
39 - { id: 0, size: 2048, alignment: 4, local-offset: -2048 }
45 ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_2048v
46 ; CHECK-RV32-NO-COM: liveins: $x1
47 ; CHECK-RV32-NO-COM-NEXT: {{ $}}
48 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
49 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
50 ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
51 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
52 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -32
53 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
54 ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
55 ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
56 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 32
57 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
58 ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
59 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
60 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
61 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
62 ; CHECK-RV32-NO-COM-NEXT: PseudoRET
64 ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_2048v
65 ; CHECK-RV32-COM: liveins: $x1
66 ; CHECK-RV32-COM-NEXT: {{ $}}
67 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
68 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
69 ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
70 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
71 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -1808
72 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
73 ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
74 ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
75 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 1808
76 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 256
77 ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
78 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
79 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
80 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
81 ; CHECK-RV32-COM-NEXT: PseudoRET
83 ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_2048v
84 ; CHECK-RV64-NO-COM: liveins: $x1
85 ; CHECK-RV64-NO-COM-NEXT: {{ $}}
86 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
87 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
88 ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
89 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
90 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -32
91 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
92 ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
93 ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
94 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 32
95 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
96 ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
97 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
98 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
99 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
100 ; CHECK-RV64-NO-COM-NEXT: PseudoRET
102 ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_2048v
103 ; CHECK-RV64-COM: liveins: $x1
104 ; CHECK-RV64-COM-NEXT: {{ $}}
105 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
106 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
107 ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
108 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
109 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -1568
110 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
111 ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
112 ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
113 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 1568
114 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 496
115 ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
116 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
117 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
118 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
119 ; CHECK-RV64-COM-NEXT: PseudoRET
120 ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
121 renamable $x10 = ADDI %stack.0, 0
122 PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
123 ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
128 name: _Z15stack_size_4096v
130 tracksRegLiveness: true
137 - { id: 0, size: 4096, alignment: 4, local-offset: -4096 }
143 ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_4096v
144 ; CHECK-RV32-NO-COM: liveins: $x1
145 ; CHECK-RV32-NO-COM-NEXT: {{ $}}
146 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
147 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
148 ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
149 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
150 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
151 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -32
152 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
153 ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
154 ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
155 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
156 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 48
157 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
158 ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
159 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
160 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
161 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
162 ; CHECK-RV32-NO-COM-NEXT: PseudoRET
164 ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_4096v
165 ; CHECK-RV32-COM: liveins: $x1
166 ; CHECK-RV32-COM-NEXT: {{ $}}
167 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
168 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
169 ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
170 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
171 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
172 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -1808
173 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
174 ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
175 ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
176 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
177 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 1824
178 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 256
179 ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
180 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
181 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
182 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
183 ; CHECK-RV32-COM-NEXT: PseudoRET
185 ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_4096v
186 ; CHECK-RV64-NO-COM: liveins: $x1
187 ; CHECK-RV64-NO-COM-NEXT: {{ $}}
188 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
189 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
190 ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
191 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
192 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
193 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -32
194 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
195 ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
196 ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
197 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
198 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 48
199 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
200 ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
201 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
202 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
203 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
204 ; CHECK-RV64-NO-COM-NEXT: PseudoRET
206 ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_4096v
207 ; CHECK-RV64-COM: liveins: $x1
208 ; CHECK-RV64-COM-NEXT: {{ $}}
209 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
210 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
211 ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
212 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
213 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
214 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -1568
215 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
216 ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
217 ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
218 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
219 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 1584
220 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 496
221 ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
222 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
223 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
224 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
225 ; CHECK-RV64-COM-NEXT: PseudoRET
226 ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
227 renamable $x10 = ADDI %stack.0, 0
228 PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
229 ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
234 name: _Z15stack_size_8192v
236 tracksRegLiveness: true
243 - { id: 0, size: 8192, alignment: 4, local-offset: -8192 }
249 ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_8192v
250 ; CHECK-RV32-NO-COM: liveins: $x1
251 ; CHECK-RV32-NO-COM-NEXT: {{ $}}
252 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
253 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
254 ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
255 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
256 ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-setup LUI 2
257 ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-setup ADDI killed $x10, -2016
258 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
259 ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
260 ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
261 ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
262 ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-destroy LUI 2
263 ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-destroy ADDI killed $x10, -2016
264 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
265 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
266 ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
267 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
268 ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
269 ; CHECK-RV32-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
270 ; CHECK-RV32-NO-COM-NEXT: PseudoRET
272 ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_8192v
273 ; CHECK-RV32-COM: liveins: $x1
274 ; CHECK-RV32-COM-NEXT: {{ $}}
275 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
276 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
277 ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
278 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
279 ; CHECK-RV32-COM-NEXT: $x10 = frame-setup LUI 2
280 ; CHECK-RV32-COM-NEXT: $x10 = frame-setup ADDI killed $x10, -240
281 ; CHECK-RV32-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
282 ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
283 ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
284 ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
285 ; CHECK-RV32-COM-NEXT: $x10 = frame-destroy LUI 2
286 ; CHECK-RV32-COM-NEXT: $x10 = frame-destroy ADDI killed $x10, -240
287 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
288 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 256
289 ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
290 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
291 ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
292 ; CHECK-RV32-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
293 ; CHECK-RV32-COM-NEXT: PseudoRET
295 ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_8192v
296 ; CHECK-RV64-NO-COM: liveins: $x1
297 ; CHECK-RV64-NO-COM-NEXT: {{ $}}
298 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
299 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
300 ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
301 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
302 ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-setup LUI 2
303 ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-setup ADDIW killed $x10, -2016
304 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
305 ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
306 ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
307 ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
308 ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-destroy LUI 2
309 ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-destroy ADDIW killed $x10, -2016
310 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
311 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 2032
312 ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
313 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
314 ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
315 ; CHECK-RV64-NO-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
316 ; CHECK-RV64-NO-COM-NEXT: PseudoRET
318 ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_8192v
319 ; CHECK-RV64-COM: liveins: $x1
320 ; CHECK-RV64-COM-NEXT: {{ $}}
321 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
322 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
323 ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
324 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
325 ; CHECK-RV64-COM-NEXT: $x10 = frame-setup LUI 2
326 ; CHECK-RV64-COM-NEXT: $x10 = frame-setup ADDIW killed $x10, -480
327 ; CHECK-RV64-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
328 ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
329 ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
330 ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
331 ; CHECK-RV64-COM-NEXT: $x10 = frame-destroy LUI 2
332 ; CHECK-RV64-COM-NEXT: $x10 = frame-destroy ADDIW killed $x10, -480
333 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
334 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 496
335 ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
336 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
337 ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
338 ; CHECK-RV64-COM-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
339 ; CHECK-RV64-COM-NEXT: PseudoRET
340 ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
341 renamable $x10 = ADDI %stack.0, 0
342 PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
343 ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2