mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 22:45:05 +00:00
Strengthen the boundary conditions of this fold, implementing
InstCombine/set.ll:test25 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5c05fa0d0b
commit
81973ef7cb
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user