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 @@ -20442,7 +20442,8 @@ class RelatedStoreInsts {
20442
20442
}
20443
20443
20444
20444
void reset(unsigned NewBaseInstr) {
20445
- assert(NewBaseInstr < AllStores.size());
20445
+ assert(NewBaseInstr < AllStores.size() &&
20446
+ "Instruction index out of bounds");
20446
20447
BaseInstrIdx = NewBaseInstr;
20447
20448
Instrs.clear();
20448
20449
insertOrLookup(NewBaseInstr, 0);
@@ -20472,9 +20473,8 @@ class RelatedStoreInsts {
20472
20473
// again. Their distance will be "rebased" to use NewBaseInstIdx as
20473
20474
// reference.
20474
20475
for (auto [Dist, InstIdx] : PrevSet) {
20475
- if (InstIdx >= MinSafeIdx) {
20476
+ if (InstIdx >= MinSafeIdx)
20476
20477
insertOrLookup(InstIdx, Dist - DistFromCurBase);
20477
- }
20478
20478
}
20479
20479
}
20480
20480
@@ -20848,6 +20848,7 @@ bool SLPVectorizerPass::vectorizeStores(
20848
20848
20849
20849
// If there is already a store in the group with the same PtrDiff, try to
20850
20850
// vectorize the existing instructions before adding the current store.
20851
+ // Otherwise, insert this store and keep collecting.
20851
20852
if (std::optional<unsigned> PrevInst =
20852
20853
RelatedStores->insertOrLookup(Idx, *Diff)) {
20853
20854
TryToVectorize(RelatedStores->getStores());
You can’t perform that action at this time.
0 commit comments