[llvm] [VPlan] Only use selectVectorizationFactor for cross-check (NFCI). (PR #103033)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 05:12:15 PDT 2024
================
@@ -10018,11 +10012,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
InnerLoopUnroller Unroller(L, PSE, LI, DT, TLI, TTI, AC, ORE, IC, &LVL,
&CM, BFI, PSI, Checks);
- ElementCount BestVF = LVP.getBestVF();
- assert(BestVF.isScalar() &&
- "VPlan cost model and legacy cost model disagreed");
- VPlan &BestPlan = LVP.getBestPlanFor(BestVF);
- LVP.executePlan(BestVF, IC, BestPlan, Unroller, DT, false);
+ VPlan &BestPlan = LVP.getBestPlanFor(VF.Width);
+ LVP.executePlan(VF.Width, IC, BestPlan, Unroller, DT, false);
----------------
fhahn wrote:
Left as explicitly passing `.Width` for now. The only users of `.Cost` are `selectInterleaveCount`, which only uses it to check if the loop is effectively empty (should not need to check the cost for that using VPlan) and `areRuntimeChecksProfitable` which may be sunk into `getBestVF`
https://github.com/llvm/llvm-project/pull/103033
More information about the llvm-commits
mailing list