From: Oleg Endo Date: Sun, 18 Jan 2015 18:12:53 +0000 (+0000) Subject: re PR target/64652 ([SH] ICE when using -mdiv=call-fp) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15a43a0cdb932ef625b01d516004df0a527119c1;p=gcc.git re PR target/64652 ([SH] ICE when using -mdiv=call-fp) gcc/ PR target/64652 * config/sh/sh.md (udivsi3_i4, divsi3_i4): Make use of sfunc address reg appear first in the parallel. gcc/testsuite/ PR target/64652 * gcc.target/sh/torture/pr64652.c: New. From-SVN: r219824 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a858d1f154f..2e3dc27e2f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-18 Oleg Endo + + PR target/64652 + * config/sh/sh.md (udivsi3_i4, divsi3_i4): Make use of sfunc address + reg appear first in the parallel. + 2015-01-18 Jan Hubicka * ipa-reference.c (set_reference_optimization_summary, diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index d9d5d0a810b..50f374c9bf8 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -2402,8 +2402,8 @@ (clobber (reg:SI R4_REG)) (clobber (reg:SI R5_REG)) (clobber (reg:SI FPSCR_STAT_REG)) - (use (reg:SI FPSCR_MODES_REG)) - (use (match_operand:SI 1 "arith_reg_operand" "r"))] + (use (match_operand:SI 1 "arith_reg_operand" "r")) + (use (reg:SI FPSCR_MODES_REG))] "TARGET_FPU_DOUBLE && ! TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") @@ -2674,8 +2674,8 @@ (clobber (reg:DF DR0_REG)) (clobber (reg:DF DR2_REG)) (clobber (reg:SI FPSCR_STAT_REG)) - (use (reg:SI FPSCR_MODES_REG)) - (use (match_operand:SI 1 "arith_reg_operand" "r"))] + (use (match_operand:SI 1 "arith_reg_operand" "r")) + (use (reg:SI FPSCR_MODES_REG))] "TARGET_FPU_DOUBLE && ! TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 801d87ebfc6..e03e4606b78 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-18 Oleg Endo + + PR target/64652 + * gcc.target/sh/torture/pr64652.c: New. + 2015-01-18 Jan Hubicka * gcc.dg/ipa/ipa-icf-32.c: Update template. diff --git a/gcc/testsuite/gcc.target/sh/torture/pr64652.c b/gcc/testsuite/gcc.target/sh/torture/pr64652.c new file mode 100644 index 00000000000..0ecfb9c9d62 --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/torture/pr64652.c @@ -0,0 +1,10 @@ +/* Check that using -mdiv=call-fp compiles without fuzz. */ +/* { dg-do compile } */ +/* { dg-additional-options "-mdiv=call-fp" } */ +/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */ + +int +test (int a, int b, int c, int d) +{ + return (a / b) + c + d; +}