================
@@ -78,6 +97,13 @@ void convertToDenseElementsAttrImpl(
auto arrayAttr = mlir::cast<mlir::ArrayAttr>(attr.getElts());
for (auto eltAttr : arrayAttr) {
+ if (auto boolAttr = mlir::dyn_cast<cir::BoolAttr>(eltAttr)) {
+ if constexpr (std::is_same_v<StorageTy, mlir::APInt>) {
----------------
adams381 wrote:
Hoisted the `if constexpr` above the `dyn_cast` so the cast is only
instantiated for the integer storage type.
https://github.com/llvm/llvm-project/pull/198427
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits