[llvm] b3e7e4b - [VPlan] Also specialize getNumIncoming for VPWidenPointerInd (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri May 16 14:00:43 PDT 2025
Author: Florian Hahn
Date: 2025-05-16T22:00:31+01:00
New Revision: b3e7e4bb252c82c45639569c6b5f91c5c63742b6
URL: https://github.com/llvm/llvm-project/commit/b3e7e4bb252c82c45639569c6b5f91c5c63742b6
DIFF: https://github.com/llvm/llvm-project/commit/b3e7e4bb252c82c45639569c6b5f91c5c63742b6.diff
LOG: [VPlan] Also specialize getNumIncoming for VPWidenPointerInd (NFC).
Similar to VPWidenIntOrFpInductionRecipe, VPWidenPointerInductionRecipe
only has a single incoming value and no backedge value.
Currently NFC as there are no problematic uses at the moment.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index cdfd26350878b..e634de1e17c69 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1923,6 +1923,11 @@ class VPWidenInductionRecipe : public VPHeaderPHIRecipe {
/// Update the step value of the recipe.
void setStepValue(VPValue *V) { setOperand(1, V); }
+ /// Returns the number of incoming values, also number of incoming blocks.
+ /// Note that at the moment, VPWidenPointerInductionRecipe only has a single
+ /// incoming value, its start value.
+ unsigned getNumIncoming() const override { return 1; }
+
PHINode *getPHINode() const { return cast<PHINode>(getUnderlyingValue()); }
/// Returns the induction descriptor for the recipe.
More information about the llvm-commits
mailing list