[llvm] [VPlan] Add VPSingleDefBundleRecipe, replacing extended reduction recipes. (PR #144281)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 06:34:18 PDT 2025
================
@@ -3014,12 +2937,13 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
match(RecipeB, m_ZExtOrSExt(m_VPValue())) &&
IsMulAccValidAndClampRange(RecipeA->getOpcode() ==
Instruction::CastOps::ZExt,
- Mul, RecipeA, RecipeB, nullptr))
- return new VPMulAccumulateReductionRecipe(Red, Mul, RecipeA, RecipeB,
- RecipeA->getResultType());
+ Mul, RecipeA, RecipeB, nullptr)) {
+ return new VPSingleDefBundleRecipe(RecipeA, RecipeB, Mul, Red);
+ }
// Match reduce.add(mul).
- if (IsMulAccValidAndClampRange(true, Mul, nullptr, nullptr, nullptr))
- return new VPMulAccumulateReductionRecipe(Red, Mul, RedTy);
+ if (IsMulAccValidAndClampRange(true, Mul, nullptr, nullptr, nullptr)) {
+ return new VPSingleDefBundleRecipe(Mul, Red);
+ }
----------------
ayalz wrote:
```suggestion
if (IsMulAccValidAndClampRange(true, Mul, nullptr, nullptr, nullptr))
return new VPSingleDefBundleRecipe(Mul, Red);
```
https://github.com/llvm/llvm-project/pull/144281
More information about the llvm-commits
mailing list