[llvm] [LV] Consider interleaving & tail-folding when -enable-wide-lane-mask=true (PR #163387)
Kerry McLaughlin via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 06:25:49 PDT 2025
================
@@ -4518,7 +4531,7 @@ 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.
- if (!CM.isScalarEpilogueAllowed())
+ if (!CM.isScalarEpilogueAllowed() && !CM.useWideActiveLaneMask())
----------------
kmclaughlin-arm wrote:
Adding a test with the optsize attribute showed that interleaving was still being considered. I’ve rewritten this to ensure we only consider interleaving when both `ScalarEpilogueStatus` indicates using predication and the wide lane masks flag is set.
https://github.com/llvm/llvm-project/pull/163387
More information about the llvm-commits
mailing list