mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Previously SimplifyInstruction could report that an instruction
simplified to itself (this can only happen in unreachable blocks). Change it to return null instead. Hopefully this will fix some buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -616,8 +616,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
|
||||
// As a last resort, try SimplifyInstruction or constant folding.
|
||||
if (Instruction *Inst = dyn_cast<Instruction>(V)) {
|
||||
if (Value *W = SimplifyInstruction(Inst, TD, DT))
|
||||
if (W != Inst)
|
||||
return findValueImpl(W, OffsetOk, Visited);
|
||||
return findValueImpl(W, OffsetOk, Visited);
|
||||
} else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
|
||||
if (Value *W = ConstantFoldConstantExpression(CE, TD))
|
||||
if (W != V)
|
||||
|
Reference in New Issue
Block a user