File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6961,13 +6961,12 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
6961
6961
}))) &&
6962
6962
!all_of(Gathers, [&](Value *V) { return R.getTreeEntry(V); }) &&
6963
6963
!isSplat(Gathers)) {
6964
- BoUpSLP::ValueSet VectorizedLoads;
6964
+ SetVector<Value *> VectorizedLoads;
6965
6965
SmallVector<LoadInst *> VectorizedStarts;
6966
6966
SmallVector<std::pair<unsigned, unsigned>> ScatterVectorized;
6967
6967
unsigned StartIdx = 0;
6968
6968
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) {
6971
6970
for (unsigned Cnt = StartIdx, End = VL.size(); Cnt + VF <= End;
6972
6971
Cnt += VF) {
6973
6972
ArrayRef<Value *> Slice = VL.slice(Cnt, VF);
@@ -6990,6 +6989,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
6990
6989
case LoadsState::PossibleStridedVectorize:
6991
6990
// Mark the vectorized loads so that we don't vectorize them
6992
6991
// again.
6992
+ // TODO: better handling of loads with reorders.
6993
6993
if (LS == LoadsState::Vectorize && CurrentOrder.empty())
6994
6994
VectorizedStarts.push_back(cast<LoadInst>(Slice.front()));
6995
6995
else
You can’t perform that action at this time.
0 commit comments