[llvm] [VPlan] Replace ExtractLast(Elem|LanePerPart) with ExtractLast(Lane/Part) (PR #164124)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 21:49:35 PDT 2025


================
@@ -1389,9 +1383,7 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
       if (!vputils::isSingleScalar(RepOrWidenR) ||
           !all_of(RepOrWidenR->users(), [RepOrWidenR](const VPUser *U) {
             return U->usesScalars(RepOrWidenR) ||
-                   match(cast<VPRecipeBase>(U),
-                         m_CombineOr(m_ExtractLastElement(m_VPValue()),
-                                     m_ExtractLastLanePerPart(m_VPValue())));
+                   match(cast<VPRecipeBase>(U), m_ExtractLastPart(m_VPValue()));
----------------
fhahn wrote:

added, although currently ExtractLastLane will always be generated together with ExtractLastPart I think

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


More information about the llvm-commits mailing list