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

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 19:57:00 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());
----------------
arcbbb wrote:

You're right; it reminds me that we must explicitly express InitVL in VPlan once we support reduction. This is because EVL from the last two iterations cannot be used in the post-exit for correctness. For this PR, can we temporarily skip the preheader and post-exit?

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


More information about the llvm-commits mailing list