[Mlir-commits] [clang] [llvm] [mlir] [AMDGPU] Implement AsyncMark Stages (PR #220442)

Ryan Mitchell llvmlistbot at llvm.org
Fri Oct 30 00:04:40 PDT 2026


================
@@ -109,10 +116,46 @@ void AMDGPUMIRFormatter::printSWaitLoadcntDscntImm(uint64_t Imm,
     OS << AllOff;
 }
 
+void AMDGPUMIRFormatter::printAsyncStageMaskImm(int64_t Imm,
+                                                raw_ostream &OS) const {
+  if (!AMDGPU::isValidAsyncStageMask(Imm)) {
+    OS << Imm;
+    return;
+  }
+
+  OS << AsyncStageImmPrefix;
+  auto Mask = static_cast<AMDGPU::AsyncStages>(Imm);
+  // The zero mask names every stage. Spell that out rather than printing an
+  // empty list. The saturated mask means the same thing but is a different
+  // immediate, so it keeps its spelled-out list to stay round-trippable.
----------------
RyanRio wrote:

Yes 😄 

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


More information about the Mlir-commits mailing list