3.6.1 patch nomination: r233312 - Fix rare case where APInt divide algorithm applied un-needed transformation.

Paweł Bylica chfast at gmail.com
Thu Apr 30 15:13:30 PDT 2015


Hi Tom,

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.

Paweł


On Thu, Apr 30, 2015, 23:12 Tom Stellard <tom at stellard.net> wrote:

Ping.

It's hard to tell from the commit message, does this fix a bug, or is
it an optimization?


 Yaron, Chandler, do either of you think this is OK for llvm 3.6?

Thanks,
Tom

On Fri, Mar 27, 2015 at 01:39:33PM +0000, Paweł Bylica wrote:
> Hi Chandler, Yaron & Tom,
>
> r233312:
>
> > Author: yrnkrn
> > Date: Thu Mar 26 14:45:19 2015
> > New Revision: 233312
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=233312&view=rev
> > Log:
> > Fix rare case where APInt divide algorithm applied un-needed
> > transformation.
> >
> > APInt uses Knuth's D algorithm for long division. In rare cases the
> > implementation applied a transformation that was not needed.
> >
> > Added unit tests for long division. KnuthDiv() procedure is fully
covered.
> > There is a case in APInt::divide() that I believe is never used (marked
> > with
> > a comment) as all users of divide() handle trivial cases earlier.
> >
> > Patch by Pawel Bylica!
> >
> >   http://reviews.llvm.org/D8448
> >
> >
> > Modified:
> >     llvm/trunk/lib/Support/APInt.cpp
> >     llvm/trunk/unittests/ADT/APIntTest.cpp
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150430/3d406979/attachment.html>


More information about the llvm-commits mailing list