mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
Skip ptr-to-ptr bitcasts when counting in another case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cdb16aa5ab
commit
d9c05d7711
@ -477,10 +477,10 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
|
|||||||
Instruction *Inst = --ScanFrom;
|
Instruction *Inst = --ScanFrom;
|
||||||
if (isa<DbgInfoIntrinsic>(Inst))
|
if (isa<DbgInfoIntrinsic>(Inst))
|
||||||
continue;
|
continue;
|
||||||
// Likewise, we skip bitcasts that feed into a llvm.dbg.declare; these are
|
// We skip pointer-to-pointer bitcasts, which are NOPs.
|
||||||
// not present when debugging is off.
|
// It is necessary for correctness to skip those that feed into a
|
||||||
if (isa<BitCastInst>(Inst) && Inst->hasOneUse() &&
|
// llvm.dbg.declare, as these are not present when debugging is off.
|
||||||
isa<DbgDeclareInst>(Inst->use_begin()))
|
if (isa<BitCastInst>(Inst) && isa<PointerType>(Inst->getType()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Restore ScanFrom to expected value in case next test succeeds
|
// Restore ScanFrom to expected value in case next test succeeds
|
||||||
|
Loading…
Reference in New Issue
Block a user