Now that hasConstantValue has been made simpler, it may return the
phi node itself if it occurs in an unreachable basic block. Protect against this. Hopefully this will fix some more buildbots. llvm-svn: 119493
This commit is contained in:
@@ -583,7 +583,8 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
|
||||
}
|
||||
} else if (PHINode *PN = dyn_cast<PHINode>(V)) {
|
||||
if (Value *W = PN->hasConstantValue())
|
||||
return findValueImpl(W, OffsetOk, Visited);
|
||||
if (W != V)
|
||||
return findValueImpl(W, OffsetOk, Visited);
|
||||
} else if (CastInst *CI = dyn_cast<CastInst>(V)) {
|
||||
if (CI->isNoopCast(TD ? TD->getIntPtrType(V->getContext()) :
|
||||
Type::getInt64Ty(V->getContext())))
|
||||
|
||||
Reference in New Issue
Block a user