Skip to content

[RISC-V] Fix incorrect epilogue_begin #120623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,7 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF,

auto FirstFrameSetup = MBBI;

// Since spillCalleeSavedRegisters may have inserted a libcall, skip past
// any instructions marked as FrameSetup
// Skip past all callee-saved register spill instructions.
while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup))
++MBBI;

Expand All @@ -820,6 +819,12 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF,

const auto &CSI = MFI.getCalleeSavedInfo();

// Skip to before the spills of scalar callee-saved registers
// FIXME: assumes exactly one instruction is used to restore each
// callee-saved register.
MBBI = std::prev(MBBI, getRVVCalleeSavedInfo(MF, CSI).size() +
getUnmanagedCSI(MF, CSI).size());

// If libcalls are used to spill and restore callee-saved registers, the frame
// has two sections; the opaque section managed by the libcalls, and the
// section managed by MachineFrameInfo which can also hold callee saved
Expand Down Expand Up @@ -1076,8 +1081,7 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF,

MBBI = MBB.getFirstTerminator();

// If callee-saved registers are saved via libcall, place stack adjustment
// before this call.
// Skip to before the restores of all callee-saved registers.
while (MBBI != MBB.begin() &&
std::prev(MBBI)->getFlag(MachineInstr::FrameDestroy))
--MBBI;
Expand All @@ -1088,7 +1092,8 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF,
// Skip to before the restores of scalar callee-saved registers
// FIXME: assumes exactly one instruction is used to restore each
// callee-saved register.
auto LastFrameDestroy = std::prev(MBBI, getUnmanagedCSI(MF, CSI).size());
auto FirstScalarCSRRestoreInsn =
std::next(MBBI, getRVVCalleeSavedInfo(MF, CSI).size());

uint64_t FirstSPAdjustAmount = getFirstSPAdjustAmount(MF);
uint64_t RealStackSize = FirstSPAdjustAmount ? FirstSPAdjustAmount
Expand All @@ -1105,20 +1110,20 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF,
// If RestoreSPFromFP the stack pointer will be restored using the frame
// pointer value.
if (!RestoreSPFromFP)
RI->adjustReg(MBB, LastFrameDestroy, DL, SPReg, SPReg,
RI->adjustReg(MBB, FirstScalarCSRRestoreInsn, DL, SPReg, SPReg,
StackOffset::getScalable(RVVStackSize),
MachineInstr::FrameDestroy, getStackAlign());

if (!hasFP(MF)) {
unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfa(
nullptr, RI->getDwarfRegNum(SPReg, true), RealStackSize));
BuildMI(MBB, LastFrameDestroy, DL,
BuildMI(MBB, FirstScalarCSRRestoreInsn, DL,
TII->get(TargetOpcode::CFI_INSTRUCTION))
.addCFIIndex(CFIIndex)
.setMIFlag(MachineInstr::FrameDestroy);
}

emitCalleeSavedRVVEpilogCFI(MBB, LastFrameDestroy);
emitCalleeSavedRVVEpilogCFI(MBB, FirstScalarCSRRestoreInsn);
}

if (FirstSPAdjustAmount) {
Expand All @@ -1130,14 +1135,14 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF,
// If RestoreSPFromFP the stack pointer will be restored using the frame
// pointer value.
if (!RestoreSPFromFP)
RI->adjustReg(MBB, LastFrameDestroy, DL, SPReg, SPReg,
RI->adjustReg(MBB, FirstScalarCSRRestoreInsn, DL, SPReg, SPReg,
StackOffset::getFixed(SecondSPAdjustAmount),
MachineInstr::FrameDestroy, getStackAlign());

if (!hasFP(MF)) {
unsigned CFIIndex = MF.addFrameInst(
MCCFIInstruction::cfiDefCfaOffset(nullptr, FirstSPAdjustAmount));
BuildMI(MBB, LastFrameDestroy, DL,
BuildMI(MBB, FirstScalarCSRRestoreInsn, DL,
TII->get(TargetOpcode::CFI_INSTRUCTION))
.addCFIIndex(CFIIndex)
.setMIFlag(MachineInstr::FrameDestroy);
Expand All @@ -1156,19 +1161,25 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF,
// have vector objects in stack.
if (RestoreSPFromFP) {
assert(hasFP(MF) && "frame pointer should not have been eliminated");
RI->adjustReg(MBB, LastFrameDestroy, DL, SPReg, FPReg,
RI->adjustReg(MBB, FirstScalarCSRRestoreInsn, DL, SPReg, FPReg,
StackOffset::getFixed(-FPOffset), MachineInstr::FrameDestroy,
getStackAlign());
}

if (hasFP(MF)) {
unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfa(
nullptr, RI->getDwarfRegNum(SPReg, true), RealStackSize));
BuildMI(MBB, LastFrameDestroy, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
BuildMI(MBB, FirstScalarCSRRestoreInsn, DL,
TII->get(TargetOpcode::CFI_INSTRUCTION))
.addCFIIndex(CFIIndex)
.setMIFlag(MachineInstr::FrameDestroy);
}

// Skip to after the restores of scalar callee-saved registers
// FIXME: assumes exactly one instruction is used to restore each
// callee-saved register.
MBBI = std::next(FirstScalarCSRRestoreInsn, getUnmanagedCSI(MF, CSI).size());

if (getLibCallID(MF, CSI) != -1) {
// tail __riscv_restore_[0-12] instruction is considered as a terminator,
// therefor it is unnecessary to place any CFI instructions after it. Just
Expand Down Expand Up @@ -1898,7 +1909,8 @@ bool RISCVFrameLowering::spillCalleeSavedRegisters(
Register Reg = CS.getReg();
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg);
TII.storeRegToStackSlot(MBB, MI, Reg, !MBB.isLiveIn(Reg),
CS.getFrameIdx(), RC, TRI, Register());
CS.getFrameIdx(), RC, TRI, Register(),
MachineInstr::FrameSetup);
}
};
storeRegsToStackSlots(UnmanagedCSI);
Expand Down Expand Up @@ -2009,7 +2021,7 @@ bool RISCVFrameLowering::restoreCalleeSavedRegisters(
Register Reg = CS.getReg();
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg);
TII.loadRegFromStackSlot(MBB, MI, Reg, CS.getFrameIdx(), RC, TRI,
Register());
Register(), MachineInstr::FrameDestroy);
assert(MI != MBB.begin() &&
"loadRegFromStackSlot didn't insert any code!");
}
Expand Down
18 changes: 12 additions & 6 deletions llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ void RISCVInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
BuildMI(MBB, I, DebugLoc(), get(Opcode))
.addReg(SrcReg, getKillRegState(IsKill))
.addFrameIndex(FI)
.addMemOperand(MMO);
.addMemOperand(MMO)
.setMIFlag(Flags);
} else {
MachineMemOperand *MMO = MF->getMachineMemOperand(
MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOStore,
Expand All @@ -660,7 +661,8 @@ void RISCVInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
.addReg(SrcReg, getKillRegState(IsKill))
.addFrameIndex(FI)
.addImm(0)
.addMemOperand(MMO);
.addMemOperand(MMO)
.setMIFlag(Flags);
}
}

Expand All @@ -670,6 +672,8 @@ void RISCVInstrInfo::loadRegFromStackSlot(
Register VReg, MachineInstr::MIFlag Flags) const {
MachineFunction *MF = MBB.getParent();
MachineFrameInfo &MFI = MF->getFrameInfo();
DebugLoc DL =
Flags & MachineInstr::FrameDestroy ? MBB.findDebugLoc(I) : DebugLoc();

unsigned Opcode;
bool IsScalableVector = true;
Expand Down Expand Up @@ -734,18 +738,20 @@ void RISCVInstrInfo::loadRegFromStackSlot(
LocationSize::beforeOrAfterPointer(), MFI.getObjectAlign(FI));

MFI.setStackID(FI, TargetStackID::ScalableVector);
BuildMI(MBB, I, DebugLoc(), get(Opcode), DstReg)
BuildMI(MBB, I, DL, get(Opcode), DstReg)
.addFrameIndex(FI)
.addMemOperand(MMO);
.addMemOperand(MMO)
.setMIFlag(Flags);
} else {
MachineMemOperand *MMO = MF->getMachineMemOperand(
MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOLoad,
MFI.getObjectSize(FI), MFI.getObjectAlign(FI));

BuildMI(MBB, I, DebugLoc(), get(Opcode), DstReg)
BuildMI(MBB, I, DL, get(Opcode), DstReg)
.addFrameIndex(FI)
.addImm(0)
.addMemOperand(MMO);
.addMemOperand(MMO)
.setMIFlag(Flags);
}
}

Expand Down
47 changes: 47 additions & 0 deletions llvm/test/CodeGen/RISCV/debug-line.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
; RUN: llc -mtriple=riscv64 < %s | FileCheck %s

define void @foo() #0 !dbg !3 {
; CHECK-LABEL: foo:
; CHECK: .Lfunc_begin0:
; CHECK-NEXT: .file 1 "test.c"
; CHECK-NEXT: .loc 1 5 0 # test.c:5:0
; CHECK-NEXT: .cfi_startproc
; CHECK-NEXT: # %bb.0: # %entry
; CHECK-NEXT: addi sp, sp, -16
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
; CHECK-NEXT: sd s0, 0(sp) # 8-byte Folded Spill
; CHECK-NEXT: .cfi_offset ra, -8
; CHECK-NEXT: .cfi_offset s0, -16
; CHECK-NEXT: addi s0, sp, 16
; CHECK-NEXT: .cfi_def_cfa s0, 0
; CHECK-NEXT: .Ltmp0:
; CHECK-NEXT: .loc 1 6 4 prologue_end # test.c:6:4
; CHECK-NEXT: sw zero, 0(zero)
; CHECK-NEXT: .cfi_def_cfa sp, 16
; CHECK-NEXT: .loc 1 7 1 epilogue_begin # test.c:7:1
; CHECK-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
; CHECK-NEXT: ld s0, 0(sp) # 8-byte Folded Reload
; CHECK-NEXT: .cfi_restore ra
; CHECK-NEXT: .cfi_restore s0
; CHECK-NEXT: addi sp, sp, 16
; CHECK-NEXT: .cfi_def_cfa_offset 0
; CHECK-NEXT: ret
entry:
store i32 0, ptr null, align 4, !dbg !6
ret void, !dbg !7
}

attributes #0 = { "frame-pointer"="all" }

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2}

!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, emissionKind: FullDebug)
!1 = !DIFile(filename: "test.c", directory: "")
!2 = !{i32 2, !"Debug Info Version", i32 3}
!3 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 5, type: !4, scopeLine: 5, unit: !0)
!4 = !DISubroutineType(types: !5)
!5 = !{null}
!6 = !DILocation(line: 6, column: 4, scope: !3)
!7 = !DILocation(line: 7, column: 1, scope: !3)
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/RISCV/kcfi-mir.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ define void @f1(ptr noundef %x) !kcfi_type !1 {
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -16
; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
; CHECK-NEXT: SD killed $x1, $x2, 8 :: (store (s64) into %stack.0)
; CHECK-NEXT: frame-setup SD killed $x1, $x2, 8 :: (store (s64) into %stack.0)
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
; CHECK-NEXT: BUNDLE implicit-def $x6, implicit-def $x6_w, implicit-def $x6_h, implicit-def $x7, implicit-def $x7_w, implicit-def $x7_h, implicit-def $x28, implicit-def $x28_w, implicit-def $x28_h, implicit-def $x29, implicit-def $x29_w, implicit-def $x29_h, implicit-def $x30, implicit-def $x30_w, implicit-def $x30_h, implicit-def $x31, implicit-def $x31_w, implicit-def $x31_h, implicit-def dead $x1, implicit-def $x2, implicit-def $x2_w, implicit-def $x2_h, implicit killed $x10 {
; CHECK-NEXT: KCFI_CHECK $x10, 12345678, implicit-def $x6, implicit-def $x7, implicit-def $x28, implicit-def $x29, implicit-def $x30, implicit-def $x31
; CHECK-NEXT: PseudoCALLIndirect killed $x10, csr_ilp32_lp64, implicit-def dead $x1, implicit-def $x2
; CHECK-NEXT: }
; CHECK-NEXT: $x1 = LD $x2, 8 :: (load (s64) from %stack.0)
; CHECK-NEXT: $x1 = frame-destroy LD $x2, 8 :: (load (s64) from %stack.0)
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
; CHECK-NEXT: $x2 = frame-destroy ADDI $x2, 16
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/RISCV/live-sp.mir
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -16
; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
; CHECK-NEXT: SD $x1, $x2, 8 :: (store (s64) into %stack.1)
; CHECK-NEXT: frame-setup SD $x1, $x2, 8 :: (store (s64) into %stack.1)
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
; CHECK-NEXT: SW renamable $x1, $x2, 4 :: (store (s32) into %ir.a)
; CHECK-NEXT: renamable $x11 = ADDIW killed renamable $x1, 0
; CHECK-NEXT: $x10 = COPY $x0
; CHECK-NEXT: PseudoCALL target-flags(riscv-call) @vararg, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit $x11, implicit-def $x2
; CHECK-NEXT: $x1 = LD $x2, 8 :: (load (s64) from %stack.1)
; CHECK-NEXT: $x1 = frame-destroy LD $x2, 8 :: (load (s64) from %stack.1)
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
; CHECK-NEXT: $x2 = frame-destroy ADDI $x2, 16
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION def_cfa_offset 0
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -2032
; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
; CHECK-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.3)
; CHECK-NEXT: SD killed $x8, $x2, 2016 :: (store (s64) into %stack.4)
; CHECK-NEXT: frame-setup SD killed $x1, $x2, 2024 :: (store (s64) into %stack.3)
; CHECK-NEXT: frame-setup SD killed $x8, $x2, 2016 :: (store (s64) into %stack.4)
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
; CHECK-NEXT: $x8 = frame-setup ADDI $x2, 2032
Expand All @@ -48,8 +48,8 @@ body: |
; CHECK-NEXT: VS1R_V killed renamable $v8, killed renamable $x10
; CHECK-NEXT: $x2 = frame-destroy ADDI $x8, -2032
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION def_cfa $x2, 2032
; CHECK-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.3)
; CHECK-NEXT: $x8 = LD $x2, 2016 :: (load (s64) from %stack.4)
; CHECK-NEXT: $x1 = frame-destroy LD $x2, 2024 :: (load (s64) from %stack.3)
; CHECK-NEXT: $x8 = frame-destroy LD $x2, 2016 :: (load (s64) from %stack.4)
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x8
; CHECK-NEXT: $x2 = frame-destroy ADDI $x2, 2032
Expand Down
48 changes: 24 additions & 24 deletions llvm/test/CodeGen/RISCV/rvv/emergency-slot.mir
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: $x2 = frame-setup ADDI $x2, -2032
; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
; CHECK-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.3)
; CHECK-NEXT: SD killed $x8, $x2, 2016 :: (store (s64) into %stack.4)
; CHECK-NEXT: SD killed $x18, $x2, 2008 :: (store (s64) into %stack.5)
; CHECK-NEXT: SD killed $x19, $x2, 2000 :: (store (s64) into %stack.6)
; CHECK-NEXT: SD killed $x20, $x2, 1992 :: (store (s64) into %stack.7)
; CHECK-NEXT: SD killed $x21, $x2, 1984 :: (store (s64) into %stack.8)
; CHECK-NEXT: SD killed $x22, $x2, 1976 :: (store (s64) into %stack.9)
; CHECK-NEXT: SD killed $x23, $x2, 1968 :: (store (s64) into %stack.10)
; CHECK-NEXT: SD killed $x24, $x2, 1960 :: (store (s64) into %stack.11)
; CHECK-NEXT: SD killed $x25, $x2, 1952 :: (store (s64) into %stack.12)
; CHECK-NEXT: SD killed $x26, $x2, 1944 :: (store (s64) into %stack.13)
; CHECK-NEXT: SD killed $x27, $x2, 1936 :: (store (s64) into %stack.14)
; CHECK-NEXT: frame-setup SD killed $x1, $x2, 2024 :: (store (s64) into %stack.3)
; CHECK-NEXT: frame-setup SD killed $x8, $x2, 2016 :: (store (s64) into %stack.4)
; CHECK-NEXT: frame-setup SD killed $x18, $x2, 2008 :: (store (s64) into %stack.5)
; CHECK-NEXT: frame-setup SD killed $x19, $x2, 2000 :: (store (s64) into %stack.6)
; CHECK-NEXT: frame-setup SD killed $x20, $x2, 1992 :: (store (s64) into %stack.7)
; CHECK-NEXT: frame-setup SD killed $x21, $x2, 1984 :: (store (s64) into %stack.8)
; CHECK-NEXT: frame-setup SD killed $x22, $x2, 1976 :: (store (s64) into %stack.9)
; CHECK-NEXT: frame-setup SD killed $x23, $x2, 1968 :: (store (s64) into %stack.10)
; CHECK-NEXT: frame-setup SD killed $x24, $x2, 1960 :: (store (s64) into %stack.11)
; CHECK-NEXT: frame-setup SD killed $x25, $x2, 1952 :: (store (s64) into %stack.12)
; CHECK-NEXT: frame-setup SD killed $x26, $x2, 1944 :: (store (s64) into %stack.13)
; CHECK-NEXT: frame-setup SD killed $x27, $x2, 1936 :: (store (s64) into %stack.14)
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $x18, -24
Expand Down Expand Up @@ -152,18 +152,18 @@ body: |
; CHECK-NEXT: bb.2:
; CHECK-NEXT: $x2 = frame-destroy ADDI $x8, -2032
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION def_cfa $x2, 2032
; CHECK-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.3)
; CHECK-NEXT: $x8 = LD $x2, 2016 :: (load (s64) from %stack.4)
; CHECK-NEXT: $x18 = LD $x2, 2008 :: (load (s64) from %stack.5)
; CHECK-NEXT: $x19 = LD $x2, 2000 :: (load (s64) from %stack.6)
; CHECK-NEXT: $x20 = LD $x2, 1992 :: (load (s64) from %stack.7)
; CHECK-NEXT: $x21 = LD $x2, 1984 :: (load (s64) from %stack.8)
; CHECK-NEXT: $x22 = LD $x2, 1976 :: (load (s64) from %stack.9)
; CHECK-NEXT: $x23 = LD $x2, 1968 :: (load (s64) from %stack.10)
; CHECK-NEXT: $x24 = LD $x2, 1960 :: (load (s64) from %stack.11)
; CHECK-NEXT: $x25 = LD $x2, 1952 :: (load (s64) from %stack.12)
; CHECK-NEXT: $x26 = LD $x2, 1944 :: (load (s64) from %stack.13)
; CHECK-NEXT: $x27 = LD $x2, 1936 :: (load (s64) from %stack.14)
; CHECK-NEXT: $x1 = frame-destroy LD $x2, 2024 :: (load (s64) from %stack.3)
; CHECK-NEXT: $x8 = frame-destroy LD $x2, 2016 :: (load (s64) from %stack.4)
; CHECK-NEXT: $x18 = frame-destroy LD $x2, 2008 :: (load (s64) from %stack.5)
; CHECK-NEXT: $x19 = frame-destroy LD $x2, 2000 :: (load (s64) from %stack.6)
; CHECK-NEXT: $x20 = frame-destroy LD $x2, 1992 :: (load (s64) from %stack.7)
; CHECK-NEXT: $x21 = frame-destroy LD $x2, 1984 :: (load (s64) from %stack.8)
; CHECK-NEXT: $x22 = frame-destroy LD $x2, 1976 :: (load (s64) from %stack.9)
; CHECK-NEXT: $x23 = frame-destroy LD $x2, 1968 :: (load (s64) from %stack.10)
; CHECK-NEXT: $x24 = frame-destroy LD $x2, 1960 :: (load (s64) from %stack.11)
; CHECK-NEXT: $x25 = frame-destroy LD $x2, 1952 :: (load (s64) from %stack.12)
; CHECK-NEXT: $x26 = frame-destroy LD $x2, 1944 :: (load (s64) from %stack.13)
; CHECK-NEXT: $x27 = frame-destroy LD $x2, 1936 :: (load (s64) from %stack.14)
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x1
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x8
; CHECK-NEXT: frame-destroy CFI_INSTRUCTION restore $x18
Expand Down
Loading
Loading