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 avoid the divide operation.
> 
[snip]
> Any plan on optimizing the 'B && ovf' form?

Not in the immediate future; I don't have a good approach in mind to do that.

(if I get back to this topic I'd try to CSE the product with the IFN result)

Thanks for the discussion and help -- I've applied the patch.

Alexander

Reply via email to