[llvm] [AMDGPU] Restore SP correctly in functions with dynamic allocas (PR #122743)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 08:58:51 PST 2025
================
@@ -1259,6 +1259,17 @@ void SIFrameLowering::emitEpilogue(MachineFunction &MF,
Register FramePtrRegScratchCopy;
Register SGPRForFPSaveRestoreCopy =
FuncInfo->getScratchSGPRCopyDstReg(FramePtrReg);
+
+ if (MFI.hasVarSizedObjects()) {
----------------
arsenm wrote:
It's any kind of dynamic stack adjustment. I think this is the same conditions as hasFP (that's what I was using in my last attempt at this)
https://github.com/llvm/llvm-project/pull/122743
More information about the llvm-commits
mailing list