[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  4 07:16:44 PDT 2024
    
    
  
================
@@ -1296,6 +1297,56 @@ void VPlanTransforms::addActiveLaneMask(
     HeaderMask->replaceAllUsesWith(LaneMask);
 }
 
+/// Replace recipes with their EVL variants.
+static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
+  DenseSet<VPRecipeBase *> ToRemove;
+
+  ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
+      Plan.getEntry());
----------------
nikolaypanchenko wrote:
That's a good point. We really need to traverse entire VPlan, but replace instructions in postexit with init vl, like for a reduction.
That said, I need to add special check that EVL is reachable before replacing.
https://github.com/llvm/llvm-project/pull/93854
    
    
More information about the llvm-commits
mailing list