[llvm] [AMDGPU] Fix speculative register pressure queries (PR #208574)

Lucas Ramirez via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 02:35:41 PDT 2026


================
@@ -841,8 +847,10 @@ GCNDownwardRPTracker::bumpDownwardPressure(const MachineInstr *MI,
     // to be bottom-scheduled to avoid searching uses at each query.
     SlotIndex CurrIdx;
     const MachineBasicBlock *MBB = MI->getParent();
-    MachineBasicBlock::const_iterator IdxPos = skipDebugInstructionsForward(
-        LastTrackedMI ? LastTrackedMI : MBB->begin(), MBB->end());
+    MachineBasicBlock::const_iterator StartPos =
----------------
lucas-rami wrote:

This and the computation of `CurrIdx` can be hoisted outside the loop I think. 

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


More information about the llvm-commits mailing list