This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Legitimacy of replacing divide-by-power-of-2 with right shifts.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]