[llvm] [LV] Prefer fixed VFs for epilogue vectorization (PR #211814)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 06:46:23 PDT 2026


================
@@ -706,6 +706,21 @@ bool LoopVectorizationPlanner::isMoreProfitable(const VectorizationFactor &A,
         !B.Width.isScalar())
       return true;
 
+  // Prefer fixed VFs for epilogue loops (unless the fixed cost is much more
+  // expensive -- >= 2x). There are some extra costs for using scalable vectors
----------------
MacDue wrote:

I've added `--scalable-epilogue-vf-cost-scale-factor` (better name suggestions welcome). 

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


More information about the llvm-commits mailing list