[PATCH SH] Fix PR57108

Oleg Endo oleg.endo@t-online.de
Sun May 5 11:44:00 GMT 2013


Hi,

On Mon, 2013-04-29 at 11:31 +0200, Christian Bruel wrote:
> Hello,
> 
> This patches set the correct operand mode for tstsi_t_zero_extract_eq,
> to avoid reload generating a move between a constant and a void register.
> 
> Reg tested for sh-elf. No performance impact

Unfortunately after your patch the test case for PR 49263 showed some
failures for SH2A and SH4A ('tst #imm,R0' insn not utilized in some
cases).

The operand mode in the tstsi_t_zero_extract_eq pattern was void on
purpose to match any mode (at least QI HI SI DI).  The attached patch
fixes that.  
OK for trunk and 4.8 if it passes testing?  (I'd leave 4.7 alone since
it doesn't have the iterators.md).

(BTW, I think the test case for this PR should have went into c-torture
instead of target/sh ...)


Cheers,
Oleg

gcc/ChangeLog:

	PR target/57108
	* config/sh/sh.md (tstsi_t_zero_extract_eq): Use QIHISIDI mode 
	iterator.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_pr57108.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130505/1dfaf32a/attachment.bin>


More information about the Gcc-patches mailing list