[llvm] [VPlan] Replace UnrollPart for VPScalarIVSteps with start index op (NFC) (PR #170906)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 19 05:22:50 PST 2026


================
@@ -3826,9 +3826,9 @@ class VPDerivedIVRecipe : public VPSingleDefRecipe {
 };
 
 /// A recipe for handling phi nodes of integer and floating-point inductions,
-/// producing their scalar values.
-class LLVM_ABI_FOR_TEST VPScalarIVStepsRecipe : public VPRecipeWithIRFlags,
-                                                public VPUnrollPartAccessor<3> {
+/// producing their scalar values. Before unrolling the recipe has 3 operands:
+/// IV, step and VF. Unrolling adds an extra operand StartIndex.
----------------
fhahn wrote:

The VF as-is currently is needed unfortunately I think, as we may update it (e.g. when narrowing interleave groups, possibly also with EVL).

We could start out with the third operand being VF, then transform it to the start index, although I am not sure this re-purposing the operand is cleaner? We would also make sure that we set it to `0` even when not unrolling . Replicating-by-VF (follow-up PR) would make this unnecessary.

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


More information about the llvm-commits mailing list