[llvm] [LV][EVL] Introduce MergeUntilPivot VPInstruction to enable out-loop reduction in EVL vectorization. (PR #101641)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 05:54:55 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));
----------------
Mel-Chen wrote:
Your understanding is absolutely correct. :)
And I can't find any other place where vp.merge is used.
7bfd0b20050a9d3859a2065c1b5622986d91f9c1
https://github.com/llvm/llvm-project/pull/101641
More information about the llvm-commits
mailing list