[llvm] [AMDGPU] Fixed verifier crash because of multiple live range components. (PR #190719)
Dhruva Chakrabarti via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 08:52:40 PDT 2026
================
@@ -548,7 +548,23 @@ void AMDGPURewriteAGPRCopyMFMAImpl::eliminateSpillsOfReassignedVGPRs() const {
// replacement vreg uses.
LiveInterval &NewLI = LIS.createAndComputeVirtRegInterval(NewVReg);
VRM.grow();
+
+ // A spill slot can be stored to multiple times, so the replacement
+ // vreg may have multiple disconnected live range components. Split
+ // them into separate vregs to maintain the single-component invariant.
+ SmallVector<LiveInterval *, 4> SplitLIs;
+ LIS.splitSeparateComponents(NewLI, SplitLIs);
+
+ LLVM_DEBUG(if (!SplitLIs.empty()) dbgs()
----------------
dhruvachak wrote:
Done.
https://github.com/llvm/llvm-project/pull/190719
More information about the llvm-commits
mailing list