1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[InstCombine] Simplify isKnownNegation

llvm-svn: 336957
This commit is contained in:
Fangrui Song 2018-07-12 22:56:23 +00:00
parent 96707c7d66
commit 52a9dba29e

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,