This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49238] [4.5/4.6/4.7 Regression] [SH] ICE in extract_insn, at recog.c:2113
- 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: Tue, 31 May 2011 14:34:28 +0000
- Subject: [Bug target/49238] [4.5/4.6/4.7 Regression] [SH] ICE in extract_insn, at recog.c:2113
- Auto-submitted: auto-generated
- References: <bug-49238-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49238
Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.4.5
Keywords| |ice-on-valid-code
Last reconfirmed| |2011.05.31 14:32:50
CC| |kkojima at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|ICE in extract_insn, at |[4.5/4.6/4.7 Regression]
|recog.c:2113 |[SH] ICE in extract_insn,
| |at recog.c:2113
Known to fail| |4.5.4, 4.6.0, 4.7.0
--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2011-05-31 14:32:50 UTC ---
This might be a fallout of the patch in
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01211.html
I'm testing the patch below.
--- ORIG/trunk/gcc/config/sh/sh.c 2011-05-31 12:06:18.000000000 +0900
+++ trunk/gcc/config/sh/sh.c 2011-05-31 23:14:33.000000000 +0900
@@ -2199,6 +2199,13 @@ expand_cbranchdi4 (rtx *operands, enum r
{
operands[1] = op1h;
operands[2] = op2h;
+ if (reload_completed
+ && ! arith_reg_or_0_operand (op2h, SImode)
+ && (true_regnum (op1h) || (comparison != EQ && comparison != NE)))
+ {
+ emit_move_insn (scratch, operands[2]);
+ operands[2] = scratch;
+ }
}
operands[3] = skip_label = gen_label_rtx ();