[SH] PR 54236 - add some more addc patterns

Oleg Endo oleg.endo@t-online.de
Tue Oct 29 21:36:00 GMT 2013


On Tue, 2013-10-29 at 11:43 +0900, Kaz Kojima wrote:
> Oleg Endo <oleg.endo@t-online.de> wrote:
> > This adds some more patterns to utilize the SH addc instruction.
> > Tested on rev 204111 with
> > make -k check RUNTESTFLAGS="--target_board=sh-sim
> > \{-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4-single/-ml,-m4/-mb,-m4-single/-mb}"
> > 
> > and no new failures.
> > OK for trunk?
> 
> Using same "*addc" for 7 different insn_and_split looks a bit
> confusing.  It might be better to add some sufficies like
> _r_1, _r_r_1, _r_1_r, _2r_1, _r_31, _r_r_31, _2r_31.

True.  While at it, I've also changed the names also of the other
existing *addc patterns.  Attached patch was committed as rev 204180.

Cheers,
Oleg

gcc/ChangeLog:
	PR target/54236
	* config/sh/sh.md (*addc): Rename existing variations to ...
	(*addc_r_r_1, *addc_2r_1, *addc_r_1): ... these.
	(*addc_r_lsb, *addc_r_r_lsb, *addc_r_lsb_r, *addc_2r_lsb, *addc_r_msb,
	*addc_r_r_msb, *addc_2r_msb): New insn_and_split patterns.
	* config/sh/sh.c (addsubcosts): Handle some addc special cases.

testsuite/ChangeLog:
	PR target/54236
	* gcc.target/sh/pr54236-2: New.
	* gcc.target/sh/pr54089-6: Add another rotl special case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_pr54236_4.patch
Type: text/x-patch
Size: 12578 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131029/b56044a9/attachment.bin>


More information about the Gcc-patches mailing list