[llvm] [VPlan] Replace all uses of VF when EVL tail folding. NFCI (PR #146339)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 04:57:03 PDT 2025
================
@@ -2198,6 +2198,10 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion();
VPBasicBlock *Header = LoopRegion->getEntryBasicBlock();
+ assert(all_of(Plan.getVF().users(),
+ IsaPred<VPVectorEndPointerRecipe, VPScalarIVStepsRecipe>));
+ Plan.getVF().replaceAllUsesWith(&EVL);
+
----------------
lukel97 wrote:
We need to move this above the FOR transform because it introduces a trunc that uses the original VF
https://github.com/llvm/llvm-project/pull/146339
More information about the llvm-commits
mailing list