problem from instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69151
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!isa<PointerType>(getType()))
return this;
Value *V = this;
+ unsigned MaxLookup = 6;
do {
if (Instruction *I = dyn_cast<Instruction>(V)) {
if (!isa<BitCastInst>(I) && !isa<GetElementPtrInst>(I))
return V;
}
assert(isa<PointerType>(V->getType()) && "Unexpected operand type!");
- } while (1);
+ } while (--MaxLookup);
+ return V;
}
/// DoPHITranslation - If this value is a PHI node with CurBB as its parent,