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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 06:12:52 PDT 2025


================
@@ -1844,23 +1854,30 @@ class VPWidenInductionRecipe : public VPHeaderPHIRecipe {
 class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
   TruncInst *Trunc;
 
+  bool isUnrolled() const { return getNumOperands() == 6; }
+
 public:
   VPWidenIntOrFpInductionRecipe(PHINode *IV, VPValue *Start, VPValue *Step,
-                                VPValue *VF, const InductionDescriptor &IndDesc,
-                                DebugLoc DL)
+                                VPValue *VF, VPValue *StepVector,
----------------
david-arm wrote:

>From what I can tell we only ever initialise this with a poison value, at least from looking at all the call sites in this patch. If it's always going to be poison then maybe we can just remove the extra argument and just always call `addOperand(PoisonValue::get(...));`?

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


More information about the llvm-commits mailing list