Skip to content

Commit 64e3bcd

Browse files
committed
[AMDGPU] Add an assertion. NFCI.
1 parent f827e4d commit 64e3bcd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ bool WaitcntBrackets::hasPointSamplePendingVmemTypes(
922922

923923
void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
924924
InstCounterType T = eventCounter(Context->WaitEventMaskForInst, E);
925+
assert(T < Context->MaxCounter);
925926

926927
unsigned UB = getScoreUB(T);
927928
unsigned CurrScore = UB + 1;

0 commit comments

Comments
 (0)