diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-04 00:23:39 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-04 00:23:39 +0000 |
commit | 651ed5e8fdf05878088b2f7579735083775e43e3 (patch) | |
tree | 4ab80da3276fdc4b4abc5d3c51767869d97b625a /llvm/lib/Target/TargetSubtargetInfo.cpp | |
parent | 4576c115ac8bdca6122ba6b35b5c9dff624973f3 (diff) | |
download | bcm5719-llvm-651ed5e8fdf05878088b2f7579735083775e43e3.tar.gz bcm5719-llvm-651ed5e8fdf05878088b2f7579735083775e43e3.zip |
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.
llvm-svn: 212307
Diffstat (limited to 'llvm/lib/Target/TargetSubtargetInfo.cpp')
0 files changed, 0 insertions, 0 deletions