We don't want to find dependencies within the same block in this case. It leads...
authorOwen Anderson <resistor@mac.com>
Tue, 17 Jun 2008 22:27:06 +0000 (22:27 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 17 Jun 2008 22:27:06 +0000 (22:27 +0000)
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

lib/Transforms/Scalar/GVN.cpp

index 563f6e61b34c993d1b9a0eb6336efc14fa77179a..7ea3ed89c376305142458d246c35512280150932 100644 (file)
@@ -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 {