[llvm] [LV][EVL] Emit vp.merge intrinsic to enable out-loop reduction in EVL vectorization. (PR #101641)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 20:28:16 PDT 2024


================
@@ -1392,7 +1395,19 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
                                                   TypeInfo.inferScalarType(Sel),
                                                   false, false, false);
               })
-
+              .Case<VPInstruction>([&](VPInstruction *VPI) -> VPRecipeBase * {
+                VPValue *LHS, *RHS;
+                if (!match(VPI, m_Select(m_Specific(HeaderMask), m_VPValue(LHS),
----------------
fhahn wrote:

Would be good to document the code here

Do we need this for any select, or just the ones for out-loop reductions?

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


More information about the llvm-commits mailing list