summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Lint.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-17 08:35:29 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-17 08:35:29 +0000
commit64e41cf86569d43cd723022be27eb9937fc4e1b1 (patch)
treec3d819428dd8620a7203926f6e701ddf9fe3a920 /llvm/lib/Analysis/Lint.cpp
parent11feaf5921cfc0afeb207cfed6a186c948ad66bc (diff)
downloadbcm5719-llvm-64e41cf86569d43cd723022be27eb9937fc4e1b1.tar.gz
bcm5719-llvm-64e41cf86569d43cd723022be27eb9937fc4e1b1.zip
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. llvm-svn: 119490
Diffstat (limited to 'llvm/lib/Analysis/Lint.cpp')
-rw-r--r--llvm/lib/Analysis/Lint.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index 8b76b873374..e5e7cd38576 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud