Skip to content

Commit 3fa90d4

Browse files
committed
use CM.getVScaleForTuning().value_or(1)) as the vscale value could be not set
1 parent 94058a7 commit 3fa90d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4382,7 +4382,7 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
43824382
SE.getURemExpr(TC, SE.getElementCount(TCType, MainLoopVF * IC));
43834383
else if (ScalableTC) {
43844384
const SCEV *EstimatedTC = SE.getMulExpr(
4385-
KnownMinTC, SE.getConstant(TCType, CM.getVScaleForTuning().value()));
4385+
KnownMinTC, SE.getConstant(TCType, CM.getVScaleForTuning().value_or(1)));
43864386
RemainingIterations = SE.getURemExpr(
43874387
EstimatedTC, SE.getElementCount(TCType, MainLoopVF * IC));
43884388
} else

0 commit comments

Comments
 (0)