OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bd050e
)
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336957
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ValueTracking.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ValueTracking.cpp
b/lib/Analysis/ValueTracking.cpp
index
88ed656
..
42bf427
100644
(file)
--- a/
lib/Analysis/ValueTracking.cpp
+++ b/
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,