This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch RFC] SH: PR target/21623


Hi,

PR target/21623 is a 4.0/4.1 regression that I could reproduce
only with -O. The compiler claims for moving from the T register
to the FP register:

foo2.i:78: error: insn does not satisfy its constraints:
(insn 190 188 275 24 (set (reg/v:SI 76 fr12 [orig:169 n ] [169])
        (reg:SI 147 t)) 129 {movsi_ie} (insn_list:REG_DEP_TRUE 188 (nil))
    (nil))

I can't find any reload information for this insn in the .greg
dump and it seems that the appended patch makes the reload happen
on this insn.  I'm not sure if this is in the right direction and
even if so, 9 is the appropriate cost value.
The patch is tested with bootstrap and the toplevel "make -k check"
without new failures on sh4-unknown-linux-gnu.

Regards,
	kaz
--
:ADDPATCH target:

	PR target/21623
	* config/sh/sh.c (sh_register_move_cost): Add case for moving
	from T_REGS to FP register class.

--- ORIG/gcc/gcc/config/sh/sh.c	2005-09-07 06:16:56.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c	2005-09-22 16:19:22.000000000 +0900
@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
       && REGCLASS_HAS_FP_REG (dstclass))
     return 4;
 
+  if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
+    return 9;
+
   if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
       || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
     return 9;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]