[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:59:30 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:

In general we try to avoid custom printers/parser as they are harder to maintain and often error prone.

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


More information about the cfe-commits mailing list