diff options
author | Davide Italiano <davide@freebsd.org> | 2017-06-19 16:46:15 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-06-19 16:46:15 +0000 |
commit | daa9c0e403d5e5e64a1a7d062bab8d3e0ee7edbd (patch) | |
tree | 9500e6c55511ef6502c8ab7f348ac43e7ccd019a /llvm/lib/Transforms | |
parent | e2c6991c07ed117e58beb3833ce647118d6749e8 (diff) | |
download | bcm5719-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.cpp | 4 |
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. |