Skip to content

Commit 2e9579d

Browse files
committed
[LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks().
1 parent a4c3683 commit 2e9579d

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
@@ -4372,6 +4372,9 @@ void LoopVectorizationPlanner::emitInvalidCostRemarks(
43724372
SmallVector<RecipeVFPair> InvalidCosts;
43734373
for (const auto &Plan : VPlans) {
43744374
for (ElementCount VF : Plan->vectorFactors()) {
4375+
if (VF.isScalar())
4376+
continue;
4377+
43754378
VPCostContext CostCtx(CM.TTI, *CM.TLI, Legal->getWidestInductionType(),
43764379
CM);
43774380
precomputeCosts(*Plan, VF, CostCtx);

0 commit comments

Comments
 (0)