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

Paweł Bylica chfast at gmail.com
Sun May 3 23:38:46 PDT 2015


Hi again,

So the candidates are: r233312 and r235699. Both fixes big number division
in APInt.

I can perform the merge if accepted.

- Paweł Bylica

On Fri, May 1, 2015 at 3:30 AM Yaron Keren <yaron.keren at gmail.com> wrote:

> 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/20150504/6f831da7/attachment.html>


More information about the llvm-commits mailing list