[llvm] r305707 - [NewGVN] Simplify findConditionEquivalence(). NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 09:46:15 PDT 2017
Author: davide
Date: Mon Jun 19 11:46:15 2017
New Revision: 305707
URL: http://llvm.org/viewvc/llvm-project?rev=305707&view=rev
Log:
[NewGVN] Simplify findConditionEquivalence(). NFCI.
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=305707&r1=305706&r2=305707&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Mon Jun 19 11:46:15 2017
@@ -2329,9 +2329,7 @@ void NewGVN::updateReachableEdge(BasicBl
// 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.
More information about the llvm-commits
mailing list