commit | 00428878bb65cbf2c5620bccda19706cec24c6b9 | [log] [tgz] |
---|---|---|
author | David Majnemer <david.majnemer@gmail.com> | Fri Jul 04 00:23:39 2014 +0000 |
committer | David Majnemer <david.majnemer@gmail.com> | Fri Jul 04 00:23:39 2014 +0000 |
tree | ff6651ab2fc10fb1001810ea24b576793f5dc7ae | |
parent | 5c58257d39c5061189269e33b49c90cc1e1e57d3 [diff] |
InstSimplify: Fix a bug when INT_MIN is in a sdiv When INT_MIN is the numerator in a sdiv, we would not properly handle overflow when calculating the bounds of possible values; abs(INT_MIN) is not a meaningful number. Instead, check and handle INT_MIN by reasoning that the largest value is INT_MIN/-2 and the smallest value is INT_MIN. This fixes PR20199. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212307 91177308-0d34-0410-b5e6-96231b3b80d8