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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 02:58:41 PDT 2025


================
@@ -878,10 +878,11 @@ 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 if it is a vector, or the last
+    // part if scalar.
+    ExtractLast,
+    // Extracts the second-to-last lane from its operand.
+    ExtractPenultimateLane,
----------------
fhahn wrote:

Thanks, updated in the latest version to use `Element` suffix for both, mention that for the scalar case it extracts the last/second-to-last part and that in this case it gets removed by unrolling.

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


More information about the llvm-commits mailing list