summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-06-19 16:46:15 +0000
committerDavide Italiano <davide@freebsd.org>2017-06-19 16:46:15 +0000
commitdaa9c0e403d5e5e64a1a7d062bab8d3e0ee7edbd (patch)
tree9500e6c55511ef6502c8ab7f348ac43e7ccd019a /llvm/lib/Transforms
parente2c6991c07ed117e58beb3833ce647118d6749e8 (diff)
downloadbcm5719-llvm-daa9c0e403d5e5e64a1a7d062bab8d3e0ee7edbd.tar.gz
bcm5719-llvm-daa9c0e403d5e5e64a1a7d062bab8d3e0ee7edbd.zip
[NewGVN] Simplify findConditionEquivalence(). NFCI.
llvm-svn: 305707
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index c3a593e9267..1d74e2094fd 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud