diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 20:38:45 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 20:38:45 +0000 |
commit | af9180fd0409431ce1a05f69212483a4d1c5c6c0 (patch) | |
tree | 0842046da2261b17b8164e041de740207d550b94 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 2474e816cc0242d44dae2e7f8f7836f7b3c9adc9 (diff) | |
download | llvm-af9180fd0409431ce1a05f69212483a4d1c5c6c0.zip llvm-af9180fd0409431ce1a05f69212483a4d1c5c6c0.tar.gz llvm-af9180fd0409431ce1a05f69212483a4d1c5c6c0.tar.bz2 |
InstSimplify: Correct sdiv x / -1
Determining the bounds of x/ -1 would start off with us dividing it by
INT_MIN. Suffice to say, this would not work very well.
Instead, handle it upfront by checking for -1 and mapping it to the
range: [INT_MIN + 1, INT_MAX. This means that the result of our
division can be any value other than INT_MIN.
llvm-svn: 212981
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions