mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
a missed optimization that Eli spotted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53449 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f9685ac68e
commit
d01bee7170
@ -5336,7 +5336,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
|
||||
case ICmpInst::ICMP_SLT:
|
||||
if (Max.slt(RHSVal)) // A <s C -> true iff max(A) < C
|
||||
return ReplaceInstUsesWith(I, ConstantInt::getTrue());
|
||||
if (Min.sgt(RHSVal)) // A <s C -> false iff min(A) >= C
|
||||
if (Min.sge(RHSVal)) // A <s C -> false iff min(A) >= C
|
||||
return ReplaceInstUsesWith(I, ConstantInt::getFalse());
|
||||
if (RHSVal == Max) // A <s MAX -> A != MAX
|
||||
return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
|
||||
|
Loading…
Reference in New Issue
Block a user