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

llvm-svn: 22236
This commit is contained in:
Chris Lattner 2005-06-17 03:59:17 +00:00
parent e708353d04
commit 2ceb6ee576
1 changed files with 1 additions and 2 deletions

View File

@ -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;