Re: [SH] PR 54089 - Add support for rotcl instruction

2012-11-06 Thread Kaz Kojima
Oleg Endo wrote: > This patch adds support for SH's rotcl instruction. > While working on it, I've noticed that the DImode left shift by one insn > was not used anymore, and instead ended up as 'x + x'. This > transformation was happening before/during RTL expansion. The fix for > it was to adju

Re: [SH] PR 54089 - More rotcr, rotl, rotr

2012-09-25 Thread Kaz Kojima
Oleg Endo wrote: > This patch does some further improvements to the utilization of rotate > insns on SH. Tested on rev 191657 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > and no new failures. > > OK? OK. > (BTW, com

Re: [SH] PR 54089 - Add another rotcr case

2012-09-19 Thread Kaz Kojima
Oleg Endo wrote: > There is another opportunity where SH's rotcr insn can be used. > Tested on rev 191342 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK to install? OK. Regards, kaz

Re: [SH] PR 54089 - Improve software dynamic shifts

2012-09-10 Thread Kaz Kojima
Oleg Endo wrote: > This patch does two things... > > 1) The dynamic shift cost is set to be the same if HW dynamic shifts are > available. This improves code size for SH2A a little (-2 KByte on CSiBE > for -m2a-single -O2). > > 2) Improve code around library function calls for software dynamic

Re: [SH] PR 54089 - Logical right shifts

2012-08-22 Thread Kaz Kojima
Oleg Endo wrote: > This adapts SH's logical right shift patterns to work/look the same way > as left shift patterns. It mainly fixes a few issues with dynamic shift > insn selection. > Tested on rev 190580 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-

Re: [SH] PR 54089 - Add support for rotcr insn

2012-08-20 Thread Oleg Endo
On Mon, 2012-08-20 at 14:09 -0700, Gary Funck wrote: > > > > ChangeLog: > > > > PR target/50489 > > Above: that should be: PR target/54089. > > > * config/sh/sh.md (rotcr, *rotcr, shar, shlr): New insns and > > splits. > > (ashrdi3_k, lshrdi3_k): Rewrite as insn_and_split. > >

Re: [SH] PR 54089 - Add support for rotcr insn

2012-08-20 Thread Gary Funck
On 08/20/12 01:02:39, Oleg Endo wrote: > Hello, > > This adds support for SH's rotcr insn. > Tested on rev 190459 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? > > Cheers, > Oleg > > Chang

Re: [SH] PR 54089 - Add support for rotcr insn

2012-08-20 Thread Kaz Kojima
Oleg Endo wrote: > This adds support for SH's rotcr insn. > Tested on rev 190459 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? OK. Regards, kaz

Re: [SH] PR 54089

2012-08-16 Thread Kaz Kojima
Oleg Endo wrote: > This fixes the case where a dynamic shift would expand into a P27 shift > sequence that clobbers T_REG, which would result in wrong code. > Tested on rev 190396 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-m

Re: [SH] PR 54089 - Reinstate T_REG clobber for left shifts

2012-08-09 Thread Kaz Kojima
Oleg Endo wrote: > Removing the T_REG clobber from the left shift patterns entirely wasn't > such a good idea. Especially if dynamic shifts are not available > (anything < SH3) incorrect code may be generated. > The attached patch adds a T_REG clobbering version of the left shift > insn "ashlsi3_

Re: [SH] PR 54089 - Convert dyn left shifts to constant shifts

2012-07-29 Thread Kaz Kojima
Oleg Endo wrote: > In cases where dynamic shifts are available, the ashlsi3_d pattern is > picked first and never converted back to a short sequence of constant > shifts. Preferring short constant shift sequences over dynamic shifts > can potentially reduce the need for an extra register to hold

Re: [SH] PR 54089 - adjust shift costs

2012-07-26 Thread Kaz Kojima
Oleg Endo wrote: > This adjusts the cost calculations for shifts on SH. > I tried out Richard's advice > ( http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01206.html ) > and it seems to work OK to just leave out the mentioned CONST_INT_P > case. > Tested on rev 189870 with > make -k check RUNTESTFLAG

Re: [SH] PR 54089 - Reorg left shifts

2012-07-25 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch reorganizes the SH left shift patterns. The final > generated shift insns don't differ much, but it seems to have some > positive side effects on register allocation in some cases. > > Tested with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/