================ @@ -1775,6 +1775,44 @@ OpFoldResult cir::ComplexCreateOp::fold(FoldAdaptor adaptor) { return cir::ConstComplexAttr::get(realAttr, imagAttr); } +//===----------------------------------------------------------------------===// +// ComplexRealPtrOp +//===----------------------------------------------------------------------===// + +LogicalResult cir::ComplexRealPtrOp::verify() { + mlir::Type resultPointeeTy = getType().getPointee(); + cir::PointerType operandPtrTy = getOperand().getType(); + auto operandPointeeTy = + mlir::cast<cir::ComplexType>(operandPtrTy.getPointee()); + + if (resultPointeeTy != operandPointeeTy.getElementType()) { + emitOpError() + << "cir.complex.real_ptr result type does not match operand type"; + return failure(); ---------------- xlauko wrote:
```suggestion return emitOpError() << "cir.complex.real_ptr result type does not match operand type"; ``` https://github.com/llvm/llvm-project/pull/144236 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits