[llvm-branch-commits] [llvm] [LV] Bundle (partial) reductions with a mul of a constant (PR #162503)

Sam Tebbs via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 21 06:27:28 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()) {
----------------
SamTebbs33 wrote:

Done, thanks for the idea.

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


More information about the llvm-branch-commits mailing list