================
@@ -179,14 +179,12 @@ convertStringAttrToDenseElementsAttr(cir::ConstArrayAttr
attr,
}
template <> mlir::APInt getZeroInitFromType(mlir::Type ty) {
- if (mlir::isa<cir::BoolType>(ty))
- return mlir::APInt::getZero(1);
- const auto intTy = mlir::cast<cir::IntType>(ty);
+ const auto intTy = mlir::cast<mlir::IntegerType>(ty);
----------------
martin-luecke wrote:
The caller now passes `convertedElementType`, which is also the element type
used to build the `DenseElementsAttr` in `convertToDenseElementsAttr`. Using
that type in the integer specialization constructs bool zeros at the storage
width directly, replacing the special casing that was required before.
Non-bool integers handled by this helper retain their bit widths, and scalar
bool values still lower to i1.
https://github.com/llvm/llvm-project/pull/236082
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits