1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefixes=RV32,RV32I
4 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zba < %s \
5 ; RUN: | FileCheck %s -check-prefixes=RV32,RV32ZBA
6 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
7 ; RUN: | FileCheck %s -check-prefixes=RV64,RV64I
8 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zba < %s \
9 ; RUN: | FileCheck %s -check-prefixes=RV64,RV64ZBA
11 declare void @callee(ptr)
13 define void @frame_16b() {
14 ; RV32-LABEL: frame_16b:
16 ; RV32-NEXT: addi sp, sp, -16
17 ; RV32-NEXT: .cfi_def_cfa_offset 16
18 ; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
19 ; RV32-NEXT: .cfi_offset ra, -4
21 ; RV32-NEXT: call callee
22 ; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
23 ; RV32-NEXT: addi sp, sp, 16
26 ; RV64-LABEL: frame_16b:
28 ; RV64-NEXT: addi sp, sp, -16
29 ; RV64-NEXT: .cfi_def_cfa_offset 16
30 ; RV64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
31 ; RV64-NEXT: .cfi_offset ra, -8
33 ; RV64-NEXT: call callee
34 ; RV64-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
35 ; RV64-NEXT: addi sp, sp, 16
37 call void @callee(ptr null)
41 define void @frame_1024b() {
42 ; RV32-LABEL: frame_1024b:
44 ; RV32-NEXT: addi sp, sp, -1024
45 ; RV32-NEXT: .cfi_def_cfa_offset 1024
46 ; RV32-NEXT: sw ra, 1020(sp) # 4-byte Folded Spill
47 ; RV32-NEXT: .cfi_offset ra, -4
48 ; RV32-NEXT: addi a0, sp, 12
49 ; RV32-NEXT: call callee
50 ; RV32-NEXT: lw ra, 1020(sp) # 4-byte Folded Reload
51 ; RV32-NEXT: addi sp, sp, 1024
54 ; RV64-LABEL: frame_1024b:
56 ; RV64-NEXT: addi sp, sp, -1024
57 ; RV64-NEXT: .cfi_def_cfa_offset 1024
58 ; RV64-NEXT: sd ra, 1016(sp) # 8-byte Folded Spill
59 ; RV64-NEXT: .cfi_offset ra, -8
60 ; RV64-NEXT: addi a0, sp, 8
61 ; RV64-NEXT: call callee
62 ; RV64-NEXT: ld ra, 1016(sp) # 8-byte Folded Reload
63 ; RV64-NEXT: addi sp, sp, 1024
65 %a = alloca [1008 x i8]
66 call void @callee(ptr %a)
70 define void @frame_2048b() {
71 ; RV32-LABEL: frame_2048b:
73 ; RV32-NEXT: addi sp, sp, -2032
74 ; RV32-NEXT: .cfi_def_cfa_offset 2032
75 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
76 ; RV32-NEXT: .cfi_offset ra, -4
77 ; RV32-NEXT: addi sp, sp, -16
78 ; RV32-NEXT: .cfi_def_cfa_offset 2048
79 ; RV32-NEXT: addi a0, sp, 12
80 ; RV32-NEXT: call callee
81 ; RV32-NEXT: addi sp, sp, 16
82 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
83 ; RV32-NEXT: addi sp, sp, 2032
86 ; RV64-LABEL: frame_2048b:
88 ; RV64-NEXT: addi sp, sp, -2032
89 ; RV64-NEXT: .cfi_def_cfa_offset 2032
90 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
91 ; RV64-NEXT: .cfi_offset ra, -8
92 ; RV64-NEXT: addi sp, sp, -16
93 ; RV64-NEXT: .cfi_def_cfa_offset 2048
94 ; RV64-NEXT: addi a0, sp, 8
95 ; RV64-NEXT: call callee
96 ; RV64-NEXT: addi sp, sp, 16
97 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
98 ; RV64-NEXT: addi sp, sp, 2032
100 %a = alloca [2032 x i8]
101 call void @callee(ptr %a)
105 define void @frame_4096b() {
106 ; RV32-LABEL: frame_4096b:
108 ; RV32-NEXT: addi sp, sp, -2032
109 ; RV32-NEXT: .cfi_def_cfa_offset 2032
110 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
111 ; RV32-NEXT: .cfi_offset ra, -4
112 ; RV32-NEXT: addi sp, sp, -2048
113 ; RV32-NEXT: addi sp, sp, -16
114 ; RV32-NEXT: .cfi_def_cfa_offset 4096
115 ; RV32-NEXT: addi a0, sp, 12
116 ; RV32-NEXT: call callee
117 ; RV32-NEXT: addi sp, sp, 2032
118 ; RV32-NEXT: addi sp, sp, 32
119 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
120 ; RV32-NEXT: addi sp, sp, 2032
123 ; RV64-LABEL: frame_4096b:
125 ; RV64-NEXT: addi sp, sp, -2032
126 ; RV64-NEXT: .cfi_def_cfa_offset 2032
127 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
128 ; RV64-NEXT: .cfi_offset ra, -8
129 ; RV64-NEXT: addi sp, sp, -2048
130 ; RV64-NEXT: addi sp, sp, -16
131 ; RV64-NEXT: .cfi_def_cfa_offset 4096
132 ; RV64-NEXT: addi a0, sp, 8
133 ; RV64-NEXT: call callee
134 ; RV64-NEXT: addi sp, sp, 2032
135 ; RV64-NEXT: addi sp, sp, 32
136 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
137 ; RV64-NEXT: addi sp, sp, 2032
139 %a = alloca [4080 x i8]
140 call void @callee(ptr %a)
145 define void @frame_4kb() {
146 ; RV32-LABEL: frame_4kb:
148 ; RV32-NEXT: addi sp, sp, -2032
149 ; RV32-NEXT: .cfi_def_cfa_offset 2032
150 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
151 ; RV32-NEXT: .cfi_offset ra, -4
152 ; RV32-NEXT: lui a0, 1
153 ; RV32-NEXT: sub sp, sp, a0
154 ; RV32-NEXT: .cfi_def_cfa_offset 6128
155 ; RV32-NEXT: addi a0, sp, 12
156 ; RV32-NEXT: call callee
157 ; RV32-NEXT: lui a0, 1
158 ; RV32-NEXT: add sp, sp, a0
159 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
160 ; RV32-NEXT: addi sp, sp, 2032
163 ; RV64-LABEL: frame_4kb:
165 ; RV64-NEXT: addi sp, sp, -2032
166 ; RV64-NEXT: .cfi_def_cfa_offset 2032
167 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
168 ; RV64-NEXT: .cfi_offset ra, -8
169 ; RV64-NEXT: lui a0, 1
170 ; RV64-NEXT: sub sp, sp, a0
171 ; RV64-NEXT: .cfi_def_cfa_offset 6128
172 ; RV64-NEXT: addi a0, sp, 8
173 ; RV64-NEXT: call callee
174 ; RV64-NEXT: lui a0, 1
175 ; RV64-NEXT: add sp, sp, a0
176 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
177 ; RV64-NEXT: addi sp, sp, 2032
179 %a = alloca [6112 x i8]
180 call void @callee(ptr %a)
184 define void @frame_4kb_offset_128() {
185 ; RV32I-LABEL: frame_4kb_offset_128:
187 ; RV32I-NEXT: addi sp, sp, -2032
188 ; RV32I-NEXT: .cfi_def_cfa_offset 2032
189 ; RV32I-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
190 ; RV32I-NEXT: .cfi_offset ra, -4
191 ; RV32I-NEXT: lui a0, 1
192 ; RV32I-NEXT: addi a0, a0, 128
193 ; RV32I-NEXT: sub sp, sp, a0
194 ; RV32I-NEXT: .cfi_def_cfa_offset 6256
195 ; RV32I-NEXT: addi a0, sp, 12
196 ; RV32I-NEXT: call callee
197 ; RV32I-NEXT: lui a0, 1
198 ; RV32I-NEXT: addi a0, a0, 128
199 ; RV32I-NEXT: add sp, sp, a0
200 ; RV32I-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
201 ; RV32I-NEXT: addi sp, sp, 2032
204 ; RV32ZBA-LABEL: frame_4kb_offset_128:
206 ; RV32ZBA-NEXT: addi sp, sp, -2032
207 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 2032
208 ; RV32ZBA-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
209 ; RV32ZBA-NEXT: .cfi_offset ra, -4
210 ; RV32ZBA-NEXT: li a0, -528
211 ; RV32ZBA-NEXT: sh3add sp, a0, sp
212 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 6256
213 ; RV32ZBA-NEXT: addi a0, sp, 12
214 ; RV32ZBA-NEXT: call callee
215 ; RV32ZBA-NEXT: li a0, 528
216 ; RV32ZBA-NEXT: sh3add sp, a0, sp
217 ; RV32ZBA-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
218 ; RV32ZBA-NEXT: addi sp, sp, 2032
221 ; RV64I-LABEL: frame_4kb_offset_128:
223 ; RV64I-NEXT: addi sp, sp, -2032
224 ; RV64I-NEXT: .cfi_def_cfa_offset 2032
225 ; RV64I-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
226 ; RV64I-NEXT: .cfi_offset ra, -8
227 ; RV64I-NEXT: lui a0, 1
228 ; RV64I-NEXT: addiw a0, a0, 128
229 ; RV64I-NEXT: sub sp, sp, a0
230 ; RV64I-NEXT: .cfi_def_cfa_offset 6256
231 ; RV64I-NEXT: addi a0, sp, 8
232 ; RV64I-NEXT: call callee
233 ; RV64I-NEXT: lui a0, 1
234 ; RV64I-NEXT: addiw a0, a0, 128
235 ; RV64I-NEXT: add sp, sp, a0
236 ; RV64I-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
237 ; RV64I-NEXT: addi sp, sp, 2032
240 ; RV64ZBA-LABEL: frame_4kb_offset_128:
242 ; RV64ZBA-NEXT: addi sp, sp, -2032
243 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 2032
244 ; RV64ZBA-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
245 ; RV64ZBA-NEXT: .cfi_offset ra, -8
246 ; RV64ZBA-NEXT: li a0, -528
247 ; RV64ZBA-NEXT: sh3add sp, a0, sp
248 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 6256
249 ; RV64ZBA-NEXT: addi a0, sp, 8
250 ; RV64ZBA-NEXT: call callee
251 ; RV64ZBA-NEXT: li a0, 528
252 ; RV64ZBA-NEXT: sh3add sp, a0, sp
253 ; RV64ZBA-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
254 ; RV64ZBA-NEXT: addi sp, sp, 2032
256 %a = alloca [6240 x i8]
257 call void @callee(ptr %a)
263 define void @frame_8kb() {
264 ; RV32-LABEL: frame_8kb:
266 ; RV32-NEXT: addi sp, sp, -2032
267 ; RV32-NEXT: .cfi_def_cfa_offset 2032
268 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
269 ; RV32-NEXT: .cfi_offset ra, -4
270 ; RV32-NEXT: lui a0, 2
271 ; RV32-NEXT: sub sp, sp, a0
272 ; RV32-NEXT: .cfi_def_cfa_offset 10224
273 ; RV32-NEXT: addi a0, sp, 12
274 ; RV32-NEXT: call callee
275 ; RV32-NEXT: lui a0, 2
276 ; RV32-NEXT: add sp, sp, a0
277 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
278 ; RV32-NEXT: addi sp, sp, 2032
281 ; RV64-LABEL: frame_8kb:
283 ; RV64-NEXT: addi sp, sp, -2032
284 ; RV64-NEXT: .cfi_def_cfa_offset 2032
285 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
286 ; RV64-NEXT: .cfi_offset ra, -8
287 ; RV64-NEXT: lui a0, 2
288 ; RV64-NEXT: sub sp, sp, a0
289 ; RV64-NEXT: .cfi_def_cfa_offset 10224
290 ; RV64-NEXT: addi a0, sp, 8
291 ; RV64-NEXT: call callee
292 ; RV64-NEXT: lui a0, 2
293 ; RV64-NEXT: add sp, sp, a0
294 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
295 ; RV64-NEXT: addi sp, sp, 2032
297 %a = alloca [10208 x i8]
298 call void @callee(ptr %a)
302 define void @frame_8kb_offset_128() {
303 ; RV32I-LABEL: frame_8kb_offset_128:
305 ; RV32I-NEXT: addi sp, sp, -2032
306 ; RV32I-NEXT: .cfi_def_cfa_offset 2032
307 ; RV32I-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
308 ; RV32I-NEXT: .cfi_offset ra, -4
309 ; RV32I-NEXT: lui a0, 2
310 ; RV32I-NEXT: addi a0, a0, 128
311 ; RV32I-NEXT: sub sp, sp, a0
312 ; RV32I-NEXT: .cfi_def_cfa_offset 10352
313 ; RV32I-NEXT: addi a0, sp, 12
314 ; RV32I-NEXT: call callee
315 ; RV32I-NEXT: lui a0, 2
316 ; RV32I-NEXT: addi a0, a0, 128
317 ; RV32I-NEXT: add sp, sp, a0
318 ; RV32I-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
319 ; RV32I-NEXT: addi sp, sp, 2032
322 ; RV32ZBA-LABEL: frame_8kb_offset_128:
324 ; RV32ZBA-NEXT: addi sp, sp, -2032
325 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 2032
326 ; RV32ZBA-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
327 ; RV32ZBA-NEXT: .cfi_offset ra, -4
328 ; RV32ZBA-NEXT: li a0, -1040
329 ; RV32ZBA-NEXT: sh3add sp, a0, sp
330 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 10352
331 ; RV32ZBA-NEXT: addi a0, sp, 12
332 ; RV32ZBA-NEXT: call callee
333 ; RV32ZBA-NEXT: li a0, 1040
334 ; RV32ZBA-NEXT: sh3add sp, a0, sp
335 ; RV32ZBA-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
336 ; RV32ZBA-NEXT: addi sp, sp, 2032
339 ; RV64I-LABEL: frame_8kb_offset_128:
341 ; RV64I-NEXT: addi sp, sp, -2032
342 ; RV64I-NEXT: .cfi_def_cfa_offset 2032
343 ; RV64I-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
344 ; RV64I-NEXT: .cfi_offset ra, -8
345 ; RV64I-NEXT: lui a0, 2
346 ; RV64I-NEXT: addiw a0, a0, 128
347 ; RV64I-NEXT: sub sp, sp, a0
348 ; RV64I-NEXT: .cfi_def_cfa_offset 10352
349 ; RV64I-NEXT: addi a0, sp, 8
350 ; RV64I-NEXT: call callee
351 ; RV64I-NEXT: lui a0, 2
352 ; RV64I-NEXT: addiw a0, a0, 128
353 ; RV64I-NEXT: add sp, sp, a0
354 ; RV64I-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
355 ; RV64I-NEXT: addi sp, sp, 2032
358 ; RV64ZBA-LABEL: frame_8kb_offset_128:
360 ; RV64ZBA-NEXT: addi sp, sp, -2032
361 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 2032
362 ; RV64ZBA-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
363 ; RV64ZBA-NEXT: .cfi_offset ra, -8
364 ; RV64ZBA-NEXT: li a0, -1040
365 ; RV64ZBA-NEXT: sh3add sp, a0, sp
366 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 10352
367 ; RV64ZBA-NEXT: addi a0, sp, 8
368 ; RV64ZBA-NEXT: call callee
369 ; RV64ZBA-NEXT: li a0, 1040
370 ; RV64ZBA-NEXT: sh3add sp, a0, sp
371 ; RV64ZBA-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
372 ; RV64ZBA-NEXT: addi sp, sp, 2032
374 %a = alloca [10336 x i8]
375 call void @callee(ptr %a)
379 define void @frame_16kb_minus_80() {
380 ; RV32I-LABEL: frame_16kb_minus_80:
382 ; RV32I-NEXT: addi sp, sp, -2032
383 ; RV32I-NEXT: .cfi_def_cfa_offset 2032
384 ; RV32I-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
385 ; RV32I-NEXT: .cfi_offset ra, -4
386 ; RV32I-NEXT: lui a0, 4
387 ; RV32I-NEXT: addi a0, a0, -80
388 ; RV32I-NEXT: sub sp, sp, a0
389 ; RV32I-NEXT: .cfi_def_cfa_offset 18336
390 ; RV32I-NEXT: addi a0, sp, 12
391 ; RV32I-NEXT: call callee
392 ; RV32I-NEXT: lui a0, 4
393 ; RV32I-NEXT: addi a0, a0, -80
394 ; RV32I-NEXT: add sp, sp, a0
395 ; RV32I-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
396 ; RV32I-NEXT: addi sp, sp, 2032
399 ; RV32ZBA-LABEL: frame_16kb_minus_80:
401 ; RV32ZBA-NEXT: addi sp, sp, -2032
402 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 2032
403 ; RV32ZBA-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
404 ; RV32ZBA-NEXT: .cfi_offset ra, -4
405 ; RV32ZBA-NEXT: li a0, -2038
406 ; RV32ZBA-NEXT: sh3add sp, a0, sp
407 ; RV32ZBA-NEXT: .cfi_def_cfa_offset 18336
408 ; RV32ZBA-NEXT: addi a0, sp, 12
409 ; RV32ZBA-NEXT: call callee
410 ; RV32ZBA-NEXT: li a0, 2038
411 ; RV32ZBA-NEXT: sh3add sp, a0, sp
412 ; RV32ZBA-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
413 ; RV32ZBA-NEXT: addi sp, sp, 2032
416 ; RV64I-LABEL: frame_16kb_minus_80:
418 ; RV64I-NEXT: addi sp, sp, -2032
419 ; RV64I-NEXT: .cfi_def_cfa_offset 2032
420 ; RV64I-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
421 ; RV64I-NEXT: .cfi_offset ra, -8
422 ; RV64I-NEXT: lui a0, 4
423 ; RV64I-NEXT: addiw a0, a0, -80
424 ; RV64I-NEXT: sub sp, sp, a0
425 ; RV64I-NEXT: .cfi_def_cfa_offset 18336
426 ; RV64I-NEXT: addi a0, sp, 8
427 ; RV64I-NEXT: call callee
428 ; RV64I-NEXT: lui a0, 4
429 ; RV64I-NEXT: addiw a0, a0, -80
430 ; RV64I-NEXT: add sp, sp, a0
431 ; RV64I-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
432 ; RV64I-NEXT: addi sp, sp, 2032
435 ; RV64ZBA-LABEL: frame_16kb_minus_80:
437 ; RV64ZBA-NEXT: addi sp, sp, -2032
438 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 2032
439 ; RV64ZBA-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
440 ; RV64ZBA-NEXT: .cfi_offset ra, -8
441 ; RV64ZBA-NEXT: li a0, -2038
442 ; RV64ZBA-NEXT: sh3add sp, a0, sp
443 ; RV64ZBA-NEXT: .cfi_def_cfa_offset 18336
444 ; RV64ZBA-NEXT: addi a0, sp, 8
445 ; RV64ZBA-NEXT: call callee
446 ; RV64ZBA-NEXT: li a0, 2038
447 ; RV64ZBA-NEXT: sh3add sp, a0, sp
448 ; RV64ZBA-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
449 ; RV64ZBA-NEXT: addi sp, sp, 2032
451 %a = alloca [18320 x i8]
452 call void @callee(ptr %a)
457 define void @frame_16kb() {
458 ; RV32-LABEL: frame_16kb:
460 ; RV32-NEXT: addi sp, sp, -2032
461 ; RV32-NEXT: .cfi_def_cfa_offset 2032
462 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
463 ; RV32-NEXT: .cfi_offset ra, -4
464 ; RV32-NEXT: lui a0, 4
465 ; RV32-NEXT: sub sp, sp, a0
466 ; RV32-NEXT: .cfi_def_cfa_offset 18416
467 ; RV32-NEXT: addi a0, sp, 12
468 ; RV32-NEXT: call callee
469 ; RV32-NEXT: lui a0, 4
470 ; RV32-NEXT: add sp, sp, a0
471 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
472 ; RV32-NEXT: addi sp, sp, 2032
475 ; RV64-LABEL: frame_16kb:
477 ; RV64-NEXT: addi sp, sp, -2032
478 ; RV64-NEXT: .cfi_def_cfa_offset 2032
479 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
480 ; RV64-NEXT: .cfi_offset ra, -8
481 ; RV64-NEXT: lui a0, 4
482 ; RV64-NEXT: sub sp, sp, a0
483 ; RV64-NEXT: .cfi_def_cfa_offset 18416
484 ; RV64-NEXT: addi a0, sp, 8
485 ; RV64-NEXT: call callee
486 ; RV64-NEXT: lui a0, 4
487 ; RV64-NEXT: add sp, sp, a0
488 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
489 ; RV64-NEXT: addi sp, sp, 2032
491 %a = alloca [18400 x i8]
492 call void @callee(ptr %a)
497 define void @frame_32kb() {
498 ; RV32-LABEL: frame_32kb:
500 ; RV32-NEXT: addi sp, sp, -2032
501 ; RV32-NEXT: .cfi_def_cfa_offset 2032
502 ; RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
503 ; RV32-NEXT: .cfi_offset ra, -4
504 ; RV32-NEXT: lui a0, 8
505 ; RV32-NEXT: sub sp, sp, a0
506 ; RV32-NEXT: .cfi_def_cfa_offset 34800
507 ; RV32-NEXT: addi a0, sp, 12
508 ; RV32-NEXT: call callee
509 ; RV32-NEXT: lui a0, 8
510 ; RV32-NEXT: add sp, sp, a0
511 ; RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
512 ; RV32-NEXT: addi sp, sp, 2032
515 ; RV64-LABEL: frame_32kb:
517 ; RV64-NEXT: addi sp, sp, -2032
518 ; RV64-NEXT: .cfi_def_cfa_offset 2032
519 ; RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
520 ; RV64-NEXT: .cfi_offset ra, -8
521 ; RV64-NEXT: lui a0, 8
522 ; RV64-NEXT: sub sp, sp, a0
523 ; RV64-NEXT: .cfi_def_cfa_offset 34800
524 ; RV64-NEXT: addi a0, sp, 8
525 ; RV64-NEXT: call callee
526 ; RV64-NEXT: lui a0, 8
527 ; RV64-NEXT: add sp, sp, a0
528 ; RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
529 ; RV64-NEXT: addi sp, sp, 2032
531 %a = alloca [34784 x i8]
532 call void @callee(ptr %a)