<div dir="ltr"><div>Hi Tim,<br></div>If:<br><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb">

<div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It means that the person who wrote the IR has guaranteed that there's<br>
no overflow (by some means) so LLVM can assume it during optimisation.<br></blockquote></div></div></blockquote><div>then</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In both cases the add with nsw can be removed in favour of the one<br>
without. Order is completely irrelevant for normal LLVM arithmetic<br>
instructions.<br>
</blockquote><br></div></div></blockquote></div>why can't we retain <i>add nsw</i> and remove <i>add </i>(in the example Cases)? Because there is a guarantee overflow wouldn't occur.<br><br></div><div class="gmail_extra">

Thanks,<br></div><div class="gmail_extra">-- <br>Rekha
</div></div></div></div>