[Bug target/31022] [4.1/4.2/4.3 Regression] [SH4] internal compiler error with inline
kkojima at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 15 13:17:00 GMT 2007
------- Comment #1 from kkojima at gcc dot gnu dot org 2007-03-15 13:16 -------
I've confirmed that the trunk and 4.2 compilers ice on the testcase
and 4.0 doesn't fail. So this is a 4.1/4.2/4.3 regression.
In the problematic case, sh_adjust_cost takes SET_DEST (PATTERN (dep_insn))
where dep_insn is
(insn:HI 8 7 47 2 (parallel [
(set (reg:SF 2 r2 [orig:160 num ] [160])
(mem/c/i:SF (reg/f:SI 1 r1 [162]) [2 f+0 S4 A32]))
(use (reg/v:PSI 151 ))
(clobber (scratch:SI))
]) 202 {movsf_ie} (nil)
(nil))
and calls reg_overlap_mentioned_p with it as the first argument.
We can't use SET_DEST for parallel patterns directly. Now I'm
testing the patch below on the trunk.
--- ORIG/trunk/gcc/config/sh/sh.c 2007-03-10 16:04:12.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.c 2007-03-15 08:43:32.000000000 +0900
@@ -8966,7 +8966,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI
by 1 cycle. */
if (get_attr_type (insn) == TYPE_DYN_SHIFT
&& get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES
- && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)),
+ && reg_overlap_mentioned_p (SET_DEST (dep_set),
XEXP (SET_SRC (single_set (insn)),
1)))
cost++;
For the 4.1-branch, the patch will be
--- ORIG/gcc-4_1-branch/gcc/config/sh/sh.c 2006-10-23 20:35:45.000000000
+0900
+++ LOCAL/gcc-4_1-branch/gcc/config/sh/sh.c 2007-03-15 09:06:26.000000000
+0900
@@ -8477,7 +8477,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI
else if (TARGET_SH4
&& get_attr_type (insn) == TYPE_DYN_SHIFT
&& get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES
- && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)),
+ && reg_overlap_mentioned_p (SET_DEST (single_set (dep_insn)),
XEXP (SET_SRC (single_set (insn)),
1)))
cost++;
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.1.2 4.2.0 4.3.0
Known to work| |4.0.4
Last reconfirmed|0000-00-00 00:00:00 |2007-03-15 13:16:57
date| |
Summary|[SH4] internal compiler |[4.1/4.2/4.3 Regression]
|error with inline |[SH4] internal compiler
| |error with inline
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31022
More information about the Gcc-bugs
mailing list