[Mlir-commits] [mlir] [mlir][NVVM] Add nvvm.membar operation (PR #166698)

Durgadoss R llvmlistbot at llvm.org
Thu Nov 6 10:12:25 PST 2025


================
@@ -291,6 +291,21 @@ static unsigned getUnidirectionalFenceProxyID(NVVM::ProxyKind fromProxy,
   llvm_unreachable("Unsupported proxy kinds");
 }
 
+static unsigned getMembarLevelID(NVVM::MemLevelKind level) {
+  switch (level) {
+  case NVVM::MemLevelKind::CTA: {
+    return llvm::Intrinsic::nvvm_membar_cta;
+  }
+  case NVVM::MemLevelKind::GL: {
+    return llvm::Intrinsic::nvvm_membar_gl;
+  }
+  case NVVM::MemLevelKind::SYS: {
+    return llvm::Intrinsic::nvvm_membar_sys;
+  }
----------------
durga4github wrote:

Can I request you to also add the cluster variant here?
We have the corresponding intrinsic at NVPTX named "nvvm_fence_sc_cluster"

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


More information about the Mlir-commits mailing list