mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
InstCombine: Use isAllOnesValue() instead of explicit -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188563 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b89f197713
commit
bff3c587f6
@ -851,7 +851,7 @@ Value *InstCombiner::FoldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS) {
|
||||
case ICmpInst::ICMP_NE:
|
||||
// Special case to get the ordering right when the values wrap around
|
||||
// zero.
|
||||
if (LHSCst->getValue() == 0 && RHSCst->getValue() == -1)
|
||||
if (LHSCst->getValue() == 0 && RHSCst->getValue().isAllOnesValue())
|
||||
std::swap(LHSCst, RHSCst);
|
||||
if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1
|
||||
Constant *AddCST = ConstantExpr::getNeg(LHSCst);
|
||||
|
Loading…
x
Reference in New Issue
Block a user