diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-02-28 09:17:39 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-02-28 09:17:39 +0000 |
commit | 66f4f22f7b1a12ad3ced32867d76e1b02074c72b (patch) | |
tree | 437d833d32eb9d2897c013d9a00fd187e3d70f87 /llvm/lib/Transforms | |
parent | 174a7054978bf285cb01bbcd6f2fa106dc0f1931 (diff) | |
download | bcm5719-llvm-66f4f22f7b1a12ad3ced32867d76e1b02074c72b.tar.gz bcm5719-llvm-66f4f22f7b1a12ad3ced32867d76e1b02074c72b.zip |
srem doesn't actually have the same resulting sign as its numerator, you could
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.
llvm-svn: 126644
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 79c5d88c631..fe117c98143 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -1348,16 +1348,6 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI, } } break; - - case Instruction::SRem: { - bool TrueIfSigned; - if (LHSI->hasOneUse() && - isSignBitCheck(ICI.getPredicate(), RHS, TrueIfSigned)) { - // srem has the same sign as its dividend so the divisor is irrelevant. - return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), RHS); - } - break; - } } // Simplify icmp_eq and icmp_ne instructions with integer constant RHS. |