[llvm] [LV] Vectorize conditional scalar assignments (PR #158088)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 01:13:12 PST 2025
================
@@ -4636,6 +4640,14 @@ LoopVectorizationPlanner::selectInterleaveCount(VPlan &Plan, ElementCount VF,
any_of(Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis(),
IsaPred<VPReductionPHIRecipe>);
+ // FIXME: implement interleaving for FindLast transform correctly.
+ if (any_of(make_second_range(Legal->getReductionVars()),
+ [](const RecurrenceDescriptor &RdxDesc) {
+ return RecurrenceDescriptor::isFindLastRecurrenceKind(
+ RdxDesc.getRecurrenceKind());
+ }))
+ return 1;
----------------
fhahn wrote:
I think we need to move this check earlier. (see the check a bit before the call to selectInterleaveCount that handles isSafeForAnyVectorwidth). We take the max of UserIC (set via flag or pragma) and the IC returned here, so we still may end up interleaving if the user requests it. Would be good to add a test with forced interleaving.
https://github.com/llvm/llvm-project/pull/158088
More information about the llvm-commits
mailing list