diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2016-12-07 19:55:59 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2016-12-07 19:55:59 +0000 |
commit | c6885fc369945a8fe196301b7c2357e11a4c5f20 (patch) | |
tree | 73628404e0fa3121170be64d46149d2bf3908c57 /llvm/lib/Transforms/Scalar/GVNHoist.cpp | |
parent | 49326e4d8467813ef08102389dbb143e329fdef9 (diff) | |
download | bcm5719-llvm-c6885fc369945a8fe196301b7c2357e11a4c5f20.tar.gz bcm5719-llvm-c6885fc369945a8fe196301b7c2357e11a4c5f20.zip |
[GVNHoist] Invalidate MemDep when an instruction is moved.
See also r279907.
Fixes https://llvm.org/bugs/show_bug.cgi?id=30991 .
Differential Revision: https://reviews.llvm.org/D27493
llvm-svn: 288968
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNHoist.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVNHoist.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp index 230558b4aa9..90c26e13db7 100644 --- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp +++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp @@ -802,6 +802,7 @@ private: // Move the instruction at the end of HoistPt. Instruction *Last = HoistPt->getTerminator(); + MD->removeInstruction(Repl); Repl->moveBefore(Last); DFSNumber[Repl] = DFSNumber[Last]++; |