[llvm] [LV] Use wide lane masks as the canonical form when tail-folding & interleaving (PR #209484)
Kerry McLaughlin via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 09:25:02 PDT 2026
================
@@ -3652,12 +3638,10 @@ LoopVectorizationPlanner::selectInterleaveCount(VPlan &Plan, ElementCount VF,
// 3. We don't interleave if we think that we will spill registers to memory
// due to the increased register pressure.
- // Only interleave tail-folded loops if wide lane masks are requested, as the
- // overhead of multiple instructions to calculate the predicate is likely
- // not beneficial. If an epilogue is not allowed for any other reason,
- // do not interleave.
- if (!CM.isEpilogueAllowed() &&
- !(CM.preferTailFoldedLoop() && CM.useWideActiveLaneMask()))
----------------
kmclaughlin-arm wrote:
This was intended to revert `selectInterleaveCount` back to the original code before https://github.com/llvm/llvm-project/pull/163387, however `CM.preferTailFoldedLoop()` should also have been removed. I've removed this in the latest commit, which prevents any tail-folded loop from being interleaved without forcing as it was originally.
https://github.com/llvm/llvm-project/pull/209484
More information about the llvm-commits
mailing list