[InstCombine] Simplify isKnownNegation

llvm-svn: 336957
This commit is contained in:
Fangrui Song 2018-07-12 22:56:23 +00:00
parent a2476ab7c9
commit 9bb6c392e3
1 changed files with 2 additions and 5 deletions

View File

@ -4524,11 +4524,8 @@ bool llvm::isKnownNegation(const Value *X, const Value *Y) {
// X = sub (A, B), Y = sub (B, A)
Value *A, *B;
if (match(X, m_Sub(m_Value(A), m_Value(B))) &&
match(Y, m_Sub(m_Specific(B), m_Specific(A))))
return true;
return false;
return match(X, m_Sub(m_Value(A), m_Value(B))) &&
match(Y, m_Sub(m_Specific(B), m_Specific(A)));
}
static SelectPatternResult matchSelectPattern(CmpInst::Predicate Pred,