summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-02-28 09:17:39 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-02-28 09:17:39 +0000
commit3dc7e49c70726cb47829fb892938ff75a9c9e626 (patch)
treeed78af5ab0d453edff702144229f05a1caf8463a /lib/Transforms
parentb042f8e9699dd15d7ac48bb9b9475122b1673687 (diff)
downloadllvm-3dc7e49c70726cb47829fb892938ff75a9c9e626.tar.gz
llvm-3dc7e49c70726cb47829fb892938ff75a9c9e626.tar.bz2
llvm-3dc7e49c70726cb47829fb892938ff75a9c9e626.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCompares.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 79c5d88c63..fe117c9814 100644
--- a/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/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.