forked from OSchip/llvm-project
parent
bd25b8507c
commit
de89b507dd
|
@ -5340,8 +5340,8 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
|
|||
return ReplaceInstUsesWith(I, ConstantInt::getFalse());
|
||||
if (RHSVal == Max) // A <s MAX -> A != MAX
|
||||
return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
|
||||
if (RHSVal == Min-1) // A <s MIN+1 -> A == MIN
|
||||
return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
|
||||
if (RHSVal == Min+1) // A <s MIN+1 -> A == MIN
|
||||
return new ICmpInst(ICmpInst::ICMP_EQ, Op0, Op1);
|
||||
break;
|
||||
case ICmpInst::ICMP_SGT:
|
||||
if (Min.sgt(RHSVal)) // A >s C -> true iff min(A) > C
|
||||
|
|
Loading…
Reference in New Issue