diff options
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 7a13e7a..960679b 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -592,6 +592,11 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom( return MemDepResult::getDef(Inst); } + // If we found a select instruction for MemLoc pointer, return it as + // Select dependency. + if (isa<SelectInst>(Inst) && MemLoc.Ptr == Inst) + return MemDepResult::getSelect(Inst); + if (isInvariantLoad) continue; @@ -962,7 +967,7 @@ MemDepResult MemoryDependenceResults::getNonLocalInfoForBlock( // If the block has a dependency (i.e. it isn't completely transparent to // the value), remember the reverse association because we just added it // to Cache! - if (!Dep.isDef() && !Dep.isClobber()) + if (!Dep.isLocal()) return Dep; // Keep the ReverseNonLocalPtrDeps map up to date so we can efficiently |