[llvm-dev] Signed Division and InstCombine
Dilan Manatunga via llvm-dev
llvm-dev at lists.llvm.org
Tue May 31 16:02:20 PDT 2016
Just to verify, a 16-bit divion of INT16_MIN by -1 results in INT16_MIN
If the issue only occurs in this case, why aren't there checks to see if we
can simplify sdiv in cases where we know that numerator is not INT16_MIN or
the denominator is not -1. For example, we could simplify divides involving
one operand constants. Is it because this case is most likely rare?
On Tue, May 31, 2016 at 3:50 PM Tim Northover <t.p.northover at gmail.com>
> On 31 May 2016 at 15:42, Tim Northover <t.p.northover at gmail.com> wrote:
> > A 16-bit division of INT16_MIN by -1 is undefined behaviour but the
> > original ext/trunc version is well-defined as 0.
> Sorry, INT16_MIN again actually. The main point still stands though, I
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev