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

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 4 03:56:45 PDT 2025


================
@@ -4245,20 +4244,17 @@ def CIR_AtomicCmpXchg : CIR_Op<"atomic.cmpxchg", [
                        UnitAttr:$is_volatile);
 
   let assemblyFormat = [{
-    `(`
-      $ptr `:` qualified(type($ptr)) `,`
-      $expected `:` type($expected) `,`
-      $desired `:` type($desired) `,`
-      `success` `=`  $succ_order `,`
-      `failure` `=`  $fail_order
-    `)`
-    (`align` `(` $alignment^ `)`)?
     (`weak` $weak^)?
+    custom<AtomicCmpXchgMemOrder>($succ_order, $fail_order)
----------------
xlauko wrote:

does this need custom printer/parser?
why not just something like:

success ( $succ_order) failure($fail_order)


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


More information about the cfe-commits mailing list