[llvm] [LV][EVL] Introduce MergeUntilPivot VPInstruction to enable out-loop reduction in EVL vectorization. (PR #101641)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 10:32:45 PDT 2024
================
@@ -1383,6 +1385,16 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
VPValue *NewMask = GetNewMask(Red->getCondOp());
return new VPReductionEVLRecipe(*Red, EVL, NewMask);
})
+ .Case<VPInstruction>([&](VPInstruction *VPI) -> VPRecipeBase * {
+ VPValue *LHS, *RHS;
+ if (!match(VPI, m_Select(m_Specific(HeaderMask), m_VPValue(LHS),
+ m_VPValue(RHS))))
+ return nullptr;
+ VPValue *Cond = Plan.getOrAddLiveIn(ConstantInt::getTrue(Ctx));
----------------
fhahn wrote:
Could you add a comment why true is used here? IIUC it is because it is limited to selects on the header mask for now?
https://github.com/llvm/llvm-project/pull/101641
More information about the llvm-commits
mailing list