================
@@ -2302,14 +2302,23 @@ OpFoldResult cir::ComplexCreateOp::fold(FoldAdaptor
adaptor) {
//===----------------------------------------------------------------------===//
LogicalResult cir::ComplexRealOp::verify() {
- if (getType() != getOperand().getType().getElementType()) {
+ mlir::Type operandTy = getOperand().getType();
+ if (mlir::isa<cir::ComplexType>(operandTy)) {
+ operandTy = mlir::cast<cir::ComplexType>(operandTy).getElementType();
+ }
----------------
xlauko wrote:
```suggestion
if (auto complexOperandTy = mlir::dyn_cast<cir::ComplexType>(operandTy)) {
operandTy = complexOperandTy.getElementType();
}
```
https://github.com/llvm/llvm-project/pull/161080
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits