================
@@ -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>) {
----------------
erichkeane wrote:

can we put the `if constexpr` around the cast attempt?  Optimizers have a tough 
time removing our dyn-casts.

https://github.com/llvm/llvm-project/pull/198427
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to