[llvm-branch-commits] [llvm] [LoopVectorize] Support vectorization of compressing patterns in VPlan (PR #140723)
Sergey Kachkov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 11 06:55:20 PST 2025
================
@@ -8430,6 +8479,46 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
// bring the VPlan to its final state.
// ---------------------------------------------------------------------------
+ // Adjust the recipes for any monotonic phis.
+ for (VPRecipeBase &R : HeaderVPBB->phis()) {
+ auto *MonotonicPhi = dyn_cast<VPMonotonicPHIRecipe>(&R);
----------------
skachkov-sc wrote:
Do you mean VPIRPhi recipe? I think it's possible, but I'm slightly concerned that semantically VPMonotonicPHIRecipe models loop header phi so it should be derived from VPHeaderPHIRecipe. But yes, we can distinguish monotonic phis using LoopVectorizationLegality
https://github.com/llvm/llvm-project/pull/140723
More information about the llvm-branch-commits
mailing list