diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-06-17 03:59:17 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-06-17 03:59:17 +0000 | 
| commit | 2ceb6ee576c56e9b85982cb3f37acf73b5a7e121 (patch) | |
| tree | 401bf564175330d04a2c710160de06185ecd371b /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | e708353d0404b3c59a8ef3431d17e6da6e7128a6 (diff) | |
| download | bcm5719-llvm-2ceb6ee576c56e9b85982cb3f37acf73b5a7e121.tar.gz bcm5719-llvm-2ceb6ee576c56e9b85982cb3f37acf73b5a7e121.zip  | |
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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index d2827af3d74..83998c8bc2d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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;  | 

