[llvm] 6d0cfc2 - [Vectorize] Use llvm::drop_begin (NFC) (#144098)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 13:16:18 PDT 2025


Author: Kazu Hirata
Date: 2025-06-13T13:16:15-07:00
New Revision: 6d0cfc2ca51e9365f1c6f216df30a612958aca70

URL: https://github.com/llvm/llvm-project/commit/6d0cfc2ca51e9365f1c6f216df30a612958aca70
DIFF: https://github.com/llvm/llvm-project/commit/6d0cfc2ca51e9365f1c6f216df30a612958aca70.diff

LOG: [Vectorize] Use llvm::drop_begin (NFC) (#144098)

We can pass a range to llvm::drop_begin.

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 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;
   }


        


More information about the llvm-commits mailing list