[Mlir-commits] [mlir] [mlir][SPIRV] update SPIRV Atomic Ops to assemblyFormat (PR #76323)

Jakub Kuderski llvmlistbot at llvm.org
Thu Dec 28 13:05:57 PST 2023


================
@@ -181,39 +201,42 @@ def SPIRV_AtomicCompareExchangeWeakOp : SPIRV_Op<"AtomicCompareExchangeWeak", []
     #### Example:
 
     ```mlir
-    %0 = spirv.AtomicCompareExchangeWeak "Workgroup" "Acquire" "None"
+    %0 = spirv.AtomicCompareExchangeWeak <Workgroup> <Acquire> <None>
                                        %pointer, %value, %comparator
                                        : !spirv.ptr<i32, WorkGroup>
     ```
   }];
 
   let availability = [
-    MinVersion<SPIRV_V_1_0>,
-    MaxVersion<SPIRV_V_1_3>,
-    Extension<[]>,
+    MinVersion<SPIRV_V_1_0>, MaxVersion<SPIRV_V_1_3>, Extension<[]>,
     Capability<[SPIRV_C_Kernel]>
   ];
 
-  let arguments = (ins
-    SPIRV_AnyPtr:$pointer,
-    SPIRV_ScopeAttr:$memory_scope,
-    SPIRV_MemorySemanticsAttr:$equal_semantics,
-    SPIRV_MemorySemanticsAttr:$unequal_semantics,
-    SPIRV_Integer:$value,
-    SPIRV_Integer:$comparator
-  );
-
-  let results = (outs
-    SPIRV_Integer:$result
-  );
+  let arguments = (ins SPIRV_AnyPtr
+                   : $pointer, SPIRV_ScopeAttr
+                   : $memory_scope, SPIRV_MemorySemanticsAttr
+                   : $equal_semantics, SPIRV_MemorySemanticsAttr
+                   : $unequal_semantics, SPIRV_Integer
+                   : $value, SPIRV_Integer
+                   : $comparator);
----------------
kuhar wrote:

also here

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


More information about the Mlir-commits mailing list