[llvm] [AMDGPU] Preserve WWM ownership of allocated AGPRs (PR #223278)
Yaxun Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 04:06:00 PDT 2026
================
@@ -361,6 +361,23 @@ void SIMachineFunctionInfo::shiftWwmVGPRsToLowestRange(
WWMVGPRs[I] = NewReg;
WWMReservedRegs.remove(Reg);
WWMReservedRegs.insert(NewReg);
+
+ // Keep any spill slot allocated before PEI associated with the register
+ // after compaction. Rebuild the MapVector to preserve spill/restore order.
+ if (WWMSpills.contains(Reg)) {
----------------
yxsamliu wrote:
Agreed. I changed the local patch to record the renamed registers and rebuild the map once, keeping its order. This uses the existing `MapVector` API.
https://github.com/llvm/llvm-project/pull/223278
More information about the llvm-commits
mailing list