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:
8bcd7ee
)
[NewGVN] Simplify findConditionEquivalence(). NFCI.
author
Davide Italiano
<davide@freebsd.org>
Mon, 19 Jun 2017 16:46:15 +0000
(16:46 +0000)
committer
Davide Italiano
<davide@freebsd.org>
Mon, 19 Jun 2017 16:46:15 +0000
(16:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305707
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/NewGVN.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/NewGVN.cpp
b/lib/Transforms/Scalar/NewGVN.cpp
index
c3a593e
..
1d74e20
100644
(file)
--- a/
lib/Transforms/Scalar/NewGVN.cpp
+++ b/
lib/Transforms/Scalar/NewGVN.cpp
@@
-2329,9
+2329,7
@@
void NewGVN::updateReachableEdge(BasicBlock *From, BasicBlock *To) {
// see if we know some constant value for it already.
Value *NewGVN::findConditionEquivalence(Value *Cond) const {
auto Result = lookupOperandLeader(Cond);
- if (isa<Constant>(Result))
- return Result;
- return nullptr;
+ return isa<Constant>(Result) ? Result : nullptr;
}
// Process the outgoing edges of a block for reachability.