1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s | FileCheck %s
4 ; The test case check that RV64 could handle the stack adjustment offset exceed
7 define void @foo() nounwind {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: addi sp, sp, -2032
11 ; CHECK-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
12 ; CHECK-NEXT: lui a0, 390625
13 ; CHECK-NEXT: slli a0, a0, 1
14 ; CHECK-NEXT: addi a0, a0, -2000
15 ; CHECK-NEXT: sub sp, sp, a0
16 ; CHECK-NEXT: addi a0, sp, 16
17 ; CHECK-NEXT: call baz
18 ; CHECK-NEXT: lui a0, 390625
19 ; CHECK-NEXT: slli a0, a0, 1
20 ; CHECK-NEXT: addi a0, a0, -2000
21 ; CHECK-NEXT: add sp, sp, a0
22 ; CHECK-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
23 ; CHECK-NEXT: addi sp, sp, 2032
26 %w = alloca [100000000 x { fp128, fp128 }], align 16
27 %arraydecay = getelementptr inbounds [100000000 x { fp128, fp128 }], ptr %w, i64 0, i64 0
28 call void @baz(ptr nonnull %arraydecay)
32 declare void @baz(ptr)