================ @@ -692,9 +692,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( // during a pass as long as they don't live past the end of the pass. attr = op.getValue(); } else if (mlir::isa<cir::BoolType>(op.getType())) { - int value = (op.getValue() == - cir::BoolAttr::get(getContext(), - cir::BoolType::get(getContext()), true)); + int value = (op.getValue() == cir::BoolAttr::get(getContext(), true)); ---------------- xlauko wrote:
yeah, probably even nicer is ``` else if (auto ba = mlir::dyn_cast<cir::BoolAttr>(op.getValue())) { attr = rewriter.getIntegerAttr(typeConverter->convertType(op.getType()), ba.getValue()); ``` https://github.com/llvm/llvm-project/pull/136366 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits