[llvm] [AMDGPU] Add support for GFX12 expert scheduling mode 2 (PR #170319)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 8 06:00:41 PST 2025


================
@@ -1842,6 +1992,24 @@ bool WaitcntGeneratorGFX12Plus::createNewWaitcnt(
                dbgs() << "New Instr: " << *SWaitInst << '\n');
   }
 
+  if (Wait.hasWaitDepctr()) {
+    assert(IsExpertMode);
+    unsigned Enc = AMDGPU::DepCtr::encodeFieldVmVsrc(Wait.VmVsrc, *ST);
+    Enc = AMDGPU::DepCtr::encodeFieldVaVdst(Enc, Wait.VaVdst);
+
+    if (Enc != 0xffff) {
----------------
jayfoad wrote:

This one is redundant. We have already checked `Wait.hasWaitDepctr()` which implies that there is definitely something we need to wait for. I will remove this.

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


More information about the llvm-commits mailing list