forked from OSchip/llvm-project
SimplifyCFG: Small cleanup, use ICmpInst::isEquality()
llvm-svn: 183151
This commit is contained in:
parent
edee182bef
commit
8e7dd2f628
|
@ -533,9 +533,7 @@ Value *SimplifyCFGOpt::isValueEqualityComparison(TerminatorInst *TI) {
|
|||
} else if (BranchInst *BI = dyn_cast<BranchInst>(TI))
|
||||
if (BI->isConditional() && BI->getCondition()->hasOneUse())
|
||||
if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition()))
|
||||
if ((ICI->getPredicate() == ICmpInst::ICMP_EQ ||
|
||||
ICI->getPredicate() == ICmpInst::ICMP_NE) &&
|
||||
GetConstantInt(ICI->getOperand(1), TD))
|
||||
if (ICI->isEquality() && GetConstantInt(ICI->getOperand(1), TD))
|
||||
CV = ICI->getOperand(0);
|
||||
|
||||
// Unwrap any lossless ptrtoint cast.
|
||||
|
|
Loading…
Reference in New Issue