summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-17 02:57:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-17 02:57:36 +0000
commita0fba5319d07d453faee260656611d3e63a66ced (patch)
treea13523c41b12a3c6b422fa2148a8bfb62aeb7d78 /llvm/lib
parent7af1d248f5637144c85d4c122fbdc0070e0bb633 (diff)
downloadbcm5719-llvm-a0fba5319d07d453faee260656611d3e63a66ced.tar.gz
bcm5719-llvm-a0fba5319d07d453faee260656611d3e63a66ced.zip
PR3439: Correct a silly mistake in the SimplifyDemandedUseBits code for
SRem. llvm-svn: 73598
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 8dc8659648f..170b47694af 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1336,7 +1336,7 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
if (ConstantInt *Rem = dyn_cast<ConstantInt>(I->getOperand(1))) {
APInt RA = Rem->getValue().abs();
if (RA.isPowerOf2()) {
- if (DemandedMask.ule(RA)) // srem won't affect demanded bits
+ if (DemandedMask.ult(RA)) // srem won't affect demanded bits
return I->getOperand(0);
APInt LowBits = RA - 1;
OpenPOWER on IntegriCloud