[llvm] [Vectorize] Use llvm::drop_begin (NFC) (PR #144098)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 13 08:38:27 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
We can pass a range to llvm::drop_begin.
---
Full diff: https://github.com/llvm/llvm-project/pull/144098.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/VPlan.h (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index acc861b991975..53619b39219e6 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -2114,7 +2114,7 @@ class VPWidenPHIRecipe : public VPSingleDefRecipe, public VPPhiAccessors {
VPWidenPHIRecipe *clone() override {
auto *C = new VPWidenPHIRecipe(cast<PHINode>(getUnderlyingValue()),
getOperand(0), getDebugLoc(), Name);
- for (VPValue *Op : make_range(std::next(op_begin()), op_end()))
+ for (VPValue *Op : llvm::drop_begin(operands()))
C->addOperand(Op);
return C;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/144098
More information about the llvm-commits
mailing list