This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pr26026: udiv and umod optimization
On Fri, Feb 03, 2006 at 04:10:26PM +0000, Paul Brook wrote:
> > Can we be sure that this assumption is safe in _all_ the languages
> > that gcc supports? I get worried when C-isms creep into generic
> > optimizers.
>
> I think we already make this assumption in other places, not least when
> expanding to RTL.
Yes, see expmed.c:expand_divmod where the analogous case of unsigned div
or mod by a constant power of two is simplified.
--
Alan Modra
IBM OzLabs - Linux Technology Centre