diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-06 16:59:37 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-06 16:59:37 +0000 |
commit | d5a403fb80c69e2bc56e4dda0afb5ef0b9e31e4a (patch) | |
tree | bf8fd3777a6d062334510cd2e21acbdfc66aebe3 /llvm/lib/ProfileData | |
parent | cfe786a19567424b04206bea5b5f1817fe9041b4 (diff) | |
download | bcm5719-llvm-d5a403fb80c69e2bc56e4dda0afb5ef0b9e31e4a.tar.gz bcm5719-llvm-d5a403fb80c69e2bc56e4dda0afb5ef0b9e31e4a.zip |
[ConstantRange] Add srem() support
Add support for srem() to ConstantRange so we can use it in LVI. For
srem the sign of the result matches the sign of the LHS. For the RHS
only the absolute value is important. Apart from that the logic is
like urem.
Just like for urem this is only an approximate implementation. The tests
check a few specific cases and run an exhaustive test for conservative
correctness (but not exactness).
Differential Revision: https://reviews.llvm.org/D61207
llvm-svn: 360055
Diffstat (limited to 'llvm/lib/ProfileData')
0 files changed, 0 insertions, 0 deletions