[Mlir-commits] [mlir] [mlir][rocdl] Add IR examples to OP definitions (PR #182147)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 20 08:46:27 PST 2026


================
@@ -472,12 +617,27 @@ def ROCDL_BarrierWaitOp : ROCDL_ConcreteNonMemIntrOp<"s.barrier.wait", [], 0, [0
   Arguments<(ins I16Attr:$id)> {
   let results = (outs);
   let assemblyFormat = "`id` `=` $id attr-dict";
+  let description = [{
+    Wait on a barrier by id. Available on gfx1250+.
+
+    Example:
+    ```mlir
+    // Wait on barrier with id -1 (all barriers).
+    rocdl.s.barrier.wait id = -1
+    ```
+  }];
 }
 
 def ROCDL_BarrierSignalIsfirstOp : ROCDL_ConcreteNonMemIntrOp<"s.barrier.signal.isfirst", [], 1, [0], ["id"]>,
   Arguments<(ins I32Attr:$id)> {
   let description = [{
     Available on gfx1250+.
----------------
RattataKing wrote:

Yes you are right: https://github.com/llvm/llvm-project/blob/1d505f62ade3acbc13eb15e83953f6afcd4c2e0c/llvm/lib/Target/AMDGPU/SOPInstructions.td#L2304-L2313

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


More information about the Mlir-commits mailing list