[llvm] [VPlan] Add VPInstruction::StepVector and use it in VPWidenIntOrFpInductionRecipe (PR #129508)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 04:12:33 PDT 2025


================
@@ -883,6 +883,8 @@ class VPInstruction : public VPRecipeWithIRFlags,
     AnyOf,
     // Calculates the first active lane index of the vector predicate operand.
     FirstActiveLane,
+    // Creates a step vector starting from 0 with a step of 1.
----------------
lukel97 wrote:

Or Builder.CreateStepVector doesn't have an API for it either, i.e. it always creates a step vector for the full vector width, for both scalable and fixed-length vectors. And we don't have a VP intrinsic for stepvector i.e. https://github.com/llvm/llvm-project/issues/121561

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


More information about the llvm-commits mailing list