[llvm] [VPlan] Unroll VPReplicateRecipe by VF. (PR #142433)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 02:49:59 PDT 2025
================
@@ -7291,6 +7291,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
// cost model is complete for better cost estimates.
VPlanTransforms::runPass(VPlanTransforms::unrollByUF, BestVPlan, BestUF,
OrigLoop->getHeader()->getContext());
+ VPlanTransforms::runPass(VPlanTransforms::unrollByVF, BestVPlan, BestVF);
----------------
fhahn wrote:
Exposing more folding opportunities is a nice benefit, although besides that I think the main benefits are simpler recipe ::execute and simpler state management (VPTransformState).
It also encourages more flexible/general recipes and adds utilities that can be useful in the future, e.g. BuildVector for SLP and potentially also allows more accurate cost estimates, by making vector <-> scalar transitions explicit.
https://github.com/llvm/llvm-project/pull/142433
More information about the llvm-commits
mailing list