Reassociate: cannot negate a INT_MIN value
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 11 Feb 2015 19:54:44 +0000 (19:54 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 11 Feb 2015 19:54:44 +0000 (19:54 +0000)
commit23af697ae6b7217ac10f81ac8b95625c4ff42ecc
treeb7442f96c3a765fb46f058ccf305471353b4ca34
parent293dfe59a5cfb6f3cad5a8efb35b1f9ac1dfe6e9
Reassociate: cannot negate a INT_MIN value

Summary:
When trying to canonicalize negative constants out of
multiplication expressions, we need to check that the
constant is not INT_MIN which cannot be negated.

Reviewers: mcrosier

Reviewed By: mcrosier

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7286

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/min_int.ll [new file with mode: 0644]