This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Legitimacy of replacing divide-by-power-of-2 with right shifts.
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 21 Apr 2006 09:40:04 +0930
- Subject: Re: Legitimacy of replacing divide-by-power-of-2 with right shifts.
- References: <01af01c66492$64f505a0$a501a8c0@CAM.ARTIMI.COM>
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