Skip to content

Commit 16bf819

Browse files
committed
Return true from planContainsAdditionalSimplifications
1 parent b1c3489 commit 16bf819

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7575,11 +7575,9 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
75757575
}
75767576
continue;
75777577
}
7578-
// A partial reduction is very differently costed compared to its
7579-
// underlying add instruction that the legacy cost model sees, so consider
7580-
// it an additional simplification.
7578+
// The VPlan-based cost model is more accurate for partial reduction and comparing against the legacy cost isn't desirable.
75817579
if (dyn_cast<VPPartialReductionRecipe>(&R))
7582-
continue;
7580+
return true;
75837581
if (Instruction *UI = GetInstructionForCost(&R))
75847582
SeenInstrs.insert(UI);
75857583
}

0 commit comments

Comments
 (0)