[llvm] [VPlan] Move predication to VPlanTransform (NFC). (PR #128420)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 07:01:46 PDT 2025


================
@@ -9442,43 +9232,32 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range,
   }
 
   // ---------------------------------------------------------------------------
-  // Construct recipes for the instructions in the loop
+  // Predicate and linearize the top-level loop region.
   // ---------------------------------------------------------------------------
+  DenseMap<VPBasicBlock *, VPValue *> BlockMaskCache;
+  VPlanTransforms::predicateAndLinearize(*Plan, CM.foldTailByMasking(),
----------------
ayalz wrote:

Perhaps more accurately `introduceMasksAndLinearize()`, as predicating instructions is done afterwards? Can also provide BlockMaskCache as return value.

https://github.com/llvm/llvm-project/pull/128420


More information about the llvm-commits mailing list