summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-05 21:59:18 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-05 21:59:18 +0000
commit8a20e66926d7d9143896aa15d583a0afcbabb28d (patch)
treea273bd7d6d5bb5bca69a77fe98ac0e96ac12aecb /llvm/lib/Transforms
parent3f1b5d077b7e68c0c801a56f17b05dab96f7f992 (diff)
downloadbcm5719-llvm-8a20e66926d7d9143896aa15d583a0afcbabb28d.tar.gz
bcm5719-llvm-8a20e66926d7d9143896aa15d583a0afcbabb28d.zip
PR9838: Fix transform introduced in r127064 to not trigger when only one side of the icmp is an exact shift.
llvm-svn: 130954
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index bb9b88bfe6a..b6963c54999 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -2400,7 +2400,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
// fall-through
case Instruction::SDiv:
case Instruction::AShr:
- if (!BO0->isExact() && !BO1->isExact())
+ if (!BO0->isExact() || !BO1->isExact())
break;
return new ICmpInst(I.getPredicate(), BO0->getOperand(0),
BO1->getOperand(0));
OpenPOWER on IntegriCloud