diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-27 18:16:32 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-27 18:16:32 +0000 |
| commit | e20e1242806d75a2e9981fa2fb336a48c67ca3e4 (patch) | |
| tree | ef60446c6478caaf82f8faec53c86440aa93c0cc /llvm/lib/Analysis | |
| parent | 5b4628201f9dbc685d90be73339be9a1649cf57e (diff) | |
| download | bcm5719-llvm-e20e1242806d75a2e9981fa2fb336a48c67ca3e4.tar.gz bcm5719-llvm-e20e1242806d75a2e9981fa2fb336a48c67ca3e4.zip | |
SCEV: Even if the latch terminator is foldable we can't deduce the result of an unrelated condition with it.
Fixes PR14432.
llvm-svn: 168711
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 5f60bd16740..e3ec2685cc9 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -6149,9 +6149,10 @@ bool ScalarEvolution::isImpliedCond(ICmpInst::Predicate Pred, if (SimplifyICmpOperands(Pred, LHS, RHS)) if (LHS == RHS) return CmpInst::isTrueWhenEqual(Pred); - if (SimplifyICmpOperands(FoundPred, FoundLHS, FoundRHS)) - if (FoundLHS == FoundRHS) - return CmpInst::isFalseWhenEqual(Pred); + + // Canonicalize the found cond too. We can't conclude a result from the + // simplified values. + SimplifyICmpOperands(FoundPred, FoundLHS, FoundRHS); // Check to see if we can make the LHS or RHS match. if (LHS == FoundRHS || RHS == FoundLHS) { |

