Re: [PATCH] Improve rotation by mode bitsize - 1 (take 2)

2013-05-14 Thread Richard Biener
On Mon, 13 May 2013, Jakub Jelinek wrote: > On Fri, May 10, 2013 at 07:15:38PM +0200, Jan Hubicka wrote: > > It seems to me that it is not different from normalizing reg-10 into > > reg+(-10) > > we do for years (and for good reason). It is still target preference when > > use > > add and when

Re: [PATCH] Improve rotation by mode bitsize - 1 (take 2)

2013-05-13 Thread Uros Bizjak
On Mon, May 13, 2013 at 6:43 PM, Jakub Jelinek wrote: > On Fri, May 10, 2013 at 07:15:38PM +0200, Jan Hubicka wrote: >> It seems to me that it is not different from normalizing reg-10 into >> reg+(-10) >> we do for years (and for good reason). It is still target preference when >> use >> add an

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-10 Thread Jan Hubicka
> Hi! > > Note, the patch has been already committed. > > On Fri, May 10, 2013 at 03:48:50PM +0200, Jan Hubicka wrote: > > Going this route you will also need to update > > > > [(set_attr "type" "rotate1") > >(set (attr "length_immediate") > > (if_then_else > >(and (match_oper

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-10 Thread Jakub Jelinek
Hi! Note, the patch has been already committed. On Fri, May 10, 2013 at 03:48:50PM +0200, Jan Hubicka wrote: > Going this route you will also need to update > > [(set_attr "type" "rotate1") >(set (attr "length_immediate") > (if_then_else >(and (match_operand 1 "const1_operand"

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-10 Thread Jan Hubicka
> Hi! > > 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 > The following pa

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-10 Thread Richard Biener
On Thu, May 9, 2013 at 10:24 PM, Jakub Jelinek wrote: > On Thu, May 09, 2013 at 09:47:49PM +0200, Uros Bizjak wrote: >> On Thu, May 9, 2013 at 8:45 PM, Jakub Jelinek wrote: >> > 2013-05-09 Jakub Jelinek >> > >> > * config/i386/i386.md (rotateinv): New code attr. >> > (*3_1, *si

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-09 Thread Jakub Jelinek
On Thu, May 09, 2013 at 09:47:49PM +0200, Uros Bizjak wrote: > On Thu, May 9, 2013 at 8:45 PM, Jakub Jelinek wrote: > > 2013-05-09 Jakub Jelinek > > > > * config/i386/i386.md (rotateinv): New code attr. > > (*3_1, *si3_1_zext, > > *qi3_1_slp): Emit rorl %eax instead of >

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-09 Thread Uros Bizjak
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

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-09 Thread Jakub Jelinek
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 t

Re: [PATCH] Improve rotation by mode bitsize - 1

2013-05-09 Thread Steven Bosscher
On Thu, May 9, 2013 at 8:45 PM, Jakub Jelinek wrote: > Hi! > > 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 equi