aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2015-01-18 18:12:53 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2015-01-18 18:12:53 +0000
commit15a43a0cdb932ef625b01d516004df0a527119c1 (patch)
tree9072b78762dc6d66fba73b55322077db0438b28b /gcc
parentb16650ac472b03123a7190c84d6c75daf8a6557c (diff)
downloadgcc-15a43a0cdb932ef625b01d516004df0a527119c1.zip
gcc-15a43a0cdb932ef625b01d516004df0a527119c1.tar.gz
gcc-15a43a0cdb932ef625b01d516004df0a527119c1.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.md8
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pr64652.c10
4 files changed, 25 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a858d1f..2e3dc27 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-18 Oleg Endo <olegendo@gcc.gnu.org>
+
+ 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 <hubicka@ucw.cz>
* ipa-reference.c (set_reference_optimization_summary,
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index d9d5d0a..50f374c 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 801d87e..e03e460 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-18 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/64652
+ * gcc.target/sh/torture/pr64652.c: New.
+
2015-01-18 Jan Hubicka <hubicka@ucw.cz>
* 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 0000000..0ecfb9c
--- /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;
+}