[llvm] [VPlan] Add VPInstruction::StepVector and use it in VPWidenIntOrFpInductionRecipe (PR #129508)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 10:54:47 PDT 2025
================
@@ -1900,8 +1911,11 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
/// the last unrolled part, if it exists. Returns itself if unrolling did not
/// take place.
VPValue *getLastUnrolledPartOperand() {
- return getNumOperands() == 5 ? getOperand(4) : this;
+ return isUnrolled() ? getOperand(getNumOperands() - 1) : this;
}
+
+private:
+ bool isUnrolled() const { return getNumOperands() == 6; }
----------------
fhahn wrote:
Can move just before the `public:` methods?
https://github.com/llvm/llvm-project/pull/129508
More information about the llvm-commits
mailing list