Skip to content

Commit ade2f10

Browse files
authored
[SLP][NFCI] Don't trim indexes, reuse a variable (#149074)
1 parent 7674566 commit ade2f10

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8622,11 +8622,10 @@ void BoUpSLP::tryToVectorizeGatheredLoads(
86228622
State == LoadsState::CompressVectorize)
86238623
return false;
86248624
ConsecutiveNodesSize += VL.size();
8625-
unsigned Start = std::distance(Slice.begin(), It);
8626-
unsigned Sz = Slice.size() - Start;
8625+
size_t Start = std::distance(Slice.begin(), It);
8626+
size_t Sz = Slice.size() - Start;
86278627
return Sz < VL.size() ||
8628-
Slice.slice(std::distance(Slice.begin(), It),
8629-
VL.size()) != VL;
8628+
Slice.slice(Start, VL.size()) != VL;
86308629
}))
86318630
continue;
86328631
// Try to build long masked gather loads.

0 commit comments

Comments
 (0)