<div dir="ltr">Just to verify, a 16-bit divion of INT16_MIN  by -1 results in INT16_MIN again? <br><br>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?<div><br></div><div>-Dilan</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 31, 2016 at 3:50 PM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 31 May 2016 at 15:42, Tim Northover <<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>> wrote:<br>
> A 16-bit division of INT16_MIN by -1 is undefined behaviour but the<br>
> original ext/trunc version is well-defined as 0.<br>
<br>
Sorry, INT16_MIN again actually. The main point still stands though, I think.<br>
<br>
Tim.<br>
</blockquote></div>