Skip to content

Commit 848e2b9

Browse files
committed
comments
1 parent b96325d commit 848e2b9

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
@@ -995,8 +995,7 @@ void WaitcntBrackets::updateByEvent(WaitEventType E, MachineInstr &Inst) {
995995
// but none with memory instructions.
996996
for (const MachineOperand &Op : Inst.defs()) {
997997
if (T == LOAD_CNT || T == SAMPLE_CNT || T == BVH_CNT) {
998-
if (!Context->TRI->isVectorRegister(*Context->MRI,
999-
Op.getReg())) // TODO: add wrapper
998+
if (!TRI->isVectorRegister(*MRI, Op.getReg())) // TODO: add wrapper
1000999
continue;
10011000
if (updateVMCntOnly(Inst)) {
10021001
// updateVMCntOnly should only leave us with VGPRs
@@ -1113,7 +1112,9 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
11131112
unsigned RelScore = RegScore - LB - 1;
11141113
if (ID < REGUNITS_END) {
11151114
OS << RelScore << ":vRU" << ID << " ";
1116-
} else if (ID >= LDSDMA_BEGIN && ID < LDSDMA_END) {
1115+
} else {
1116+
assert(ID >= LDSDMA_BEGIN && ID < LDSDMA_END &&
1117+
"Unhandled/unexpected ID value!");
11171118
OS << RelScore << ":LDSDMA" << ID << " ";
11181119
}
11191120
}

0 commit comments

Comments
 (0)