[Mlir-commits] [mlir] [MLIR][NVVM] Update nvvm.barrier.arrive Op (PR #202608)

Durgadoss R llvmlistbot at llvm.org
Tue Jun 9 06:58:13 PDT 2026


================
@@ -3443,6 +3443,21 @@ mlir::NVVM::IDArgPair NVVM::BarrierOp::getIntrinsicIDAndArgs(
   return {id, std::move(args)};
 }
 
+mlir::NVVM::IDArgPair NVVM::BarrierArriveOp::getIntrinsicIDAndArgs(
+    Operation &op, LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder) {
+  auto thisOp = cast<NVVM::BarrierArriveOp>(op);
+  llvm::Value *barrierId = thisOp.getBarrierId()
+                               ? mt.lookupValue(thisOp.getBarrierId())
+                               : builder.getInt32(0);
----------------
durga4github wrote:

nit:

can we init a local-var `numThreads` here and capture that..?
Then we dont need to explicitly create `args` smallVector below.. just return directly `{id, numThreads}`..

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


More information about the Mlir-commits mailing list