Skip to content

Commit 15f48ee

Browse files
committed
Clarify check in NoScalarEpilogueNeeded
1 parent e9df81f commit 15f48ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4016,6 +4016,8 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
40164016
}
40174017

40184018
auto NoScalarEpilogueNeeded = [this, &UserIC](unsigned MaxVF) {
4019+
// Return false if the loop is neither a single-latch-exit loop nor an
4020+
// early-exit loop as tail-folding is not supported in that case.
40194021
if (TheLoop->getExitingBlock() != TheLoop->getLoopLatch() &&
40204022
!Legal->hasUncountableEarlyExit())
40214023
return false;

0 commit comments

Comments
 (0)