[llvm] [VPlan] Replace ExtractFromEnd with Extract(Last|Penultimate)Lane (NFC). (PR #137030)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 23 16:01:15 PDT 2025


================
@@ -878,10 +878,10 @@ class VPInstruction : public VPRecipeWithIRFlags,
     Broadcast,
     ComputeFindLastIVResult,
     ComputeReductionResult,
-    // Takes the VPValue to extract from as first operand and the lane or part
-    // to extract as second operand, counting from the end starting with 1 for
-    // last. The second operand must be a positive constant and <= VF.
-    ExtractFromEnd,
+    // Extracts the last lane from its operand.
+    ExtractLastLane,
+    // Extracts the second-to-last lane from its operand.
+    ExtractPenultimateLane,
----------------
ayalz wrote:

Extract last applies to both lane (when VF>1) and part (when VF=1), so better call it `ExtractLast`?
Extract penultimate applies to lane only (demands VF>1), so `ExtractPenultimateLane` is accurate.

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


More information about the llvm-commits mailing list