From: Davide Italiano Date: Mon, 19 Jun 2017 16:46:15 +0000 (+0000) Subject: [NewGVN] Simplify findConditionEquivalence(). NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04b8896eca6e64f8cd599ed6fce937a799bba366;p=llvm [NewGVN] Simplify findConditionEquivalence(). NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305707 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index c3a593e9267..1d74e2094fd 100644 --- 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(Result)) - return Result; - return nullptr; + return isa(Result) ? Result : nullptr; } // Process the outgoing edges of a block for reachability.