mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
srem doesn't actually have the same resulting sign as its numerator, you could
also have a zero when numerator = denominator. Reverts parts of r126635 and r126637. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1348,16 +1348,6 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Instruction::SRem: {
|
||||
bool TrueIfSigned;
|
||||
if (LHSI->hasOneUse() &&
|
||||
isSignBitCheck(ICI.getPredicate(), RHS, TrueIfSigned)) {
|
||||
// srem has the same sign as its dividend so the divisor is irrelevant.
|
||||
return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), RHS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Simplify icmp_eq and icmp_ne instructions with integer constant RHS.
|
||||
|
Reference in New Issue
Block a user