Skip to content

Commit 4ae38b6

Browse files
author
Jun Wang
committed
Change iterator update operator from post-inc to pre-inc.
1 parent 4f4bf31 commit 4ae38b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,15 +2306,15 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF,
23062306
#endif
23072307

23082308
if (ST->isPreciseMemoryEnabled() && Inst.mayLoadOrStore()) {
2309-
Iter++;
2309+
++Iter;
23102310
if (!isWaitInstr(*Iter)) {
23112311
AMDGPU::Waitcnt Wait = WCG->getAllZeroWaitcnt(
23122312
Inst.mayStore() && !SIInstrInfo::isAtomicRet(Inst));
23132313
ScoreBrackets.simplifyWaitcnt(Wait);
23142314
Modified |= generateWaitcnt(Wait, std::next(Inst.getIterator()), Block,
23152315
ScoreBrackets, /*OldWaitcntInstr=*/nullptr);
23162316
}
2317-
Iter--;
2317+
--Iter;
23182318
}
23192319

23202320
LLVM_DEBUG({

0 commit comments

Comments
 (0)