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

Tom Stellard tom at stellard.net
Thu Apr 30 14:12:00 PDT 2015


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
> >




More information about the llvm-commits mailing list