summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-04-13 16:05:01 +0000
committerSanjay Patel <spatel@rotateright.com>2017-04-13 16:05:01 +0000
commita8ebb46e0ee5ed63314e9afe4870d92bf1b98e0e (patch)
tree86c99fae9a5bcaf8912b2d0de494acc4b52b5fcf /llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
parent104e36a0e9b3dd8dee6e340b11ac3dc70f215d82 (diff)
downloadbcm5719-llvm-a8ebb46e0ee5ed63314e9afe4870d92bf1b98e0e.tar.gz
bcm5719-llvm-a8ebb46e0ee5ed63314e9afe4870d92bf1b98e0e.zip
[InstCombine] fix assert to not always be true
llvm-svn: 300202
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-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 99a983ab474..2123f2a0b01 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1775,7 +1775,7 @@ Value *InstCombiner::FoldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS,
if (LHS->getOperand(0) == RHS->getOperand(0)) {
// if LHSC and RHSC differ only by one bit:
// (A == C1 || A == C2) -> (A | (C1 ^ C2)) == C2
- assert(LHSC->getValue().ule(LHSC->getValue()));
+ assert(LHSC->getValue().ult(RHSC->getValue()));
APInt Xor = LHSC->getValue() ^ RHSC->getValue();
if (Xor.isPowerOf2()) {
OpenPOWER on IntegriCloud