[SH] PR 49263 - underutilized "TST #imm, R0" instruction

Oleg Endo oleg.endo@t-online.de
Sat Oct 15 08:15:00 GMT 2011


Hello,

the attached patch is the same as the last proposed patch in the PR but
with some fixed formatting and comments. Hope it's fine like that.

Tested against trunk rev 179778 with 

make -k -j4 check RUNTESTFLAGS="--target_board=sh-sim
\{-m2,-m2a-single,-m4-single,-m4a-single\}\{-mb,-ml\}"

and no new failures (ignoring the impossible -m2a-single -mb
combination).

Cheers,
Oleg

ChangeLog:

2011-10-15  Oleg Endo  <oleg.endo@t-online.de>

	PR target/49263
	* config/sh/sh.h (ZERO_EXTRACT_ANDMASK): New macro.
	* config/sh/sh.c (sh_rtx_costs): Add test instruction case.
	* config/sh/sh.md (tstsi_t): Name existing insn.  Make inner
	and instruction commutative.
	(tsthi_t, tstqi_t, tstqi_t_zero, tstsi_t_and_not,
	tstsi_t_zero_extract_eq, tstsi_t_zero_extract_xor,
	tstsi_t_zero_extract_subreg_xor_little,
	tstsi_t_zero_extract_subreg_xor_big): New insns.
	(*movsicc_t_false, *movsicc_t_true): Replace space with tab in
	asm output.
	(*andsi_compact): Reorder alternatives so that K08 is considered
	first.

testsuite/ChangeLog:

2011-10-15  Oleg Endo  <oleg.endo@t-online.de>

	PR target/49263
	* gcc.target/sh/pr49263.c: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_tst_imm_2_1.patch
Type: text/x-patch
Size: 12914 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111015/5be35352/attachment.bin>


More information about the Gcc-patches mailing list