NULL loads are only invalid in the default address space.
authorOwen Anderson <resistor@mac.com>
Tue, 24 Aug 2010 22:00:55 +0000 (22:00 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 24 Aug 2010 22:00:55 +0000 (22:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111972 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LazyValueInfo.cpp

index 88fa15a88f91deef5c3bfd3239854eff08959c96..e4cd867743a37731362a4df559f36103157555e1 100644 (file)
@@ -460,7 +460,7 @@ LVILatticeVal LVIQuery::getBlockValue(BasicBlock *BB) {
       for (Value::use_iterator UI = Val->use_begin(), UE = Val->use_end();
            UI != UE; ++UI) {
         LoadInst *L = dyn_cast<LoadInst>(*UI);
-        if (L && L->getParent() == BB) {
+        if (L && L->getParent() == BB && L->getPointerAddressSpace() == 0) {
           return LVILatticeVal::getNot(ConstantPointerNull::get(PTy));
         }
       }