[clang] [CIR][NFC] Update existing atomic ops to match assembly conventions (PR #161543)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 1 10:53:51 PDT 2025


================
@@ -4224,12 +4226,8 @@ def CIR_AtomicCmpXchg : CIR_Op<"atomic.cmpxchg", [
     Example:
 
     ```mlir
-    %old, %success = cir.atomic.cmpxchg(%ptr : !cir.ptr<!u64i>,
-                                        %expected : !u64i,
-                                        %desired : !u64i,
-                                        success = seq_cst,
-                                        failure = seq_cst) weak
-                                        : (!u64i, !cir.bool)
+    %old, %success = cir.atomic.cmpxchg weak seq_cst %ptr, %expected, %desired : !cir.ptr<!u64i> -> (!u64i, !cir.bool)
+    %old, %success = cir.atomic.cmpxchg weak success(seq_cst) failure(acquire) %ptr, %expected, %desired : !cir.ptr<!u64i> -> (!u64i, !cir.bool)
----------------
andykaylor wrote:

Can you reformat this to fit in 80 columns?

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


More information about the cfe-commits mailing list