On Sun, 29 May 2016, Marc Glisse wrote:
> On Sat, 28 May 2016, Alexander Monakov wrote:
> > For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether
> > 'A*B'
> > overflows (or 'B && A > -1 / B' if B may be zero). Let's optimize it to an
> > invocation of __builtin_mul_overflow to
On Mon, May 30, 2016 at 1:15 PM, Jakub Jelinek wrote:
> On Mon, May 30, 2016 at 12:55:22PM +0200, Richard Biener wrote:
>> CCing Jakub who wrote the tree-ssa-math-opts.c code last year. I remember we
>> discussed using match.pd but ended up with not doing it there but I
>> don't remember
>> the e
On Mon, May 30, 2016 at 12:55:22PM +0200, Richard Biener wrote:
> CCing Jakub who wrote the tree-ssa-math-opts.c code last year. I remember we
> discussed using match.pd but ended up with not doing it there but I
> don't remember
> the exact reason.
richi: does match.pd support turning non-call
On Mon, May 30, 2016 at 9:14 AM, Alexander Monakov wrote:
> On Sun, 29 May 2016, Marc Glisse wrote:
>> On Sat, 28 May 2016, Alexander Monakov wrote:
>>
>> > For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether
>> > 'A*B'
>> > overflows (or 'B && A > -1 / B' if B may be zero).
On Sun, 29 May 2016, Marc Glisse wrote:
> On Sat, 28 May 2016, Alexander Monakov wrote:
>
> > For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether
> > 'A*B'
> > overflows (or 'B && A > -1 / B' if B may be zero). Let's optimize it to an
> > invocation of __builtin_mul_overflow
On Sat, 28 May 2016, Alexander Monakov wrote:
For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether 'A*B'
overflows (or 'B && A > -1 / B' if B may be zero). Let's optimize it to an
invocation of __builtin_mul_overflow to avoid the divide operation.
I forgot to ask earlier:
On Sat, 28 May 2016, Alexander Monakov wrote:
For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether 'A*B'
overflows (or 'B && A > -1 / B' if B may be zero). Let's optimize it to an
invocation of __builtin_mul_overflow to avoid the divide operation.
Hmm, that division by zer
Hello,
For unsigned A, B, 'A > -1 / B' is a nice predicate for checking whether 'A*B'
overflows (or 'B && A > -1 / B' if B may be zero). Let's optimize it to an
invocation of __builtin_mul_overflow to avoid the divide operation.
The following patch implements that as a match.pd transformation.