[clang] [llvm] [AMDGPU] Introduce asyncmark/wait intrinsics (PR #173259)

Sameer Sahasrabuddhe via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 02:29:30 PST 2026


================
@@ -653,6 +677,11 @@ class WaitcntBrackets {
     return It != VMem.end() ? It->second.Scores[T] : 0;
   }
 
+  unsigned getClampedWait(InstCounterType T, unsigned ScoreToWait) const {
+    return std::min(getScoreUB(T) - ScoreToWait,
+                    Context->getWaitCountMax(T) - 1);
+  }
----------------
ssahasra wrote:

That function is not critical to this change. I just reverted it for now.

https://github.com/llvm/llvm-project/pull/173259


More information about the cfe-commits mailing list