Skip to content

Commit 0fde998

Browse files
committed
comments
1 parent d71b9f4 commit 0fde998

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
@@ -989,8 +989,7 @@ void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
989989
// but none with memory instructions.
990990
for (const MachineOperand &Op : Inst.defs()) {
991991
if (T == LOAD_CNT || T == SAMPLE_CNT || T == BVH_CNT) {
992-
if (!Context->TRI->isVectorRegister(*Context->MRI,
993-
Op.getReg())) // TODO: add wrapper
992+
if (!TRI->isVectorRegister(*MRI, Op.getReg())) // TODO: add wrapper
994993
continue;
995994
if (updateVMCntOnly(Inst)) {
996995
// 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)