Skip to content

Commit f1451e9

Browse files
authored
[LV] Improve code using drop_{begin,end} (NFC) (#147504)
1 parent f1e1b48 commit f1451e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6555,7 +6555,7 @@ void LoopVectorizationCostModel::collectValuesToIgnore() {
65556555
}
65566556

65576557
for (const auto &[_, Ops] : DeadInvariantStoreOps)
6558-
llvm::append_range(DeadOps, ArrayRef(Ops).drop_back());
6558+
llvm::append_range(DeadOps, drop_end(Ops));
65596559

65606560
// Mark ops that would be trivially dead and are only used by ignored
65616561
// instructions as free.
@@ -9097,7 +9097,7 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
90979097
// get folded to their non-phi operand, as the reduction recipe handles the
90989098
// condition directly.
90999099
VPSingleDefRecipe *PreviousLink = PhiR; // Aka Worklist[0].
9100-
for (VPSingleDefRecipe *CurrentLink : Worklist.getArrayRef().drop_front()) {
9100+
for (VPSingleDefRecipe *CurrentLink : drop_begin(Worklist)) {
91019101
if (auto *Blend = dyn_cast<VPBlendRecipe>(CurrentLink)) {
91029102
assert(Blend->getNumIncomingValues() == 2 &&
91039103
"Blend must have 2 incoming values");

0 commit comments

Comments
 (0)