[llvm] [AMDGPU] Set SGPR spill stack IDs when creating spill slots (PR #197628)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 23:16:48 PDT 2026


================
@@ -1949,7 +1948,8 @@ void SIInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
       FrameInfo.getObjectAlign(FrameIndex));
 
   if (RI.isSGPRClass(RC)) {
-    MFI->setHasSpilledSGPRs();
+    if (FrameInfo.getStackID(FrameIndex) == TargetStackID::SGPRSpill)
+      MFI->setHasSpilledSGPRs();
----------------
arsenm wrote:

I think this was used to detect if we will need to introduce CSR spills 

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


More information about the llvm-commits mailing list