[llvm] [LV] Don't vectorize epilogue with scalable VF if no iterations remain. (PR #149789)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 06:00:19 PDT 2025
================
@@ -4479,6 +4479,27 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
Type *TCType = Legal->getWidestInductionType();
const SCEV *RemainingIterations = nullptr;
unsigned MaxTripCount = 0;
+ if (MainLoopVF.isFixed()) {
----------------
fhahn wrote:
Yep, we may also be able to improve this also for cases where we know what vscale to optimize for, as this is a profitability check.
There's already an existing TODO to support scalable VFs here
https://github.com/llvm/llvm-project/pull/149789
More information about the llvm-commits
mailing list