aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-06-17 03:59:17 +0000
committerChris Lattner <sabre@nondot.org>2005-06-17 03:59:17 +0000
commite88b7533be3c0e6072b3a3d672bae464f33b090a (patch)
tree24e9005882997c54a69e4f376c1d39a8fda88f6d /lib/Transforms
parent32545518f24eef49cc307073a582d0ddc6b2f843 (diff)
This is not true: (X != 13 | X < 15) -> X < 15
It is actually always true. This fixes PR586 and Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index d2827af3d7..83998c8bc2 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1967,12 +1967,11 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
case Instruction::SetNE:
switch (RHSCC) {
default: assert(0 && "Unknown integer condition code!");
- case Instruction::SetLT: // (X != 13 | X < 15) -> X < 15
- return ReplaceInstUsesWith(I, RHS);
case Instruction::SetEQ: // (X != 13 | X == 15) -> X != 13
case Instruction::SetGT: // (X != 13 | X > 15) -> X != 13
return ReplaceInstUsesWith(I, LHS);
case Instruction::SetNE: // (X != 13 | X != 15) -> true
+ case Instruction::SetLT: // (X != 13 | X < 15) -> true
return ReplaceInstUsesWith(I, ConstantBool::True);
}
break;