[llvm] [RISC-V] Fix incorrect epilogue_begin (PR #120623)

Venkata Ramanaiah Nalamothu via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 08:02:31 PST 2025


================
@@ -1000,20 +1005,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, LastScalarFrameDestroy, DL, SPReg, SPReg,
----------------
RamNalamothu wrote:

Thinking about it again, _FirstScalarCSRRestoreInsn_ made sense for the variable in question.

https://github.com/llvm/llvm-project/pull/120623


More information about the llvm-commits mailing list