<p dir="ltr">Hi Tom, </p>
<p dir="ltr">It is a fix. However I found another bug in the algorithm. That had been fixed also. I think it is good idea to merge both fixes or nothing. I don't have any preferences.</p>
<p dir="ltr">Paweł<br>
</p>
<p dir="ltr"><br>
On Thu, Apr 30, 2015, 23:12 Tom Stellard <<a href="mailto:tom@stellard.net">tom@stellard.net</a>> wrote:</p>
<blockquote><p dir="ltr">Ping.</p>
<p dir="ltr">It's hard to tell from the commit message, does this fix a bug, or is<br>
it an optimization?</p>
</blockquote>
<p dir="ltr"><br>
</p>
<blockquote><p dir="ltr"></p>
<p dir="ltr">Yaron, Chandler, do either of you think this is OK for llvm 3.6?</p>
<p dir="ltr">Thanks,<br>
Tom</p>
<p dir="ltr">On Fri, Mar 27, 2015 at 01:39:33PM +0000, Paweł Bylica wrote:<br>
> Hi Chandler, Yaron & Tom,<br>
><br>
> r233312:<br>
><br>
> > Author: yrnkrn<br>
> > Date: Thu Mar 26 14:45:19 2015<br>
> > New Revision: 233312<br>
> ><br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=233312&view=rev">http://llvm.org/viewvc/llvm-project?rev=233312&view=rev</a><br>
> > Log:<br>
> > Fix rare case where APInt divide algorithm applied un-needed<br>
> > transformation.<br>
> ><br>
> > APInt uses Knuth's D algorithm for long division. In rare cases the<br>
> > implementation applied a transformation that was not needed.<br>
> ><br>
> > Added unit tests for long division. KnuthDiv() procedure is fully covered.<br>
> > There is a case in APInt::divide() that I believe is never used (marked<br>
> > with<br>
> > a comment) as all users of divide() handle trivial cases earlier.<br>
> ><br>
> > Patch by Pawel Bylica!<br>
> ><br>
> >   <a href="http://reviews.llvm.org/D8448">http://reviews.llvm.org/D8448</a><br>
> ><br>
> ><br>
> > Modified:<br>
> >     llvm/trunk/lib/Support/APInt.cpp<br>
> >     llvm/trunk/unittests/ADT/APIntTest.cpp<br>
> ><br>
</p>
</blockquote>
<p dir="ltr"><br>
</p>