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

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 03:13:18 PDT 2025


================
@@ -4526,9 +4522,11 @@ void VPlanTransforms::addExitUsersForFirstOrderRecurrences(VPlan &Plan,
                                                              Range))
         return;
       VPValue *PenultimateElement = MiddleBuilder.createNaryOp(
-          VPInstruction::ExtractPenultimateElement, {FOR->getBackedgeValue()},
+          VPInstruction::ExtractPenultimateElement,
+          MiddleBuilder.createNaryOp(VPInstruction::ExtractLastPart,
----------------
ayalz wrote:

ExtractPenultimateElement should return the penultimate part when VF=1, rather than the penultimate lane of the last part?

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


More information about the llvm-commits mailing list