[llvm-branch-commits] [llvm] [LoopVectorize] Support vectorization of compressing patterns in VPlan (PR #140723)
Luke Lau via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 11 07:20:05 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);
----------------
lukel97 wrote:
I was thinking VPPhi which is any VPInstruction with an opcode of Instruction::Phi, which you can create from VPBuilder::createScalarPhi. It should let you model everything in VPlan without needing to create a dedicate recipe.
I wouldn't worry about trying to derive from VPHeaderPHIRecipe, we use VPPhi for the EVL tail folding stuff even though it's placed in the header. Other transforms know how to handle VPPhi recipes if that's what your'e wondering.
https://github.com/llvm/llvm-project/pull/140723
More information about the llvm-branch-commits
mailing list