Skip to content

Commit e1a66e0

Browse files
committed
comments
1 parent 7ada058 commit e1a66e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,8 +992,7 @@ void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
992992
// but none with memory instructions.
993993
for (const MachineOperand &Op : Inst.defs()) {
994994
if (T == LOAD_CNT || T == SAMPLE_CNT || T == BVH_CNT) {
995-
if (!Context->TRI->isVectorRegister(*Context->MRI,
996-
Op.getReg())) // TODO: add wrapper
995+
if (!TRI->isVectorRegister(*MRI, Op.getReg())) // TODO: add wrapper
997996
continue;
998997
if (updateVMCntOnly(Inst)) {
999998
// updateVMCntOnly should only leave us with VGPRs
@@ -1110,7 +1109,9 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
11101109
unsigned RelScore = RegScore - LB - 1;
11111110
if (ID < REGUNITS_END) {
11121111
OS << RelScore << ":vRU" << ID << " ";
1113-
} else if (ID >= LDSDMA_BEGIN && ID < LDSDMA_END) {
1112+
} else {
1113+
assert(ID >= LDSDMA_BEGIN && ID < LDSDMA_END &&
1114+
"Unhandled/unexpected ID value!");
11141115
OS << RelScore << ":LDSDMA" << ID << " ";
11151116
}
11161117
}

0 commit comments

Comments
 (0)