mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
SimplifyCFG: Small cleanup, use ICmpInst::isEquality()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
031a179b6d
commit
404fa7257f
@ -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…
x
Reference in New Issue
Block a user