This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pr26026: udiv and umod optimization
- From: Jeffrey A Law <law at redhat dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Apr 2006 11:33:08 -0600
- Subject: Re: pr26026: udiv and umod optimization
- References: <20060203122932.GB15321@bubble.grove.modra.org> <17379.30955.436649.904253@zapata.pink> <43E3835F.2090205@lu.unisi.ch> <20060205023311.GJ15321@bubble.grove.modra.org> <1139250389.3012.9.camel@localhost.localdomain> <20060209111511.GA18809@bubble.grove.modra.org> <1139499321.2874.110.camel@localhost.localdomain> <20060211055331.GD18809@bubble.grove.modra.org> <1142294192.22105.19.camel@localhost.localdomain> <20060324005314.GA16236@bubble.grove.modra.org>
- Reply-to: law at redhat dot com
On Fri, 2006-03-24 at 11:23 +1030, Alan Modra wrote:
> On Mon, Mar 13, 2006 at 04:56:32PM -0700, Jeffrey A Law wrote:
> > Major sigh. I suggest we table the vrp enhancement and just rely
> > on your code in fold-const.c and the existing DIV/MOD optimization
> > support in tree-vrp.c
>
> Here's the fold-const implementation.
> :ADDPATCH middle-end:
>
> Bootstrapped and regression tested powerpc64-linux. OK for mainline?
>
> 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.
Approved. Please install.
Thanks, and again, sorry for the massive delays.
jeff