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: lui a0, 95
11 ; CHECK-NEXT: addiw a0, a0, 1505
12 ; CHECK-NEXT: slli a0, a0, 13
13 ; CHECK-NEXT: addi a0, a0, 32
14 ; CHECK-NEXT: sub sp, sp, a0
15 ; CHECK-NEXT: lui a0, 781250
16 ; CHECK-NEXT: addiw a0, a0, 24
17 ; CHECK-NEXT: add a0, sp, a0
18 ; CHECK-NEXT: sd ra, 0(a0)
19 ; CHECK-NEXT: addi a0, sp, 16
20 ; CHECK-NEXT: call baz
21 ; CHECK-NEXT: lui a0, 781250
22 ; CHECK-NEXT: addiw a0, a0, 24
23 ; CHECK-NEXT: add a0, sp, a0
24 ; CHECK-NEXT: ld ra, 0(a0)
25 ; CHECK-NEXT: lui a0, 95
26 ; CHECK-NEXT: addiw a0, a0, 1505
27 ; CHECK-NEXT: slli a0, a0, 13
28 ; CHECK-NEXT: addi a0, a0, 32
29 ; CHECK-NEXT: add sp, sp, a0
32 %w = alloca [100000000 x { fp128, fp128 }], align 16
33 %arraydecay = getelementptr inbounds [100000000 x { fp128, fp128 }], [100000000 x { fp128, fp128 }]* %w, i64 0, i64 0
34 call void @baz({ fp128, fp128 }* nonnull %arraydecay)
38 declare void @baz({ fp128, fp128 }*)