[SH, committeð] PR 60884 - reduce code size of inlined strlen

Oleg Endo oleg.endo@t-online.de
Wed May 7 20:18:00 GMT 2014


Hi,

The attached patch reduces the code size of inlined builtin strlen
functions on SH a little bit.
Tested on r210083 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, except for gcc.target/sh/pr53976-1.c on SH2 and
SH2A.  Using builtin strlen for checking the sett/clrt optimization pass
was a bit inappropriate in this case.

Committed as r210187.

Cheers,
Oleg

gcc/ChangeLog:
	PR target/60884
	* config/sh/sh-mem.cc (sh_expand_strlen): Use loop when emitting
	unrolled byte insns.  Emit address increments after move insns.

gcc/testsuite/ChangeLog:
	PR target/60884
	* gcc.target/sh/pr53976-1.c (test_02): Remove inappropriate test case.
	(test_03): Rename to test_02.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_strlen00.patch
Type: text/x-patch
Size: 2734 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140507/9ad5a25f/attachment.bin>


More information about the Gcc-patches mailing list