Skip to content

Commit f92ffcb

Browse files
fhahnyuxuanchen1997
authored andcommitted
[LV] Use getBestPlan when interleaving only. (NFCI)
Use the getBestPlan() utility added in b841e2e to also get the scalar plan when interleaving only.
1 parent 41333a9 commit f92ffcb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -10281,7 +10281,9 @@ bool LoopVectorizePass::processLoop(Loop *L) {
1028110281
InnerLoopUnroller Unroller(L, PSE, LI, DT, TLI, TTI, AC, ORE, IC, &LVL,
1028210282
&CM, BFI, PSI, Checks);
1028310283

10284-
VPlan &BestPlan = LVP.getBestPlanFor(VF.Width);
10284+
VPlan &BestPlan = LVP.getBestPlan();
10285+
assert(BestPlan.hasScalarVFOnly() &&
10286+
"VPlan cost model and legacy cost model disagreed");
1028510287
LVP.executePlan(VF.Width, IC, BestPlan, Unroller, DT, false);
1028610288

1028710289
ORE->emit([&]() {

0 commit comments

Comments
 (0)