From: Owen Anderson Date: Tue, 17 Jun 2008 22:27:06 +0000 (+0000) Subject: We don't want to find dependencies within the same block in this case. It leads... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2960ed4b85d49fbdb3270605a1bfdbfbdcb97d62;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 563f6e61b34..7ea3ed89c37 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(I->second)) cdep = CD; else {