diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-06-03 20:39:50 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-06-03 20:39:50 +0000 |
commit | 404fa7257fae8e4252cd4d01017e97ab6062ab27 (patch) | |
tree | 5de4c7aa416ae3f40cb432ebf6fa174bd6bf7410 /lib | |
parent | 031a179b6d47bf0f478868717e2e364c4e39225c (diff) | |
download | external_llvm-404fa7257fae8e4252cd4d01017e97ab6062ab27.zip external_llvm-404fa7257fae8e4252cd4d01017e97ab6062ab27.tar.gz external_llvm-404fa7257fae8e4252cd4d01017e97ab6062ab27.tar.bz2 |
SimplifyCFG: Small cleanup, use ICmpInst::isEquality()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 95a22c1..18f334e 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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. |