forked from OSchip/llvm-project
GVN-hoist: invalidate MD cache (PR29144)
Without invalidating the entries in the MD cache we would try to access instructions that were removed in previous iterations of hoisting. Differential Revision: https://reviews.llvm.org/D23927 llvm-svn: 279907
This commit is contained in:
parent
acb857b831
commit
4660199a33
|
@ -846,6 +846,8 @@ private:
|
|||
Repl->intersectOptionalDataWith(I);
|
||||
combineKnownMetadata(Repl, I);
|
||||
I->replaceAllUsesWith(Repl);
|
||||
// Also invalidate the Alias Analysis cache.
|
||||
MD->removeInstruction(I);
|
||||
I->eraseFromParent();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue