[Mlir-commits] [clang] [llvm] [mlir] [LLVM][Constants] Store "splat (float 0.0)" as ConstantFP rather than ConstantAggregateZero. (PR #195284)
Nikita Popov
llvmlistbot at llvm.org
Tue May 5 03:13:28 PDT 2026
================
@@ -442,7 +442,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(Constant *Val,
// Inserting null into all zeros is still all zeros.
// TODO: This is true for undef and poison splats too.
- if (isa<ConstantAggregateZero>(Val) && Elt->isNullValue())
+ if (Val->isNullValue() && Elt->isNullValue())
----------------
nikic wrote:
I don't think it can really be much narrower, unless you want to spell out ConstantAggregateZero + ConstantFP + ConstantInt + ... here?
https://github.com/llvm/llvm-project/pull/195284
More information about the Mlir-commits
mailing list