diff options
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 46ac762b0a..5a9d1de2e3 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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()) |