aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2013-08-16 17:03:36 +0000
committerJim Grosbach <grosbach@apple.com>2013-08-16 17:03:36 +0000
commitbff3c587f68530faa1d2be962255254e9adce264 (patch)
tree1f80c01b7d8e0da4277596bd874e293ff7167ed4 /lib/Transforms/InstCombine
parentb89f197713737e8c93045eb4dbd9c1d7ab41acd4 (diff)
downloadexternal_llvm-bff3c587f68530faa1d2be962255254e9adce264.zip
external_llvm-bff3c587f68530faa1d2be962255254e9adce264.tar.gz
external_llvm-bff3c587f68530faa1d2be962255254e9adce264.tar.bz2
InstCombine: Use isAllOnesValue() instead of explicit -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstCombineAndOrXor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index bc8506a..d40385c 100644
--- a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -851,7 +851,7 @@ Value *InstCombiner::FoldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS) {
case ICmpInst::ICMP_NE:
// Special case to get the ordering right when the values wrap around
// zero.
- if (LHSCst->getValue() == 0 && RHSCst->getValue() == -1)
+ if (LHSCst->getValue() == 0 && RHSCst->getValue().isAllOnesValue())
std::swap(LHSCst, RHSCst);
if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1
Constant *AddCST = ConstantExpr::getNeg(LHSCst);