[SH] PR 54236 - Improve addc/subc utilization

Oleg Endo oleg.endo@t-online.de
Thu Aug 16 19:12:00 GMT 2012


Hello,

The attached patch improves the utilization of the addc and subc
instructions as mentioned in the PR.
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/-mb}"

and no new failures.
I've also briefly checked the CSiBE result-size for 'm4-single -ml -O2
-mpretend-cmove'.  There is a little bit of noise here and there due to
differences in insn scheduling/ordering.  Looking at some parts of
mpeg2dec, the new insn sequences seem to be beneficial for a couple of
functions.
OK?

Cheers,
Oleg

ChangeLog:

	PR target/54236
	* config/sh/sh.md (addc): Add commutative modifier.
	(*addc, *minus_plus_one, *subc, *negc): New insns and splits.

testsuite/ChangeLog:

	PR target/54236
	* gcc.target/sh/pr54236-1.c: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_pr54236_1.patch
Type: text/x-patch
Size: 8275 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120816/5afd5e4c/attachment.bin>


More information about the Gcc-patches mailing list