summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commitd0de8ace8a0f4a2014000f292e2e6683fcfc1772 (patch)
tree674904a96d972bfb2ee7a2b479b80c7d50eb37fb /llvm/lib/Transforms
parentd3f8b1f2b14ad98fbecb781b6209096ab161d784 (diff)
downloadbcm5719-llvm-d0de8ace8a0f4a2014000f292e2e6683fcfc1772.tar.gz
bcm5719-llvm-d0de8ace8a0f4a2014000f292e2e6683fcfc1772.zip
InstCombine: Use isAllOnesValue() instead of explicit -1.
llvm-svn: 188563
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index bc8506a5384..d40385c0809 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud