[clang] [CIR] Add atomic exchange operation (PR #158089)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 12 13:08:53 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");
----------------
bcardosolopes wrote:
Can't this be done with tablegen constraints? Please also add a test to cover this
https://github.com/llvm/llvm-project/pull/158089
More information about the cfe-commits
mailing list