Skip to content

Commit 520c8ad

Browse files
committed
improve readability
1 parent b8d6f7e commit 520c8ad

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,19 +4430,17 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
44304430

44314431
// If NextVF is greater than the number of remaining iterations, the
44324432
// epilogue loop would be dead. Skip such factors.
4433-
// TODO: We should also consider comparing against scalable RemIter when
4434-
// SCEV be able to evaluate non-canonical vscale-based expressions.
4433+
// TODO: We should also consider comparing against a scalable
4434+
// RemainingIterations when SCEV be able to evaluate non-canonical
4435+
// vscale-based expressions.
44354436
if (!ScalableRemIter) {
44364437
// Handle the case where NextVF and RemainingIterations are in different
44374438
// numerical spaces.
4438-
if (NextVF.Width.isScalable()) {
4439-
ElementCount EstimatedRuntimeNextVF = ElementCount::getFixed(
4439+
ElementCount EC = NextVF.Width;
4440+
if (NextVF.Width.isScalable())
4441+
EC = ElementCount::getFixed(
44404442
estimateElementCount(NextVF.Width, CM.getVScaleForTuning()));
4441-
if (SkipVF(SE.getElementCount(TCType, EstimatedRuntimeNextVF),
4442-
RemainingIterations))
4443-
continue;
4444-
} else if (SkipVF(SE.getElementCount(TCType, NextVF.Width),
4445-
RemainingIterations))
4443+
if (SkipVF(SE.getElementCount(TCType, EC), RemainingIterations))
44464444
continue;
44474445
}
44484446

0 commit comments

Comments
 (0)