This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49880] SuperH: ICE when -m4 is used with -mdiv=call-div1
- 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: Thu, 28 Jul 2011 22:50:06 +0000
- Subject: [Bug target/49880] SuperH: ICE when -m4 is used with -mdiv=call-div1
- Auto-submitted: auto-generated
- References: <bug-49880-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49880
Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|shle--netbsdelf |sh*-*-*
Status|UNCONFIRMED |NEW
Keywords| |ice-on-valid-code
Last reconfirmed| |2011.07.28 22:50:01
CC| |kkojima at gcc dot gnu.org
Host|i386--netbsdelf |
Ever Confirmed|0 |1
Known to fail| |4.2.5, 4.3.6, 4.4.7, 4.5.5,
| |4.6.2, 4.7.0
Build|i386--netbsdelf |
--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2011-07-28 22:50:01 UTC ---
I've confirmed that trunk and all released compilers fail with
-m4 -mdiv=call-div1. I'm testing the patch below.
* config/sh/sh.md (udivsi3_i1): Enable for TARGET_DIVIDE_CALL_DIV1.
(divsi3_i1): Likewise.
--- ORIG/trunk/gcc/config/sh/sh.md 2011-07-20 09:27:11.000000000 +0900
+++ trunk/gcc/config/sh/sh.md 2011-07-28 06:49:41.000000000 +0900
@@ -1609,7 +1609,7 @@
(clobber (reg:SI PR_REG))
(clobber (reg:SI R4_REG))
(use (match_operand:SI 1 "arith_reg_operand" "r"))]
- "TARGET_SH1 && ! TARGET_SH4"
+ "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)"
"jsr @%1%#"
[(set_attr "type" "sfunc")
(set_attr "needs_delay_slot" "yes")])
@@ -1815,7 +1815,7 @@
(clobber (reg:SI R2_REG))
(clobber (reg:SI R3_REG))
(use (match_operand:SI 1 "arith_reg_operand" "r"))]
- "TARGET_SH1 && ! TARGET_SH4"
+ "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)"
"jsr @%1%#"
[(set_attr "type" "sfunc")
(set_attr "needs_delay_slot" "yes")])