diff options
author | Sebastian Pop <sebpop@gmail.com> | 2016-08-27 02:48:41 +0000 |
---|---|---|
committer | Sebastian Pop <sebpop@gmail.com> | 2016-08-27 02:48:41 +0000 |
commit | 4660199a3315513aa18fc4899d39cef17beaea0c (patch) | |
tree | 030de39bf1922a5e6e509de73999113a2825b7af /llvm/lib/Transforms/Scalar/GVNHoist.cpp | |
parent | acb857b83180a70f0aa42a8e98f40c4b0537d629 (diff) | |
download | bcm5719-llvm-4660199a3315513aa18fc4899d39cef17beaea0c.tar.gz bcm5719-llvm-4660199a3315513aa18fc4899d39cef17beaea0c.zip |
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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNHoist.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVNHoist.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp index e287ba71e0b..4a6e934b573 100644 --- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp +++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp @@ -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(); } |