[llvm] 64e3bcd - [AMDGPU] Add an assertion. NFCI.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 04:55:28 PST 2025


Author: Jay Foad
Date: 2025-12-05T12:55:09Z
New Revision: 64e3bcdd1ff18aebf32156f7bf4f89d3f320447c

URL: https://github.com/llvm/llvm-project/commit/64e3bcdd1ff18aebf32156f7bf4f89d3f320447c
DIFF: https://github.com/llvm/llvm-project/commit/64e3bcdd1ff18aebf32156f7bf4f89d3f320447c.diff

LOG: [AMDGPU] Add an assertion. NFCI.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 79c3394b2df50..028e8c116b752 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -922,6 +922,7 @@ bool WaitcntBrackets::hasPointSamplePendingVmemTypes(
 
 void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
   InstCounterType T = eventCounter(Context->WaitEventMaskForInst, E);
+  assert(T < Context->MaxCounter);
 
   unsigned UB = getScoreUB(T);
   unsigned CurrScore = UB + 1;


        


More information about the llvm-commits mailing list