This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49305] SH Target: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
- From: "kkojima at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 14:03:34 +0000
- Subject: [Bug target/49305] SH Target: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
- Auto-submitted: auto-generated
- References: <bug-49305-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49305
--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2011-06-08 14:03:02 UTC ---
It's my fault after all. The patch r174586 should check the mode
parameter too. Without checking mode, insn-recog routines are
confused and the combine pass makes insns with wrong insn_code.
Now I'm testing
--- ORIG/trunk/gcc/config/sh/predicates.md 2011-06-04 10:16:51.000000000
+0900
+++ trunk/gcc/config/sh/predicates.md 2011-06-08 18:55:09.000000000 +0900
@@ -395,6 +395,7 @@
}
if ((mode == QImode || mode == HImode)
+ && mode == GET_MODE (op)
&& (MEM_P (op)
|| (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op)))))
{
@@ -432,6 +433,7 @@
return 0;
if ((mode == QImode || mode == HImode)
+ && mode == GET_MODE (op)
&& (MEM_P (op)
|| (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op)))))
{
I'll apply it if it survives the tests on sh-elf and sh4-unknown-linux-gnu
and put the patch in #1 into my TODO list.