[llvm] [VPlan] Update getBestPlan to return VF, use also for epilogue vec. (PR #98821)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 12:26:54 PDT 2024
================
@@ -9971,8 +9968,9 @@ bool LoopVectorizePass::processLoop(Loop *L) {
InnerLoopUnroller Unroller(L, PSE, LI, DT, TLI, TTI, AC, ORE, IC, &LVL,
&CM, BFI, PSI, Checks);
- VPlan &BestPlan = LVP.getBestPlan();
- assert(BestPlan.hasScalarVFOnly() &&
+ ElementCount BestVF = LVP.getBestVF();
+ VPlan &BestPlan = LVP.getBestPlanFor(BestVF);
+ assert(BestVF.isScalar() &&
"VPlan cost model and legacy cost model disagreed");
----------------
ayalz wrote:
```suggestion
assert(BestVF.isScalar() &&
"VPlan cost model and legacy cost model disagreed");
VPlan &BestPlan = LVP.getBestPlanFor(BestVF);
```
https://github.com/llvm/llvm-project/pull/98821
More information about the llvm-commits
mailing list