diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-17 08:35:29 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-17 08:35:29 +0000 |
commit | d261dc650a01ac5c51ab10f97f1e35aa6a770721 (patch) | |
tree | 0b7a1b8c2af289a73c8734c2eba70578a1c8f0af /lib/Analysis/Lint.cpp | |
parent | ce1b9ad539e67c6d05cc6b47ca5f6e62a6d91eff (diff) |
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
Diffstat (limited to 'lib/Analysis/Lint.cpp')
-rw-r--r-- | lib/Analysis/Lint.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp index 8b76b87337..e5e7cd3857 100644 --- a/lib/Analysis/Lint.cpp +++ b/lib/Analysis/Lint.cpp @@ -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) |