[llvm-branch-commits] [llvm] [LV] Bundle (partial) reductions with a mul of a constant (PR #162503)
Sander de Smalen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 20 06:58:00 PDT 2025
================
@@ -3597,6 +3607,32 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
dyn_cast_if_present<VPWidenCastRecipe>(B->getDefiningRecipe());
auto *Mul = cast<VPWidenRecipe>(VecOp->getDefiningRecipe());
+ // Match reduce.add(mul(ext, const)) and convert it to
+ // reduce.add(mul(ext, ext(const)))
+ if (RecipeA && !RecipeB && B->isLiveIn()) {
----------------
sdesmalen-arm wrote:
It would be nice if this could also work for the case handled on loop 3657 (`zext(mul(zext(a), zext(b)))` where `b` is a constant)
https://github.com/llvm/llvm-project/pull/162503
More information about the llvm-branch-commits
mailing list