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

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 24 10:58:02 PST 2024


================
@@ -1867,9 +1957,173 @@ void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan) {
       PhiR->replaceAllUsesWith(ScalarR);
       PhiR->eraseFromParent();
     }
+    for (VPRecipeBase &R : make_early_inc_range(*VPBB)) {
+      if (!isa<VPExtendedReductionRecipe, VPMulAccumulateReductionRecipe>(&R))
+        continue;
+      if (auto *ExtRed = dyn_cast<VPExtendedReductionRecipe>(&R)) {
+        expandVPExtendedReduction(ExtRed);
+      }
+      if (auto *MulAcc = dyn_cast<VPMulAccumulateReductionRecipe>(&R)) {
+        expandVPMulAccumulateReduction(MulAcc);
+      }
----------------
alexey-bataev wrote:

Drop extra braces, one-line substatement

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


More information about the llvm-commits mailing list