mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-03 14:08:57 +00:00
Use isTrueWhenEqual and isFalseWhenEqual instead of assuming that
SimplifyICmpOperands will simplify such cases to EQ or NE. This makes the correcntess of the code independent on SimplifyICmpOperands doing certain simplifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a189bae771
commit
34c3e36e63
@ -5260,10 +5260,10 @@ bool ScalarEvolution::isImpliedCond(Value *CondValue,
|
||||
// canonicalized the comparison.
|
||||
if (SimplifyICmpOperands(Pred, LHS, RHS))
|
||||
if (LHS == RHS)
|
||||
return Pred == ICmpInst::ICMP_EQ;
|
||||
return CmpInst::isTrueWhenEqual(Pred);
|
||||
if (SimplifyICmpOperands(FoundPred, FoundLHS, FoundRHS))
|
||||
if (FoundLHS == FoundRHS)
|
||||
return Pred == ICmpInst::ICMP_NE;
|
||||
return CmpInst::isFalseWhenEqual(Pred);
|
||||
|
||||
// Check to see if we can make the LHS or RHS match.
|
||||
if (LHS == FoundRHS || RHS == FoundLHS) {
|
||||
|
Loading…
Reference in New Issue
Block a user