[all-commits] [llvm/llvm-project] 79435d: [ConstantFold] Support scalable constant splats in...
Luke Lau via All-commits
all-commits at lists.llvm.org
Thu Apr 3 08:25:18 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 79435de8a51a3df4b74f858a604b7ff56b342ae7
https://github.com/llvm/llvm-project/commit/79435de8a51a3df4b74f858a604b7ff56b342ae7
Author: Luke Lau <luke at igalia.com>
Date: 2025-04-03 (Thu, 03 Apr 2025)
Changed paths:
M llvm/lib/IR/ConstantFold.cpp
M llvm/test/Analysis/ValueTracking/known-bits-from-operator-constexpr.ll
M llvm/test/Transforms/InstCombine/addrspacecast.ll
M llvm/test/Transforms/InstCombine/scalable-const-fp-splat.ll
M llvm/test/Transforms/InstCombine/scalable-trunc.ll
M llvm/test/Transforms/InstSimplify/ConstProp/cast-vector.ll
M llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll
M llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll
M llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
M llvm/test/Transforms/InstSimplify/vscale.ll
M llvm/test/Transforms/LoopVectorize/AArch64/induction-costs-sve.ll
M llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
M llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-evl-crash.ll
M llvm/test/Transforms/MemCpyOpt/crash.ll
M llvm/test/Transforms/VectorCombine/pr88796.ll
Log Message:
-----------
[ConstantFold] Support scalable constant splats in ConstantFoldCastInstruction (#133207)
Previously only fixed vector splats were handled. This adds supports for
scalable vectors too by allowing ConstantExpr splats.
We need to add the extra V->getType()->isVectorTy() check because a
ConstantExpr might be a scalar to vector bitcast.
By allowing ConstantExprs this also allow fixed vector ConstantExprs to
be folded, which causes the diffs in
llvm/test/Analysis/ValueTracking/known-bits-from-operator-constexpr.ll
and llvm/test/Transforms/InstSimplify/ConstProp/cast-vector.ll. I can
remove them from this PR if reviewers would prefer.
Fixes #132922
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list