[llvm] [VPlan] Impl VPlan-based pattern match for ExtendedRed and MulAccRed (NFCI) (PR #113903)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 01:15:02 PST 2024


================
@@ -9419,9 +9389,81 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
       if (CM.blockNeedsPredicationForAnyReason(BB))
         CondOp = RecipeBuilder.getBlockInMask(BB);
 
-      VPReductionRecipe *RedRecipe =
-          new VPReductionRecipe(RdxDesc, CurrentLinkI, PreviousLink, VecOp,
-                                CondOp, CM.useOrderedReductions(RdxDesc));
+      auto TryToMatchMulAcc = [&]() -> VPReductionRecipe * {
----------------
ElvisWang123 wrote:

Move out from the  adjustRecipesForReductions(). Thanks.

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


More information about the llvm-commits mailing list