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

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 22:11:08 PST 2025


================
@@ -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 =
----------------
mgudim wrote:

I still don't understand why you need "Scalar" in the variable name. What if we're restoring a vector register first? Is it different somehow?

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


More information about the llvm-commits mailing list