diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-04-09 23:52:13 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-04-09 23:52:13 +0000 |
| commit | 467b69cabb57d3600323c48908b4537a873f0e0d (patch) | |
| tree | 3dd332974fce89bd3f0fb19acdcb128e08f3f59b /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | ec0020433ba206806db62ddb726dc16a53dd1323 (diff) | |
| download | bcm5719-llvm-467b69cabb57d3600323c48908b4537a873f0e0d.tar.gz bcm5719-llvm-467b69cabb57d3600323c48908b4537a873f0e0d.zip | |
Strengthen the boundary conditions of this fold, implementing
InstCombine/set.ll:test25
llvm-svn: 35852
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 62f2b5afd02..c8ec52ef8d0 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4741,13 +4741,13 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { case ICmpInst::ICMP_ULT: if (Max.ult(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getTrue()); - if (Min.ugt(RHSVal)) + if (Min.uge(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getFalse()); break; case ICmpInst::ICMP_UGT: if (Min.ugt(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getTrue()); - if (Max.ult(RHSVal)) + if (Max.ule(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getFalse()); break; case ICmpInst::ICMP_SLT: @@ -4759,7 +4759,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { case ICmpInst::ICMP_SGT: if (Min.sgt(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getTrue()); - if (Max.slt(RHSVal)) + if (Max.sle(RHSVal)) return ReplaceInstUsesWith(I, ConstantInt::getFalse()); break; } |

