[llvm] [AMDGPU][RegAlloc] Correct insertion of IMPLICIT_DEF in loop headers (PR #186348)

Chris Jackson via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 00:58:19 PDT 2026


================
@@ -319,6 +323,19 @@ void SILowerSGPRSpills::updateLaneVGPRDomInstr(
 
     PrevLaneVGPR = Spill.VGPR;
     auto I = LaneVGPRDomInstr.find(Spill.VGPR);
+    // If the insertion point is a loop header move it to the preheader.
+    // This ensures the IMPLICIT_DEF dominates all uses within the loop.
----------------
chrisjbris wrote:

Corrected the comment.

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


More information about the llvm-commits mailing list