[Mlir-commits] [clang] [llvm] [mlir] [LLVM][Constants] Store "splat (float 0.0)" as ConstantFP rather than ConstantAggregateZero. (PR #195284)

Matt Arsenault llvmlistbot at llvm.org
Mon May 4 05:43:09 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())
----------------
arsenm wrote:

This is still a broader null check than necessary? 

https://github.com/llvm/llvm-project/pull/195284


More information about the Mlir-commits mailing list