[llvm] [VPlan] Materialize constant vector trip counts before final opts. (PR #142309)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 02:00:38 PDT 2025
================
@@ -10320,6 +10321,25 @@ bool LoopVectorizePass::processLoop(Loop *L) {
InnerLoopVectorizer LB(L, PSE, LI, DT, TLI, TTI, AC, ORE, VF.Width,
VF.MinProfitableTripCount, IC, &CM, BFI, PSI,
Checks, BestPlan);
+
+ // Materialize vector trip counts for constants early if it can simply
+ // be computed as (Original TC / VF * UF) * VF * UF.
----------------
ayalz wrote:
Can this be a VPlanTransform, perhaps part of optimizeForVFAndUF()? In any case worth outlining.
Should requiresScalarEpilogue be known to VPlan, as a step towards modeling the epilog in VPlan along with the main loop?
https://github.com/llvm/llvm-project/pull/142309
More information about the llvm-commits
mailing list