summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-03-04 19:26:08 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-03-04 19:26:08 +0000
commit41c529bd09d3758e9cc9aa131e369ece3573fa13 (patch)
tree9747b6c52b8b336aa0f23349d292827324ad4a3f /llvm
parent328e2ce043d46ca64b75dc5fe9245c80ca949410 (diff)
downloadbcm5719-llvm-41c529bd09d3758e9cc9aa131e369ece3573fa13.tar.gz
bcm5719-llvm-41c529bd09d3758e9cc9aa131e369ece3573fa13.zip
Revert broken srem logic from r126991.
llvm-svn: 127021
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp15
-rw-r--r--llvm/test/Transforms/InstSimplify/compare.ll9
2 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 44b0247e5ae..1076eeff2d8 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -1700,21 +1700,6 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
}
}
- if (LBO && match(LBO, m_SRem(m_Value(), m_Specific(RHS)))) {
- switch (Pred) {
- default:
- break;
- case ICmpInst::ICMP_EQ:
- case ICmpInst::ICMP_SGT:
- case ICmpInst::ICMP_SGE:
- return ConstantInt::getFalse(RHS->getContext());
- case ICmpInst::ICMP_NE:
- case ICmpInst::ICMP_SLT:
- case ICmpInst::ICMP_SLE:
- return ConstantInt::getTrue(RHS->getContext());
- }
- }
-
// If the comparison is with the result of a select instruction, check whether
// comparing with either branch of the select always yields the same value.
if (isa<SelectInst>(LHS) || isa<SelectInst>(RHS))
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index 11295b7072b..7b92de156d2 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -253,15 +253,6 @@ define i1 @srem1(i32 %X) {
; CHECK: ret i1 false
}
-define i1 @srem2(i32 %X, i32 %Y) {
-; CHECK: @srem2
- %neg = sub i32 %Y, 0
- %A = srem i32 %X, %Y
- %B = icmp slt i32 %A, %neg
- ret i1 %B
-; CHECK: ret i1 true
-}
-
define i1 @udiv1(i32 %X) {
; CHECK: @udiv1
%A = udiv i32 %X, 1000000
OpenPOWER on IntegriCloud