forked from OSchip/llvm-project
[NewGVN] Simplify findConditionEquivalence(). NFCI.
llvm-svn: 305707
This commit is contained in:
parent
e2c6991c07
commit
daa9c0e403
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue