[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:16:07 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:
Ah, I didn't realize InstructionCost used a fixed point arith (I assumed integer division that'd truncate towards zero).
https://github.com/llvm/llvm-project/pull/211814
More information about the llvm-commits
mailing list