projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2476ab
)
[InstCombine] Simplify isKnownNegation
author
Fangrui Song
<maskray@google.com>
Thu, 12 Jul 2018 22:56:23 +0000
(22:56 +0000)
committer
Fangrui Song
<maskray@google.com>
Thu, 12 Jul 2018 22:56:23 +0000
(22:56 +0000)
llvm-svn: 336957
llvm/lib/Analysis/ValueTracking.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ValueTracking.cpp
b/llvm/lib/Analysis/ValueTracking.cpp
index 88ed6562c38fc71021c371f27f9572a669c2257f..42bf427276f6ba9fa0034468cf71be14c5c8ae06 100644
(file)
--- a/
llvm/lib/Analysis/ValueTracking.cpp
+++ b/
llvm/lib/Analysis/ValueTracking.cpp
@@
-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,