[llvm] [LV] codegen for tail-folded epilogue loop (PR #208764)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 01:58:14 PDT 2026


================
@@ -5788,7 +5846,7 @@ LoopVectorizationPlanner::precomputeCosts(VPlan &Plan, ElementCount VF,
 
 InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan, ElementCount VF,
                                                VPRegisterUsage *RU) const {
-  VPCostContext CostCtx(*TLI, Plan, CM, Config,
+  VPCostContext CostCtx(*TLI, Plan, *EnabledCM, Config,
----------------
fhahn wrote:

I think we removed almost all lookups on the cost model from `executePlan` and I think it should also be possible to remove the remaining ones + clear the cost model before `executePlan`, so no new queries get added by accident: https://github.com/llvm/llvm-project/pull/217556

I think this should be sufficient to ensure the legacy cost model does not influence any later decisions structurally?

https://github.com/llvm/llvm-project/pull/208764


More information about the llvm-commits mailing list