[PATCH] D136677: [AMDGPU] Small cleanups in wait counter code

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 10:15:41 PDT 2022


scott.linder added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1599
         if (ST->hasReadVCCZBug() &&
-            ScoreBrackets.getScoreLB(LGKM_CNT) <
-                ScoreBrackets.getScoreUB(LGKM_CNT) &&
+            ScoreBrackets.getScoreRange(LGKM_CNT) &&
             ScoreBrackets.hasPendingEvent(SMEM_ACCESS)) {
----------------
foad wrote:
> I would have thought that hasPendingEvent(SMEM_ACCESS) implies hasPendingEvent(LGKM_CNT) - doesn't it?
+1, the redundant check for a pending `LGKM_CNT` event should be removed (or I suppose moved to an `assert` if it makes the intent wrt. the bug clearer)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136677/new/

https://reviews.llvm.org/D136677



More information about the llvm-commits mailing list