[llvm] [AMDGPU][SIInsertWaitcnts] Wait on all LDS DMA operations when no aliasing store is found (PR #170660)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 03:00:25 PST 2025
================
@@ -1086,13 +1086,17 @@ void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
}
}
}
- if (Slot || LDSDMAStores.size() == NUM_LDS_VGPRS - 1)
+ if (Slot)
break;
+ // The slot may not be valid because it can be >= NUM_LDS_VGPRS which
+ // means the scoreboard cannot track it. We still want to preserve the
+ // MI in order to check alias information, though.
LDSDMAStores.push_back(&Inst);
Slot = LDSDMAStores.size();
break;
}
- setRegScore(FIRST_LDS_VGPR + Slot, T, CurrScore);
+ if (Slot < NUM_LDS_VGPRS)
+ setRegScore(FIRST_LDS_VGPR + Slot, T, CurrScore);
if (Slot)
setRegScore(FIRST_LDS_VGPR, T, CurrScore);
----------------
Pierre-vh wrote:
I think so. Worst case we'll call `setRegScore` twice. This will be fixed in #162077
https://github.com/llvm/llvm-project/pull/170660
More information about the llvm-commits
mailing list