This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve rotation by mode bitsize - 1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 May 2013 20:54:02 +0200
- Subject: Re: [PATCH] Improve rotation by mode bitsize - 1
- References: <20130509184556 dot GI1377 at tucnak dot redhat dot com> <CABu31nMJk6+X=y-Je_gt0hxMsnjC2oNda9Jy2WU+BY28E6zCXg at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, May 09, 2013 at 08:50:59PM +0200, Steven Bosscher wrote:
> On Thu, May 9, 2013 at 8:45 PM, Jakub Jelinek wrote:
> > This is something I've noticed while working on the rotate recognizer
> > patch I've just posted. We emit say
> > roll %eax
> > instead of
> > roll $1, %eax
> > because the former is shorter, but emit
> > roll $31, %eax
> > instead of the equivalent, but shorter
> > rorl %eax
>
> Wouldn't this be better done as one or more peephole2s?
Given that the output routine is in all cases already C code,
I think peephole2s would be only slower and more code.
Jakub