aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-06-17 22:27:06 +0000
committerOwen Anderson <resistor@mac.com>2008-06-17 22:27:06 +0000
commit2960ed4b85d49fbdb3270605a1bfdbfbdcb97d62 (patch)
tree78916a1c175c13c39851be184e120b9c92f62d1f
parentb79bf1966dfee044510d365a952ae550091d9d91 (diff)
downloadexternal_llvm-2960ed4b85d49fbdb3270605a1bfdbfbdcb97d62.zip
external_llvm-2960ed4b85d49fbdb3270605a1bfdbfbdcb97d62.tar.gz
external_llvm-2960ed4b85d49fbdb3270605a1bfdbfbdcb97d62.tar.bz2
We don't want to find dependencies within the same block in this case. It leads to incorrect results because
we're detecting something at or after the call we're querying on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52433 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/GVN.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 563f6e6..7ea3ed8 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -492,7 +492,7 @@ uint32_t ValueTable::lookup_or_add(Value* V) {
return nextValueNumber++;
} else if (I->second != MemoryDependenceAnalysis::NonLocal) {
- if (DT->dominates(I->first, C->getParent())) {
+ if (DT->properlyDominates(I->first, C->getParent())) {
if (CallInst* CD = dyn_cast<CallInst>(I->second))
cdep = CD;
else {