[llvm] [AMDGPU] Ensure non-reserved CSR spilled regs are live-in (PR #146427)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 19:46:36 PDT 2025


================
@@ -995,6 +996,12 @@ void SIFrameLowering::emitCSRSpillStores(
         }
       };
 
+  for (const Register &Reg : make_first_range(WWMScratchRegs)) {
+    if (!MRI.isReserved(Reg)) {
+      MRI.addLiveIn(Reg);
+      MBB.addLiveIn(Reg);
+    }
----------------
arsenm wrote:

I thought all WWM registers should be reserved at this point, this is papering over not adding them to reserved? 

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


More information about the llvm-commits mailing list