[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 03:26:31 PST 2025


================
@@ -7023,7 +7023,8 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
       }
       // The VPlan-based cost model is more accurate for partial reduction and
       // comparing against the legacy cost isn't desirable.
-      if (isa<VPPartialReductionRecipe>(&R))
+      if (auto *VPR = dyn_cast<VPReductionRecipe>(&R);
+          VPR && VPR->isPartialReduction())
----------------
SamTebbs33 wrote:

Done.

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


More information about the llvm-commits mailing list