<div dir="ltr">Seems fine to me but I'm not code owner of InstCombine.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 5:55 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Should we merge this to 3.7? David, what do you think?<br>
<br>
On Tue, Aug 11, 2015 at 2:33 PM, Sanjoy Das via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: sanjoy<br>
> Date: Tue Aug 11 16:33:55 2015<br>
> New Revision: 244676<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=244676&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=244676&view=rev</a><br>
> Log:<br>
> Fix PR24354.<br>
><br>
> `InstCombiner::OptimizeOverflowCheck` was asserting an<br>
> invariant (operands to binary operations are ordered by decreasing<br>
> complexity) that wasn't really an invariant.  Fix this by instead having<br>
> `InstCombiner::OptimizeOverflowCheck` establish the invariant if it does<br>
> not hold.<br>
><br>
> Added:<br>
>     llvm/trunk/test/Transforms/InstCombine/pr24354.ll<br>
> Modified:<br>
>     llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp<br>
</blockquote></div><br></div>