Skip to content

Commit 0c90011

Browse files
committed
[LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks().
1 parent 3ad2399 commit 0c90011

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
@@ -4475,6 +4475,9 @@ void LoopVectorizationPlanner::emitInvalidCostRemarks(
44754475
SmallVector<RecipeVFPair> InvalidCosts;
44764476
for (const auto &Plan : VPlans) {
44774477
for (ElementCount VF : Plan->vectorFactors()) {
4478+
if (VF.isScalar())
4479+
continue;
4480+
44784481
VPCostContext CostCtx(CM.TTI, *CM.TLI, Legal->getWidestInductionType(),
44794482
CM);
44804483
precomputeCosts(*Plan, VF, CostCtx);

0 commit comments

Comments
 (0)