Skip to content

Commit 17929cc

Browse files
Update It->second even when the key-value pair is already present.
1 parent c725cd1 commit 17929cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,10 @@ void AccessAnalysis::processMemAccesses() {
14451445

14461446
auto [It, Inserted] =
14471447
ObjToLastAccess.try_emplace(UnderlyingObj, Access);
1448-
if (!Inserted)
1448+
if (!Inserted) {
14491449
DepCands.unionSets(Access, It->second);
1450+
It->second = Access;
1451+
}
14501452

14511453
LLVM_DEBUG(dbgs() << " " << *UnderlyingObj << "\n");
14521454
}

0 commit comments

Comments
 (0)