================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits