mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-02 07:30:52 +00:00
Fix a copy+paste bug that Duncan spotted. For several
cases it was still getting lucky and detecting overflow but it was clearly incorrect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4086906a0f
commit
bcb37fd22f
@ -4699,7 +4699,7 @@ static bool AddWithOverflow(ConstantInt *&Result, ConstantInt *In1,
|
|||||||
/// overflowed for this type.
|
/// overflowed for this type.
|
||||||
static bool SubWithOverflow(ConstantInt *&Result, ConstantInt *In1,
|
static bool SubWithOverflow(ConstantInt *&Result, ConstantInt *In1,
|
||||||
ConstantInt *In2, bool IsSigned = false) {
|
ConstantInt *In2, bool IsSigned = false) {
|
||||||
Result = cast<ConstantInt>(Add(In1, In2));
|
Result = cast<ConstantInt>(Subtract(In1, In2));
|
||||||
|
|
||||||
if (IsSigned)
|
if (IsSigned)
|
||||||
if (In2->getValue().isNegative())
|
if (In2->getValue().isNegative())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user