[Mlir-commits] [mlir] [mlir][SPIR-V] Verify memory semantics for AtomicLoad/Store/Exchange/CompareExchange ops (PR #212990)
Igor Wodiany
llvmlistbot at llvm.org
Tue Sep 22 02:51:44 PDT 2026
================
@@ -73,6 +73,14 @@ func.func @atomic_compare_exchange(%ptr: !spirv.ptr<i64, Workgroup>, %value: i32
// -----
+func.func @atomic_compare_exchange(%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.AtomicCompareExchange <Workgroup> <Acquire|Release> <None> %ptr, %value, %comparator: !spirv.ptr<i32, Workgroup>
----------------
IgWod wrote:
Can you please add a test for Unequal as well, so both checks in the verifier are tested?
https://github.com/llvm/llvm-project/pull/212990
More information about the Mlir-commits
mailing list