[NewGVN] Simplify findConditionEquivalence(). NFCI.

llvm-svn: 305707
This commit is contained in:
Davide Italiano 2017-06-19 16:46:15 +00:00
parent e2c6991c07
commit daa9c0e403
1 changed files with 1 additions and 3 deletions

View File

@ -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.