[clang] [llvm] [mlir] [LLVM][Constants] Store "splat (float 0.0)" as ConstantFP rather than ConstantAggregateZero. (PR #195284)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 11:18:25 PDT 2026
================
@@ -1672,6 +1672,11 @@ static void writeConstantInternal(raw_ostream &Out, const Constant *CV,
Type *Ty = CFP->getType();
if (Ty->isVectorTy()) {
+ if (CFP->isNullValue()) {
----------------
arsenm wrote:
Probably should avoid using isNullValue when you know the concrete value class, isNullValue is dispatching over all the kinds of constants
https://github.com/llvm/llvm-project/pull/195284
More information about the cfe-commits
mailing list