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

Yaron Keren yaron.keren at gmail.com
Thu Apr 30 18:30:13 PDT 2015


r235699 is Pawel's other fix for APInt division.

2015-05-01 3:46 GMT+03:00 Tom Stellard <tom at stellard.net>:

> Hi,
>
> Which commit is the other fix?
>
> -Tom
>
> On Thu, Apr 30, 2015 at 10:13:30PM +0000, Paweł Bylica wrote:
> > 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/20150501/818fccad/attachment.html>


More information about the llvm-commits mailing list