[clang] [CIR] Add atomic exchange operation (PR #158089)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 15 06:57:51 PDT 2025


================
@@ -2730,6 +2730,16 @@ mlir::LogicalResult cir::ThrowOp::verify() {
   return failure();
 }
 
+//===----------------------------------------------------------------------===//
+// AtomicXchg
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::AtomicXchg::verify() {
+  if (getPtr().getType().getPointee() != getVal().getType())
+    return emitOpError("ptr type and val type must match");
----------------
Lancern wrote:

I just know this is doable in TableGen. Removed the verifier.

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


More information about the cfe-commits mailing list