diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index 88fa15a88f9..e4cd867743a 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -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(*UI); - if (L && L->getParent() == BB) { + if (L && L->getParent() == BB && L->getPointerAddressSpace() == 0) { return LVILatticeVal::getNot(ConstantPointerNull::get(PTy)); } }