[llvm] 99809f4 - [RISCV] Simplify the definitions of interrupt CSRs
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 20:20:54 PDT 2023
Author: wangpc
Date: 2023-07-11T11:20:24+08:00
New Revision: 99809f43779f0367256311ea6e4f87414fc9e896
URL: https://github.com/llvm/llvm-project/commit/99809f43779f0367256311ea6e4f87414fc9e896
DIFF: https://github.com/llvm/llvm-project/commit/99809f43779f0367256311ea6e4f87414fc9e896.diff
LOG: [RISCV] Simplify the definitions of interrupt CSRs
For `CSR_Interrupt`, we can generate the register list via a single
`sequence`.
For `CSR_XLEN_F32_Interrupt` and `CSR_XLEN_F64_Interrupt`, I don't
see the reason why we need to keep the order the same as how we used
to allocate registers (and we have changed the order in D146488), so
I fold them into one `sequence`.
There are some *.ll changes because of the order change.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D154837
Added:
Modified:
llvm/lib/Target/RISCV/RISCVCallingConv.td
llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll
llvm/test/CodeGen/RISCV/interrupt-attr.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVCallingConv.td b/llvm/lib/Target/RISCV/RISCVCallingConv.td
index 8d0cf8f0ad4e9f..130a6ecc143dd8 100644
--- a/llvm/lib/Target/RISCV/RISCVCallingConv.td
+++ b/llvm/lib/Target/RISCV/RISCVCallingConv.td
@@ -29,37 +29,12 @@ def CSR_NoRegs : CalleeSavedRegs<(add)>;
// Interrupt handler needs to save/restore all registers that are used,
// both Caller and Callee saved registers.
-def CSR_Interrupt : CalleeSavedRegs<(add X1,
- (sequence "X%u", 3, 9),
- (sequence "X%u", 10, 11),
- (sequence "X%u", 12, 17),
- (sequence "X%u", 18, 27),
- (sequence "X%u", 28, 31))>;
+def CSR_Interrupt : CalleeSavedRegs<(add X1, (sequence "X%u", 3, 31))>;
// Same as CSR_Interrupt, but including all 32-bit FP registers.
-def CSR_XLEN_F32_Interrupt: CalleeSavedRegs<(add X1,
- (sequence "X%u", 3, 9),
- (sequence "X%u", 10, 11),
- (sequence "X%u", 12, 17),
- (sequence "X%u", 18, 27),
- (sequence "X%u", 28, 31),
- (sequence "F%u_F", 0, 7),
- (sequence "F%u_F", 10, 11),
- (sequence "F%u_F", 12, 17),
- (sequence "F%u_F", 28, 31),
- (sequence "F%u_F", 8, 9),
- (sequence "F%u_F", 18, 27))>;
+def CSR_XLEN_F32_Interrupt: CalleeSavedRegs<(add CSR_Interrupt,
+ (sequence "F%u_F", 0, 31))>;
// Same as CSR_Interrupt, but including all 64-bit FP registers.
-def CSR_XLEN_F64_Interrupt: CalleeSavedRegs<(add X1,
- (sequence "X%u", 3, 9),
- (sequence "X%u", 10, 11),
- (sequence "X%u", 12, 17),
- (sequence "X%u", 18, 27),
- (sequence "X%u", 28, 31),
- (sequence "F%u_D", 0, 7),
- (sequence "F%u_D", 10, 11),
- (sequence "F%u_D", 12, 17),
- (sequence "F%u_D", 28, 31),
- (sequence "F%u_D", 8, 9),
- (sequence "F%u_D", 18, 27))>;
+def CSR_XLEN_F64_Interrupt: CalleeSavedRegs<(add CSR_Interrupt,
+ (sequence "F%u_D", 0, 31))>;
diff --git a/llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll b/llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll
index d1f00db1c23b85..7d80c34eabcbc7 100644
--- a/llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll
+++ b/llvm/test/CodeGen/RISCV/interrupt-attr-nocall.ll
@@ -437,30 +437,30 @@ define void @foo_double() nounwind #0 {
; CHECK-RV32IF-NEXT: fsw ft5, 104(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: fsw ft6, 100(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: fsw ft7, 96(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa0, 92(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa1, 88(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa2, 84(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa3, 80(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa4, 76(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa5, 72(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa6, 68(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa7, 64(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft8, 60(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft9, 56(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft10, 52(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft11, 48(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs0, 44(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs1, 40(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs2, 36(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs3, 32(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs4, 28(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs5, 24(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs6, 20(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs7, 16(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs9, 8(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs10, 4(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs11, 0(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs0, 92(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs1, 88(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa0, 84(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa1, 80(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa2, 76(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa3, 72(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa4, 68(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa5, 64(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa6, 60(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa7, 56(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs2, 52(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs3, 48(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs4, 44(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs5, 40(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs6, 36(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs7, 32(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs8, 28(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs9, 24(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs10, 20(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs11, 16(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft8, 12(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft9, 8(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft10, 4(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft11, 0(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: lui a1, %hi(h)
; CHECK-RV32IF-NEXT: lw a0, %lo(h)(a1)
; CHECK-RV32IF-NEXT: lw a1, %lo(h+4)(a1)
@@ -495,30 +495,30 @@ define void @foo_double() nounwind #0 {
; CHECK-RV32IF-NEXT: flw ft5, 104(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: flw ft6, 100(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: flw ft7, 96(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa0, 92(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa1, 88(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa2, 84(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa3, 80(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa4, 76(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa5, 72(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa6, 68(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa7, 64(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft8, 60(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft9, 56(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft10, 52(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft11, 48(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs0, 44(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs1, 40(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs2, 36(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs3, 32(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs4, 28(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs5, 24(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs6, 20(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs7, 16(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs9, 8(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs10, 4(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs11, 0(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs0, 92(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs1, 88(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa0, 84(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa1, 80(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa2, 76(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa3, 72(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa4, 68(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa5, 64(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa6, 60(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa7, 56(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs2, 52(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs3, 48(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs4, 44(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs5, 40(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs6, 36(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs7, 32(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs8, 28(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs9, 24(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs10, 20(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs11, 16(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft8, 12(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft9, 8(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft10, 4(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft11, 0(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: addi sp, sp, 192
; CHECK-RV32IF-NEXT: mret
;
@@ -630,30 +630,30 @@ define void @foo_fp_double() nounwind #1 {
; CHECK-RV32IF-NEXT: fsw ft5, 116(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: fsw ft6, 112(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: fsw ft7, 108(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa0, 104(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa1, 100(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa2, 96(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa3, 92(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa4, 88(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa5, 84(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa6, 80(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fa7, 76(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft8, 72(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft9, 68(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft10, 64(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw ft11, 60(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs0, 56(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs1, 52(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs2, 48(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs3, 44(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs4, 40(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs5, 36(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs6, 32(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs7, 28(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs8, 24(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs9, 20(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs10, 16(sp) # 4-byte Folded Spill
-; CHECK-RV32IF-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs0, 104(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs1, 100(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa0, 96(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa1, 92(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa2, 88(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa3, 84(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa4, 80(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa5, 76(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa6, 72(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fa7, 68(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs2, 64(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs3, 60(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs4, 56(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs5, 52(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs6, 48(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs7, 44(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs8, 40(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs9, 36(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs10, 32(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw fs11, 28(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft8, 24(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft9, 20(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft10, 16(sp) # 4-byte Folded Spill
+; CHECK-RV32IF-NEXT: fsw ft11, 12(sp) # 4-byte Folded Spill
; CHECK-RV32IF-NEXT: addi s0, sp, 208
; CHECK-RV32IF-NEXT: lui a1, %hi(h)
; CHECK-RV32IF-NEXT: lw a0, %lo(h)(a1)
@@ -690,30 +690,30 @@ define void @foo_fp_double() nounwind #1 {
; CHECK-RV32IF-NEXT: flw ft5, 116(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: flw ft6, 112(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: flw ft7, 108(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa0, 104(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa1, 100(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa2, 96(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa3, 92(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa4, 88(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa5, 84(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa6, 80(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fa7, 76(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft8, 72(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft9, 68(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft10, 64(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw ft11, 60(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs0, 56(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs1, 52(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs2, 48(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs3, 44(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs4, 40(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs5, 36(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs6, 32(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs7, 28(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs8, 24(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs9, 20(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs10, 16(sp) # 4-byte Folded Reload
-; CHECK-RV32IF-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs0, 104(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs1, 100(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa0, 96(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa1, 92(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa2, 88(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa3, 84(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa4, 80(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa5, 76(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa6, 72(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fa7, 68(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs2, 64(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs3, 60(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs4, 56(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs5, 52(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs6, 48(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs7, 44(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs8, 40(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs9, 36(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs10, 32(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw fs11, 28(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft8, 24(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft9, 20(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft10, 16(sp) # 4-byte Folded Reload
+; CHECK-RV32IF-NEXT: flw ft11, 12(sp) # 4-byte Folded Reload
; CHECK-RV32IF-NEXT: addi sp, sp, 208
; CHECK-RV32IF-NEXT: mret
;
diff --git a/llvm/test/CodeGen/RISCV/interrupt-attr.ll b/llvm/test/CodeGen/RISCV/interrupt-attr.ll
index eb683f01704f1a..5b269014b8f8fc 100644
--- a/llvm/test/CodeGen/RISCV/interrupt-attr.ll
+++ b/llvm/test/CodeGen/RISCV/interrupt-attr.ll
@@ -110,30 +110,30 @@ define void @foo_with_call() #1 {
; CHECK-RV32-F-NEXT: fsw ft5, 104(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: fsw ft6, 100(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: fsw ft7, 96(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa0, 92(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa1, 88(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa2, 84(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa3, 80(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa4, 76(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa5, 72(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa6, 68(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa7, 64(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft8, 60(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft9, 56(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft10, 52(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft11, 48(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs0, 44(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs1, 40(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs2, 36(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs3, 32(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs4, 28(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs5, 24(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs6, 20(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs7, 16(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs9, 8(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs10, 4(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs11, 0(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs0, 92(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs1, 88(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa0, 84(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa1, 80(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa2, 76(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa3, 72(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa4, 68(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa5, 64(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa6, 60(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa7, 56(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs2, 52(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs3, 48(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs4, 44(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs5, 40(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs6, 36(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs7, 32(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs8, 28(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs9, 24(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs10, 20(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs11, 16(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft8, 12(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft9, 8(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft10, 4(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft11, 0(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: call otherfoo at plt
; CHECK-RV32-F-NEXT: lw ra, 188(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: lw t0, 184(sp) # 4-byte Folded Reload
@@ -159,30 +159,30 @@ define void @foo_with_call() #1 {
; CHECK-RV32-F-NEXT: flw ft5, 104(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: flw ft6, 100(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: flw ft7, 96(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa0, 92(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa1, 88(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa2, 84(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa3, 80(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa4, 76(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa5, 72(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa6, 68(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa7, 64(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft8, 60(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft9, 56(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft10, 52(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft11, 48(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs0, 44(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs1, 40(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs2, 36(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs3, 32(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs4, 28(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs5, 24(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs6, 20(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs7, 16(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs9, 8(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs10, 4(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs11, 0(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs0, 92(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs1, 88(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa0, 84(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa1, 80(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa2, 76(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa3, 72(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa4, 68(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa5, 64(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa6, 60(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa7, 56(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs2, 52(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs3, 48(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs4, 44(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs5, 40(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs6, 36(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs7, 32(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs8, 28(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs9, 24(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs10, 20(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs11, 16(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft8, 12(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft9, 8(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft10, 4(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft11, 0(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: addi sp, sp, 192
; CHECK-RV32-F-NEXT: mret
;
@@ -213,30 +213,30 @@ define void @foo_with_call() #1 {
; CHECK-RV32-FD-NEXT: fsd ft5, 208(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: fsd ft6, 200(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: fsd ft7, 192(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa0, 184(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa1, 176(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa2, 168(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa3, 160(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa4, 152(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa5, 144(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa6, 136(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa7, 128(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft8, 120(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft9, 112(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft10, 104(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft11, 96(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs0, 88(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs1, 80(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs2, 72(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs3, 64(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs4, 56(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs5, 48(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs6, 40(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs7, 32(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs8, 24(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs9, 16(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs10, 8(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs11, 0(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs0, 184(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs1, 176(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa0, 168(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa1, 160(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa2, 152(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa3, 144(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa4, 136(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa5, 128(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa6, 120(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa7, 112(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs2, 104(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs3, 96(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs4, 88(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs5, 80(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs6, 72(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs7, 64(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs8, 56(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs9, 48(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs10, 40(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs11, 32(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft8, 24(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft9, 16(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft10, 8(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft11, 0(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: call otherfoo at plt
; CHECK-RV32-FD-NEXT: lw ra, 316(sp) # 4-byte Folded Reload
; CHECK-RV32-FD-NEXT: lw t0, 312(sp) # 4-byte Folded Reload
@@ -262,30 +262,30 @@ define void @foo_with_call() #1 {
; CHECK-RV32-FD-NEXT: fld ft5, 208(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: fld ft6, 200(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: fld ft7, 192(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa0, 184(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa1, 176(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa2, 168(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa3, 160(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa4, 152(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa5, 144(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa6, 136(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa7, 128(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft8, 120(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft9, 112(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft10, 104(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft11, 96(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs0, 88(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs1, 80(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs2, 72(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs3, 64(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs4, 56(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs5, 48(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs6, 40(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs7, 32(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs8, 24(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs9, 16(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs10, 8(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs11, 0(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs0, 184(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs1, 176(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa0, 168(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa1, 160(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa2, 152(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa3, 144(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa4, 136(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa5, 128(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa6, 120(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa7, 112(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs2, 104(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs3, 96(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs4, 88(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs5, 80(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs6, 72(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs7, 64(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs8, 56(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs9, 48(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs10, 40(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs11, 32(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft8, 24(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft9, 16(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft10, 8(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft11, 0(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: addi sp, sp, 320
; CHECK-RV32-FD-NEXT: mret
;
@@ -355,30 +355,30 @@ define void @foo_with_call() #1 {
; CHECK-RV64-F-NEXT: fsw ft5, 104(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: fsw ft6, 100(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: fsw ft7, 96(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa0, 92(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa1, 88(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa2, 84(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa3, 80(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa4, 76(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa5, 72(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa6, 68(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa7, 64(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft8, 60(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft9, 56(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft10, 52(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft11, 48(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs0, 44(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs1, 40(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs2, 36(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs3, 32(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs4, 28(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs5, 24(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs6, 20(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs7, 16(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs9, 8(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs10, 4(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs11, 0(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs0, 92(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs1, 88(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa0, 84(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa1, 80(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa2, 76(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa3, 72(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa4, 68(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa5, 64(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa6, 60(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa7, 56(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs2, 52(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs3, 48(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs4, 44(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs5, 40(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs6, 36(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs7, 32(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs8, 28(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs9, 24(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs10, 20(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs11, 16(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft8, 12(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft9, 8(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft10, 4(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft11, 0(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: call otherfoo at plt
; CHECK-RV64-F-NEXT: ld ra, 248(sp) # 8-byte Folded Reload
; CHECK-RV64-F-NEXT: ld t0, 240(sp) # 8-byte Folded Reload
@@ -404,30 +404,30 @@ define void @foo_with_call() #1 {
; CHECK-RV64-F-NEXT: flw ft5, 104(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: flw ft6, 100(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: flw ft7, 96(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa0, 92(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa1, 88(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa2, 84(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa3, 80(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa4, 76(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa5, 72(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa6, 68(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa7, 64(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft8, 60(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft9, 56(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft10, 52(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft11, 48(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs0, 44(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs1, 40(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs2, 36(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs3, 32(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs4, 28(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs5, 24(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs6, 20(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs7, 16(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs9, 8(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs10, 4(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs11, 0(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs0, 92(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs1, 88(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa0, 84(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa1, 80(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa2, 76(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa3, 72(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa4, 68(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa5, 64(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa6, 60(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa7, 56(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs2, 52(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs3, 48(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs4, 44(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs5, 40(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs6, 36(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs7, 32(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs8, 28(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs9, 24(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs10, 20(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs11, 16(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft8, 12(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft9, 8(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft10, 4(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft11, 0(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: addi sp, sp, 256
; CHECK-RV64-F-NEXT: mret
;
@@ -458,30 +458,30 @@ define void @foo_with_call() #1 {
; CHECK-RV64-FD-NEXT: fsd ft5, 208(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: fsd ft6, 200(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: fsd ft7, 192(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa0, 184(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa1, 176(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa2, 168(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa3, 160(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa4, 152(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa5, 144(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa6, 136(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa7, 128(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft8, 120(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft9, 112(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft10, 104(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft11, 96(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs0, 88(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs1, 80(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs2, 72(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs3, 64(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs4, 56(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs5, 48(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs6, 40(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs7, 32(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs8, 24(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs9, 16(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs10, 8(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs11, 0(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs0, 184(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs1, 176(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa0, 168(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa1, 160(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa2, 152(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa3, 144(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa4, 136(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa5, 128(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa6, 120(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa7, 112(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs2, 104(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs3, 96(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs4, 88(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs5, 80(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs6, 72(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs7, 64(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs8, 56(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs9, 48(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs10, 40(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs11, 32(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft8, 24(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft9, 16(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft10, 8(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft11, 0(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: call otherfoo at plt
; CHECK-RV64-FD-NEXT: ld ra, 376(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: ld t0, 368(sp) # 8-byte Folded Reload
@@ -507,30 +507,30 @@ define void @foo_with_call() #1 {
; CHECK-RV64-FD-NEXT: fld ft5, 208(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: fld ft6, 200(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: fld ft7, 192(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa0, 184(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa1, 176(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa2, 168(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa3, 160(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa4, 152(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa5, 144(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa6, 136(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa7, 128(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft8, 120(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft9, 112(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft10, 104(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft11, 96(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs0, 88(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs1, 80(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs2, 72(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs3, 64(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs4, 56(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs5, 48(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs6, 40(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs7, 32(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs8, 24(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs9, 16(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs10, 8(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs11, 0(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs0, 184(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs1, 176(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa0, 168(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa1, 160(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa2, 152(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa3, 144(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa4, 136(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa5, 128(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa6, 120(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa7, 112(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs2, 104(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs3, 96(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs4, 88(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs5, 80(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs6, 72(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs7, 64(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs8, 56(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs9, 48(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs10, 40(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs11, 32(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft8, 24(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft9, 16(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft10, 8(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft11, 0(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: addi sp, sp, 384
; CHECK-RV64-FD-NEXT: mret
%call = call i32 @otherfoo()
@@ -612,30 +612,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV32-F-NEXT: fsw ft5, 116(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: fsw ft6, 112(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: fsw ft7, 108(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa0, 104(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa1, 100(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa2, 96(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa3, 92(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa4, 88(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa5, 84(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa6, 80(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fa7, 76(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft8, 72(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft9, 68(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft10, 64(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw ft11, 60(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs0, 56(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs1, 52(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs2, 48(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs3, 44(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs4, 40(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs5, 36(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs6, 32(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs7, 28(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs8, 24(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs9, 20(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs10, 16(sp) # 4-byte Folded Spill
-; CHECK-RV32-F-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs0, 104(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs1, 100(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa0, 96(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa1, 92(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa2, 88(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa3, 84(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa4, 80(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa5, 76(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa6, 72(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fa7, 68(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs2, 64(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs3, 60(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs4, 56(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs5, 52(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs6, 48(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs7, 44(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs8, 40(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs9, 36(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs10, 32(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw fs11, 28(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft8, 24(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft9, 20(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft10, 16(sp) # 4-byte Folded Spill
+; CHECK-RV32-F-NEXT: fsw ft11, 12(sp) # 4-byte Folded Spill
; CHECK-RV32-F-NEXT: addi s0, sp, 208
; CHECK-RV32-F-NEXT: call otherfoo at plt
; CHECK-RV32-F-NEXT: lw ra, 204(sp) # 4-byte Folded Reload
@@ -663,30 +663,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV32-F-NEXT: flw ft5, 116(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: flw ft6, 112(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: flw ft7, 108(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa0, 104(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa1, 100(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa2, 96(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa3, 92(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa4, 88(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa5, 84(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa6, 80(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fa7, 76(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft8, 72(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft9, 68(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft10, 64(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw ft11, 60(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs0, 56(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs1, 52(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs2, 48(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs3, 44(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs4, 40(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs5, 36(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs6, 32(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs7, 28(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs8, 24(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs9, 20(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs10, 16(sp) # 4-byte Folded Reload
-; CHECK-RV32-F-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs0, 104(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs1, 100(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa0, 96(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa1, 92(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa2, 88(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa3, 84(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa4, 80(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa5, 76(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa6, 72(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fa7, 68(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs2, 64(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs3, 60(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs4, 56(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs5, 52(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs6, 48(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs7, 44(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs8, 40(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs9, 36(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs10, 32(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw fs11, 28(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft8, 24(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft9, 20(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft10, 16(sp) # 4-byte Folded Reload
+; CHECK-RV32-F-NEXT: flw ft11, 12(sp) # 4-byte Folded Reload
; CHECK-RV32-F-NEXT: addi sp, sp, 208
; CHECK-RV32-F-NEXT: mret
;
@@ -718,30 +718,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV32-FD-NEXT: fsd ft5, 216(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: fsd ft6, 208(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: fsd ft7, 200(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa0, 192(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa1, 184(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa2, 176(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa3, 168(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa4, 160(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa5, 152(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa6, 144(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fa7, 136(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft8, 128(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft9, 120(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft10, 112(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd ft11, 104(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs0, 96(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs1, 88(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs2, 80(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs3, 72(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs4, 64(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs5, 56(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs6, 48(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs7, 40(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs8, 32(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs9, 24(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs10, 16(sp) # 8-byte Folded Spill
-; CHECK-RV32-FD-NEXT: fsd fs11, 8(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs0, 192(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs1, 184(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa0, 176(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa1, 168(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa2, 160(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa3, 152(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa4, 144(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa5, 136(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa6, 128(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fa7, 120(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs2, 112(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs3, 104(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs4, 96(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs5, 88(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs6, 80(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs7, 72(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs8, 64(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs9, 56(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs10, 48(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd fs11, 40(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft8, 32(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft9, 24(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft10, 16(sp) # 8-byte Folded Spill
+; CHECK-RV32-FD-NEXT: fsd ft11, 8(sp) # 8-byte Folded Spill
; CHECK-RV32-FD-NEXT: addi s0, sp, 336
; CHECK-RV32-FD-NEXT: call otherfoo at plt
; CHECK-RV32-FD-NEXT: lw ra, 332(sp) # 4-byte Folded Reload
@@ -769,30 +769,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV32-FD-NEXT: fld ft5, 216(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: fld ft6, 208(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: fld ft7, 200(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa0, 192(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa1, 184(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa2, 176(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa3, 168(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa4, 160(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa5, 152(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa6, 144(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fa7, 136(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft8, 128(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft9, 120(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft10, 112(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld ft11, 104(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs0, 96(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs1, 88(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs2, 80(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs3, 72(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs4, 64(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs5, 56(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs6, 48(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs7, 40(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs8, 32(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs9, 24(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs10, 16(sp) # 8-byte Folded Reload
-; CHECK-RV32-FD-NEXT: fld fs11, 8(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs0, 192(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs1, 184(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa0, 176(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa1, 168(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa2, 160(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa3, 152(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa4, 144(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa5, 136(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa6, 128(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fa7, 120(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs2, 112(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs3, 104(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs4, 96(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs5, 88(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs6, 80(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs7, 72(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs8, 64(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs9, 56(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs10, 48(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld fs11, 40(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft8, 32(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft9, 24(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft10, 16(sp) # 8-byte Folded Reload
+; CHECK-RV32-FD-NEXT: fld ft11, 8(sp) # 8-byte Folded Reload
; CHECK-RV32-FD-NEXT: addi sp, sp, 336
; CHECK-RV32-FD-NEXT: mret
;
@@ -866,30 +866,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV64-F-NEXT: fsw ft5, 112(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: fsw ft6, 108(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: fsw ft7, 104(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa0, 100(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa1, 96(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa2, 92(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa3, 88(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa4, 84(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa5, 80(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa6, 76(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fa7, 72(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft8, 68(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft9, 64(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft10, 60(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw ft11, 56(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs0, 52(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs1, 48(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs2, 44(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs3, 40(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs4, 36(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs5, 32(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs6, 28(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs7, 24(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs8, 20(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs9, 16(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs10, 12(sp) # 4-byte Folded Spill
-; CHECK-RV64-F-NEXT: fsw fs11, 8(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs0, 100(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs1, 96(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa0, 92(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa1, 88(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa2, 84(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa3, 80(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa4, 76(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa5, 72(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa6, 68(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fa7, 64(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs2, 60(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs3, 56(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs4, 52(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs5, 48(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs6, 44(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs7, 40(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs8, 36(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs9, 32(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs10, 28(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw fs11, 24(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft8, 20(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft9, 16(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft10, 12(sp) # 4-byte Folded Spill
+; CHECK-RV64-F-NEXT: fsw ft11, 8(sp) # 4-byte Folded Spill
; CHECK-RV64-F-NEXT: addi s0, sp, 272
; CHECK-RV64-F-NEXT: call otherfoo at plt
; CHECK-RV64-F-NEXT: ld ra, 264(sp) # 8-byte Folded Reload
@@ -917,30 +917,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV64-F-NEXT: flw ft5, 112(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: flw ft6, 108(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: flw ft7, 104(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa0, 100(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa1, 96(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa2, 92(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa3, 88(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa4, 84(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa5, 80(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa6, 76(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fa7, 72(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft8, 68(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft9, 64(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft10, 60(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw ft11, 56(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs0, 52(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs1, 48(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs2, 44(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs3, 40(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs4, 36(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs5, 32(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs6, 28(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs7, 24(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs8, 20(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs9, 16(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs10, 12(sp) # 4-byte Folded Reload
-; CHECK-RV64-F-NEXT: flw fs11, 8(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs0, 100(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs1, 96(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa0, 92(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa1, 88(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa2, 84(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa3, 80(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa4, 76(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa5, 72(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa6, 68(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fa7, 64(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs2, 60(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs3, 56(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs4, 52(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs5, 48(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs6, 44(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs7, 40(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs8, 36(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs9, 32(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs10, 28(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw fs11, 24(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft8, 20(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft9, 16(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft10, 12(sp) # 4-byte Folded Reload
+; CHECK-RV64-F-NEXT: flw ft11, 8(sp) # 4-byte Folded Reload
; CHECK-RV64-F-NEXT: addi sp, sp, 272
; CHECK-RV64-F-NEXT: mret
;
@@ -972,30 +972,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV64-FD-NEXT: fsd ft5, 216(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: fsd ft6, 208(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: fsd ft7, 200(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa0, 192(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa1, 184(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa2, 176(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa3, 168(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa4, 160(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa5, 152(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa6, 144(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fa7, 136(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft8, 128(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft9, 120(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft10, 112(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd ft11, 104(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs0, 96(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs1, 88(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs2, 80(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs3, 72(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs4, 64(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs5, 56(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs6, 48(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs7, 40(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs8, 32(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs9, 24(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs10, 16(sp) # 8-byte Folded Spill
-; CHECK-RV64-FD-NEXT: fsd fs11, 8(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs0, 192(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs1, 184(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa0, 176(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa1, 168(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa2, 160(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa3, 152(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa4, 144(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa5, 136(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa6, 128(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fa7, 120(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs2, 112(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs3, 104(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs4, 96(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs5, 88(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs6, 80(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs7, 72(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs8, 64(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs9, 56(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs10, 48(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd fs11, 40(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft8, 32(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft9, 24(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft10, 16(sp) # 8-byte Folded Spill
+; CHECK-RV64-FD-NEXT: fsd ft11, 8(sp) # 8-byte Folded Spill
; CHECK-RV64-FD-NEXT: addi s0, sp, 400
; CHECK-RV64-FD-NEXT: call otherfoo at plt
; CHECK-RV64-FD-NEXT: ld ra, 392(sp) # 8-byte Folded Reload
@@ -1023,30 +1023,30 @@ define void @foo_fp_with_call() #2 {
; CHECK-RV64-FD-NEXT: fld ft5, 216(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: fld ft6, 208(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: fld ft7, 200(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa0, 192(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa1, 184(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa2, 176(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa3, 168(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa4, 160(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa5, 152(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa6, 144(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fa7, 136(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft8, 128(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft9, 120(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft10, 112(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld ft11, 104(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs0, 96(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs1, 88(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs2, 80(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs3, 72(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs4, 64(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs5, 56(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs6, 48(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs7, 40(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs8, 32(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs9, 24(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs10, 16(sp) # 8-byte Folded Reload
-; CHECK-RV64-FD-NEXT: fld fs11, 8(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs0, 192(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs1, 184(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa0, 176(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa1, 168(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa2, 160(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa3, 152(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa4, 144(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa5, 136(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa6, 128(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fa7, 120(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs2, 112(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs3, 104(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs4, 96(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs5, 88(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs6, 80(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs7, 72(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs8, 64(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs9, 56(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs10, 48(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld fs11, 40(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft8, 32(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft9, 24(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft10, 16(sp) # 8-byte Folded Reload
+; CHECK-RV64-FD-NEXT: fld ft11, 8(sp) # 8-byte Folded Reload
; CHECK-RV64-FD-NEXT: addi sp, sp, 400
; CHECK-RV64-FD-NEXT: mret
%call = call i32 @otherfoo()
More information about the llvm-commits
mailing list