diff options
author | hrs <hrs@FreeBSD.org> | 2011-06-16 12:24:02 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2011-06-16 12:24:02 +0000 |
commit | 7afd303ca9e45353e1af220a988ddac723fde355 (patch) | |
tree | 356c3cc3903b4ba969f103c2c6ccc21fc748bdaa /contrib/llvm/lib/Analysis/LazyValueInfo.cpp | |
parent | b2a6f5600367e61c439c79db2317d4619960e2ce (diff) | |
parent | cc8fba8d7c933e32931cfc80150a2ed465e70825 (diff) | |
download | FreeBSD-src-7afd303ca9e45353e1af220a988ddac723fde355.zip FreeBSD-src-7afd303ca9e45353e1af220a988ddac723fde355.tar.gz |
Merge from HEAD@222977.
Diffstat (limited to 'contrib/llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/Analysis/LazyValueInfo.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/lib/Analysis/LazyValueInfo.cpp b/contrib/llvm/lib/Analysis/LazyValueInfo.cpp index d5f0b5c..6e27597 100644 --- a/contrib/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/contrib/llvm/lib/Analysis/LazyValueInfo.cpp @@ -589,16 +589,18 @@ static bool InstructionDereferencesPointer(Instruction *I, Value *Ptr) { } if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) { if (MI->isVolatile()) return false; - if (MI->getAddressSpace() != 0) return false; // FIXME: check whether it has a valuerange that excludes zero? ConstantInt *Len = dyn_cast<ConstantInt>(MI->getLength()); if (!Len || Len->isZero()) return false; - if (MI->getRawDest() == Ptr || MI->getDest() == Ptr) - return true; + if (MI->getDestAddressSpace() == 0) + if (MI->getRawDest() == Ptr || MI->getDest() == Ptr) + return true; if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) - return MTI->getRawSource() == Ptr || MTI->getSource() == Ptr; + if (MTI->getSourceAddressSpace() == 0) + if (MTI->getRawSource() == Ptr || MTI->getSource() == Ptr) + return true; } return false; } |