Legitimacy of replacing divide-by-power-of-2 with right shifts.
Alan Modra
amodra@bigpond.net.au
Fri Apr 21 00:10:00 GMT 2006
On Thu, Apr 20, 2006 at 04:52:14PM +0100, Dave Korn wrote:
> Yet it would seem to me at first glance that, since dividing unsigned by an
> exact power-of-2 can be optimised to a right shift, and since we can deduce
You might like to build yourself a new compiler. :)
2006-04-19 Alan Modra <amodra@bigpond.net.au>
PR rtl-optimization/26026
* fold-const.c (fold_binary): Optimize div and mod where the divisor
is a known power of two shifted left a variable amount.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Gcc
mailing list