[Mlir-commits] [clang] [llvm] [mlir] [LLVM][Constants] Store "splat (float 0.0)" as ConstantFP rather than ConstantAggregateZero. (PR #195284)
Paul Walker
llvmlistbot at llvm.org
Tue May 5 03:14:06 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())
----------------
paulwalker-arm wrote:
This remains beneficial until the migration to ConstantFP/Int is finished. Only the ConstantFP migration has been enabled and even then it's required until getNullValue() is changed and the UseConstant*For*Splat command line option is removed.
https://github.com/llvm/llvm-project/pull/195284
More information about the Mlir-commits
mailing list