This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SH] PR 54089 - Convert dyn left shifts to constant shifts
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: oleg dot endo at t-online dot de
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Jul 2012 12:14:46 +0900 (JST)
- Subject: Re: [SH] PR 54089 - Convert dyn left shifts to constant shifts
- References: <1343602726.2304.16.camel@yam-132-YW-E178-FTW>
Oleg Endo <oleg.endo@t-online.de> 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 the shift
> count. CSiBE shows some code size increases and decreases with this
> patch. The increases seem to be due to some unlucky register
> allocations. Overall there is a small decrease (-312 bytes on the whole
> set for '-O2 -m4-single -ml -mpretend-cmove).
>
> Tested on rev 189916 with
> make -k check RUNTESTFLAGS="--target_board=sh-sim
> \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,
> -m4-single/-ml,-m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"
>
> and no new failures.
>
> OK?
OK.
Regards,
kaz