[llvm] [VPlan] Compute interleave count for VPlan. (PR #149702)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 08:59:47 PDT 2025
================
@@ -4877,12 +4907,15 @@ LoopVectorizationCostModel::selectInterleaveCount(VPlan &Plan, ElementCount VF,
// do the final reduction after the loop.
bool HasSelectCmpReductions =
HasReductions &&
- any_of(Legal->getReductionVars(), [&](auto &Reduction) -> bool {
- const RecurrenceDescriptor &RdxDesc = Reduction.second;
- RecurKind RK = RdxDesc.getRecurrenceKind();
- return RecurrenceDescriptor::isAnyOfRecurrenceKind(RK) ||
- RecurrenceDescriptor::isFindIVRecurrenceKind(RK);
- });
+ any_of(Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis(),
+ [](VPRecipeBase &R) {
+ auto *RedR = dyn_cast<VPReductionPHIRecipe>(&R);
+
----------------
fhahn wrote:
Removed thanks
https://github.com/llvm/llvm-project/pull/149702
More information about the llvm-commits
mailing list