Skip to content

Commit 0045b82

Browse files
[Vectorize] Construct SmallVector with an iterator range (NFC) (#135936)
1 parent 0577240 commit 0045b82

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -8402,11 +8402,7 @@ void BoUpSLP::tryToVectorizeGatheredLoads(
84028402
continue;
84038403
}
84048404
SmallVector<std::pair<LoadInst *, int>> LocalLoadsDists(LoadsDists);
8405-
SmallVector<LoadInst *> OriginalLoads(LocalLoadsDists.size());
8406-
transform(LoadsDists, OriginalLoads.begin(),
8407-
[](const std::pair<LoadInst *, int> &L) -> LoadInst * {
8408-
return L.first;
8409-
});
8405+
SmallVector<LoadInst *> OriginalLoads(make_first_range(LoadsDists));
84108406
stable_sort(LocalLoadsDists, LoadSorter);
84118407
SmallVector<LoadInst *> Loads;
84128408
unsigned MaxConsecutiveDistance = 0;

0 commit comments

Comments
 (0)