Skip to content

Commit 6fe60bd

Browse files
authored
[SLP] Exit early if MaxVF < MinVF (NFCI). (#83283)
Exit early if MaxVF < MinVF. In that case, the loop body below will never get entered. Note that this adjusts the condition from MaxVF <= MinVF. If MaxVF == MinVF, vectorization may still be feasible (and the loop below gets entered). PR: #83283
1 parent 09ffd33 commit 6fe60bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14019,10 +14019,11 @@ bool SLPVectorizerPass::vectorizeStores(ArrayRef<StoreInst *> Stores,
1401914019
unsigned MinVF = TTI->getStoreMinimumVF(
1402014020
R.getMinVF(DL->getTypeSizeInBits(ValueTy)), StoreTy, ValueTy);
1402114021

14022-
if (MaxVF <= MinVF) {
14022+
if (MaxVF < MinVF) {
1402314023
LLVM_DEBUG(dbgs() << "SLP: Vectorization infeasible as MaxVF (" << MaxVF
14024-
<< ") <= "
14024+
<< ") < "
1402514025
<< "MinVF (" << MinVF << ")\n");
14026+
continue;
1402614027
}
1402714028

1402814029
// FIXME: Is division-by-2 the correct step? Should we assert that the

0 commit comments

Comments
 (0)