[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 28 06:45:11 PDT 2025


================
@@ -1891,10 +1908,14 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
   VPValue *getVFValue() { return getOperand(2); }
   const VPValue *getVFValue() const { return getOperand(2); }
 
+  VPValue *getStepVector() { return getOperand(3); }
+  const VPValue *getStepVector() const { return getOperand(3); }
+  void setStepVector(VPValue *V) { setOperand(3, V); }
----------------
lukel97 wrote:

Good idea, done in 675992214618dc4365f88a8fa3a1a43072ba4ae4. I've also asserted that the new value is a VPInstruction::StepVector

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


More information about the llvm-commits mailing list