Skip to content

Commit ad58ea3

Browse files
committed
[VPlan] Bail out before construction VPlan0 if MinVF > MaxVF.
This reduces the cases where we need to create initial VPlans unnecessarily after 567b317. buildVPlansWithVPRecipes is called with MinVF > MaxVF if the target does not support scalable vectors. Recovers some of the compile-time impact http://llvm-compile-time-tracker.com/compare.php?from=3033f202f6707937cd28c2473479db134993f96f&to=1a0b9e5834f7fd4abf058864e656f8e26b7a26ff&stat=instructions:u
1 parent c0a8723 commit ad58ea3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8708,6 +8708,9 @@ VPRecipeBuilder::tryToCreatePartialReduction(Instruction *Reduction,
87088708

87098709
void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
87108710
ElementCount MaxVF) {
8711+
if (ElementCount::isKnownGT(MinVF, MaxVF))
8712+
return;
8713+
87118714
assert(OrigLoop->isInnermost() && "Inner loop expected.");
87128715

87138716
const LoopAccessInfo *LAI = Legal->getLAI();

0 commit comments

Comments
 (0)