diff options
author | Owen Anderson <resistor@mac.com> | 2008-06-17 22:27:06 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-06-17 22:27:06 +0000 |
commit | 75f3732b23feb1c0f1f9164bd3e0cdc581092223 (patch) | |
tree | 4531ff8970998b12d3e074b5040833c0bee60f07 /llvm/lib | |
parent | 4a3125ba29d6d52b0a4dbb4966d505c87627d198 (diff) | |
download | bcm5719-llvm-75f3732b23feb1c0f1f9164bd3e0cdc581092223.tar.gz bcm5719-llvm-75f3732b23feb1c0f1f9164bd3e0cdc581092223.zip |
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.
llvm-svn: 52433
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 563f6e61b34..7ea3ed89c37 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/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 { |