[Bug target/49880] SuperH: ICE when -m4 is used with -mdiv=call-div1
kkojima at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 28 22:50:00 GMT 2011
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")])
More information about the Gcc-bugs
mailing list