Skip to content

Commit 53f9124

Browse files
committed
[SLP][NFC]Remove extra unused vars, add TODO, NFC.
1 parent aba0401 commit 53f9124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6961,13 +6961,12 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
69616961
}))) &&
69626962
!all_of(Gathers, [&](Value *V) { return R.getTreeEntry(V); }) &&
69636963
!isSplat(Gathers)) {
6964-
BoUpSLP::ValueSet VectorizedLoads;
6964+
SetVector<Value *> VectorizedLoads;
69656965
SmallVector<LoadInst *> VectorizedStarts;
69666966
SmallVector<std::pair<unsigned, unsigned>> ScatterVectorized;
69676967
unsigned StartIdx = 0;
69686968
unsigned VF = VL.size() / 2;
6969-
const unsigned Sz = R.DL->getTypeSizeInBits(VL.front()->getType());
6970-
for (unsigned MinVF = R.getMinVF(2 * Sz); VF >= MinVF; VF /= 2) {
6969+
for (; VF >= MinVF; VF /= 2) {
69716970
for (unsigned Cnt = StartIdx, End = VL.size(); Cnt + VF <= End;
69726971
Cnt += VF) {
69736972
ArrayRef<Value *> Slice = VL.slice(Cnt, VF);
@@ -6990,6 +6989,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
69906989
case LoadsState::PossibleStridedVectorize:
69916990
// Mark the vectorized loads so that we don't vectorize them
69926991
// again.
6992+
// TODO: better handling of loads with reorders.
69936993
if (LS == LoadsState::Vectorize && CurrentOrder.empty())
69946994
VectorizedStarts.push_back(cast<LoadInst>(Slice.front()));
69956995
else

0 commit comments

Comments
 (0)