mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
SCEV: Even if the latch terminator is foldable we can't deduce the result of an unrelated condition with it.
Fixes PR14432. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user