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 @@ -20506,7 +20506,8 @@ class RelatedStoreInsts {
20506
20506
}
20507
20507
20508
20508
void reset(unsigned NewBaseInstr) {
20509
- assert(NewBaseInstr < AllStores.size());
20509
+ assert(NewBaseInstr < AllStores.size() &&
20510
+ "Instruction index out of bounds");
20510
20511
BaseInstrIdx = NewBaseInstr;
20511
20512
Instrs.clear();
20512
20513
insertOrLookup(NewBaseInstr, 0);
@@ -20536,9 +20537,8 @@ class RelatedStoreInsts {
20536
20537
// again. Their distance will be "rebased" to use NewBaseInstIdx as
20537
20538
// reference.
20538
20539
for (auto [Dist, InstIdx] : PrevSet) {
20539
- if (InstIdx >= MinSafeIdx) {
20540
+ if (InstIdx >= MinSafeIdx)
20540
20541
insertOrLookup(InstIdx, Dist - DistFromCurBase);
20541
- }
20542
20542
}
20543
20543
}
20544
20544
@@ -20912,6 +20912,7 @@ bool SLPVectorizerPass::vectorizeStores(
20912
20912
20913
20913
// If there is already a store in the group with the same PtrDiff, try to
20914
20914
// vectorize the existing instructions before adding the current store.
20915
+ // Otherwise, insert this store and keep collecting.
20915
20916
if (std::optional<unsigned> PrevInst =
20916
20917
RelatedStores->insertOrLookup(Idx, *Diff)) {
20917
20918
TryToVectorize(RelatedStores->getStores());
You can’t perform that action at this time.
0 commit comments