[Mlir-commits] [mlir] [mlir][SPIR-V] Verify memory semantics for AtomicLoad/Store/Exchange/CompareExchange ops (PR #212990)

Arseniy Obolenskiy llvmlistbot at llvm.org
Thu Oct 1 01:24:21 PDT 2026


================
@@ -109,6 +117,14 @@ func.func @atomic_compare_exchange_weak(%ptr: !spirv.ptr<i64, Workgroup>, %value
 
 // -----
 
+func.func @atomic_compare_exchange_weak(%ptr: !spirv.ptr<i32, Workgroup>, %value: i32, %comparator: i32) -> i32 {
+  // expected-error @+1 {{expected at most one of these four memory constraints to be set: `Acquire`, `Release`,`AcquireRelease` or `SequentiallyConsistent`}}
+  %0 = spirv.AtomicCompareExchangeWeak <Workgroup> <Acquire|Release> <None> %ptr, %value, %comparator: !spirv.ptr<i32, Workgroup>
----------------
aobolensk wrote:

added

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


More information about the Mlir-commits mailing list