[llvm] [LV] Support binary and unary operations with EVL-vectorization (PR #93854)

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 14:35:41 PDT 2024


================
@@ -1385,6 +1387,57 @@ void VPlanTransforms::addActiveLaneMask(
     HeaderMask->replaceAllUsesWith(LaneMask);
 }
 
+/// Replace recipes with their EVL variants.
+static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
+  VPDominatorTree VPDT;
+  VPDT.recalculate(Plan);
+  DenseSet<VPRecipeBase *> ToRemove;
+
+  ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
+      Plan.getEntry());
+  DenseSet<VPValue *> HeaderMasks = collectAllHeaderMasks(Plan);
+  for (VPBasicBlock *VPBB :
+       reverse(VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))) {
+    for (VPRecipeBase &R : make_early_inc_range(reverse(*VPBB))) {
+      if (!properlyDominates(EVL.getDefiningRecipe(), &R, VPDT))
----------------
nikolaypanchenko wrote:

will remove it for now as it does assert work for VF=1.

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


More information about the llvm-commits mailing list