[clang] [CIR] Lower complex constants through CIRAttrToValue (PR #246485)
Robert Konicar via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 12:24:28 PST 2026
================
@@ -2966,7 +2966,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite(
// Unlike a global initializer, the constant must keep its type.
mlir::Attribute value = spellOutSplitTrailingZeros(op.getValue());
const auto constArr = mlir::dyn_cast<cir::ConstArrayAttr>(value);
- if (!constArr && !isa<cir::ZeroAttr, cir::UndefAttr>(value))
+ if (!constArr && !isa<cir::ZeroAttr>(value))
----------------
Jezurko wrote:
Are these really caught by the early return? This check is on the value inside the ArrayAttr while the early return is on the top-level attr itself, no?
https://github.com/llvm/llvm-project/pull/246485
More information about the cfe-commits
mailing list