Skip to content

Commit 6f1c1c7

Browse files
committed
[LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks().
1 parent bd15c7c commit 6f1c1c7

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

0 commit comments

Comments
 (0)