mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-15 07:59:33 +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. llvm-svn: 56113
This commit is contained in:
parent
99be914c9a
commit
4ae5fa57b4
@ -4699,7 +4699,7 @@ static bool AddWithOverflow(ConstantInt *&Result, ConstantInt *In1,
|
||||
/// overflowed for this type.
|
||||
static bool SubWithOverflow(ConstantInt *&Result, ConstantInt *In1,
|
||||
ConstantInt *In2, bool IsSigned = false) {
|
||||
Result = cast<ConstantInt>(Add(In1, In2));
|
||||
Result = cast<ConstantInt>(Subtract(In1, In2));
|
||||
|
||||
if (IsSigned)
|
||||
if (In2->getValue().isNegative())
|
||||
|
Loading…
x
Reference in New Issue
Block a user