summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAditya Kumar <hiraditya@msn.com>2018-01-04 07:47:24 +0000
committerAditya Kumar <hiraditya@msn.com>2018-01-04 07:47:24 +0000
commit1f90cae80fae85e7ae08b1cf75c8c05acc4e24cb (patch)
tree94b45dd9c98d0468c3dfc2b33b935be2d1ab0ff1 /llvm/lib/Transforms
parentfec26b0bbba9f7c1704f021c1d830bb012578674 (diff)
downloadbcm5719-llvm-1f90cae80fae85e7ae08b1cf75c8c05acc4e24cb.tar.gz
bcm5719-llvm-1f90cae80fae85e7ae08b1cf75c8c05acc4e24cb.zip
[GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop
Reviewers: dberlin sebpop eli.friedman Differential Revision: https://reviews.llvm.org/D41453 llvm-svn: 321789
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVNHoist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
index c0cd1ea74a7..026fab5dbd3 100644
--- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -648,7 +648,7 @@ private:
// track in a CHI. In the PDom walk, there can be values in the
// stack which are not control dependent e.g., nested loop.
if (si != RenameStack.end() && si->second.size() &&
- DT->dominates(Pred, si->second.back()->getParent())) {
+ DT->properlyDominates(Pred, si->second.back()->getParent())) {
C.Dest = BB; // Assign the edge
C.I = si->second.pop_back_val(); // Assign the argument
DEBUG(dbgs() << "\nCHI Inserted in BB: " << C.Dest->getName()
OpenPOWER on IntegriCloud