Hi,

The attached patch is to fix PR target/49880.  All SH compilers ICE
with -m4 -mdiv=call-div1 which is a bit unusual combination of
options.  Tested on sh4-unknown-linux-gnu with no new failures.
Applied on trunk.

Regards,
        kaz
--
2011-07-31  Kaz Kojima  <kkoj...@gcc.gnu.org>

        PR target/49880
        * 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")])

Reply via email to