File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20864,7 +20864,8 @@ class RelatedStoreInsts {
20864
20864
}
20865
20865
20866
20866
void reset(unsigned NewBaseInstr) {
20867
- assert(NewBaseInstr < AllStores.size());
20867
+ assert(NewBaseInstr < AllStores.size() &&
20868
+ "Instruction index out of bounds");
20868
20869
BaseInstrIdx = NewBaseInstr;
20869
20870
Instrs.clear();
20870
20871
insertOrLookup(NewBaseInstr, 0);
@@ -20894,9 +20895,8 @@ class RelatedStoreInsts {
20894
20895
// again. Their distance will be "rebased" to use NewBaseInstIdx as
20895
20896
// reference.
20896
20897
for (auto [Dist, InstIdx] : PrevSet) {
20897
- if (InstIdx >= MinSafeIdx) {
20898
+ if (InstIdx >= MinSafeIdx)
20898
20899
insertOrLookup(InstIdx, Dist - DistFromCurBase);
20899
- }
20900
20900
}
20901
20901
}
20902
20902
@@ -21270,6 +21270,7 @@ bool SLPVectorizerPass::vectorizeStores(
21270
21270
21271
21271
// If there is already a store in the group with the same PtrDiff, try to
21272
21272
// vectorize the existing instructions before adding the current store.
21273
+ // Otherwise, insert this store and keep collecting.
21273
21274
if (std::optional<unsigned> PrevInst =
21274
21275
RelatedStores->insertOrLookup(Idx, *Diff)) {
21275
21276
TryToVectorize(RelatedStores->getStores());
You can’t perform that action at this time.
0 commit comments