[llvm] [AMDGPU] Insert spill codes for the SGPRs used for EXEC copy (PR #79428)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 08:28:04 PST 2024
================
@@ -1515,11 +1517,15 @@ void SIFrameLowering::determinePrologEpilogSGPRSaves(
LiveUnits.addReg(UnusedScratchReg);
} else {
// Needs spill.
- assert(!MFI->hasPrologEpilogSGPRSpillEntry(ReservedReg) &&
+ assert(!MFI->hasPrologEpilogSGPRSpillEntry(ReservedRegForExecCopy) &&
"Re-reserving spill slot for EXEC copy register");
- getVGPRSpillLaneOrTempRegister(MF, LiveUnits, ReservedReg, RC,
+ getVGPRSpillLaneOrTempRegister(MF, LiveUnits, ReservedRegForExecCopy, RC,
/*IncludeScratchCopy=*/false);
}
+ } else if (ReservedRegForExecCopy) {
+ // Reset it at this point. There are no whole-wave copies and spills
+ // encountered.
+ MFI->setSGPRForEXECCopy(AMDGPU::NoRegister);
----------------
arsenm wrote:
Does this actually happen? I thought we only reserved this after we know we need it
https://github.com/llvm/llvm-project/pull/79428
More information about the llvm-commits
mailing list