[llvm] [VPlan] Factor out isUnrolled() helper in VPWidenIntOrFpInductionRecipe. NFC (PR #137635)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 07:03:21 PDT 2025
================
@@ -1901,7 +1903,7 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
VPValue *getSplatVFValue() {
// If the recipe has been unrolled (4 operands), return the VPValue for the
// induction increment.
- return getNumOperands() == 5 ? getOperand(3) : nullptr;
+ return isUnrolled() ? getOperand(getNumOperands() - 2) : nullptr;
----------------
david-arm wrote:
Thanks for this! I think the comment above also looks out of date because there are 5 operands. Might be worth cleaning this up while you're here? Or perhaps even just move the comment above `isUnrolled`?
https://github.com/llvm/llvm-project/pull/137635
More information about the llvm-commits
mailing list