diff options
author | Christian Bruel <christian.bruel@st.com> | 2014-05-19 10:04:22 +0200 |
---|---|---|
committer | Christian Bruel <chrbr@gcc.gnu.org> | 2014-05-19 10:04:22 +0200 |
commit | 72d82e7ab1ef3c39568e6763b393826c77e8237a (patch) | |
tree | d22dab6e7ca2cc74c3b0b4c2f5b49c6b62fb90fb | |
parent | 34dbb287c7d6bc68db6bc2eb83b1275dfe99e923 (diff) | |
download | gcc-72d82e7ab1ef3c39568e6763b393826c77e8237a.zip gcc-72d82e7ab1ef3c39568e6763b393826c77e8237a.tar.gz gcc-72d82e7ab1ef3c39568e6763b393826c77e8237a.tar.bz2 |
re PR target/61195 (single precision fmov does not need to switch mode)
PR target/61195
* config/sh/sh.md (movsf_ie): Unset fp_mode for fmov
From-SVN: r210608
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 26 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/sh/pr61195.c | 19 |
4 files changed, 52 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e592f85..d938d1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-05-19 Christian Bruel <christian.bruel@st.com> + + PR target/61195 + * config/sh/sh.md (movsf_ie): Unset fp_mode for fmov. + 2014-05-19 Richard Sandiford <r.sandiford@uk.ibm.com> PR target/61084 diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index f77f572..0250f92 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -8357,9 +8357,29 @@ label: (const_int 2) (const_int 2) (const_int 0)]) - (set (attr "fp_mode") (if_then_else (eq_attr "fmovd" "yes") - (const_string "single") - (const_string "single")))]) + (set_attr_alternative "fp_mode" + [(if_then_else (eq_attr "fmovd" "yes") + (const_string "single") (const_string "none")) + (const_string "none") + (const_string "single") + (const_string "single") + (const_string "none") + (if_then_else (eq_attr "fmovd" "yes") + (const_string "single") (const_string "none")) + (if_then_else (eq_attr "fmovd" "yes") + (const_string "single") (const_string "none")) + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none") + (const_string "none")])]) (define_split [(set (match_operand:SF 0 "register_operand" "") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 753fdcf..846ad6d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-05-19 Christian Bruel <christian.bruel@st.com> + + PR target/61195 + * gcc.target/sh/pr61195.c: New test. + 2014-05-18 Wei Mi <wmi@google.com> PR target/58066 diff --git a/gcc/testsuite/gcc.target/sh/pr61195.c b/gcc/testsuite/gcc.target/sh/pr61195.c new file mode 100644 index 0000000..f3fb10b --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/pr61195.c @@ -0,0 +1,19 @@ +/* Verify that we don't switch mode for single moves. */ +/* { dg-do compile } */ +/* { dg-require-effective-target hard_float } */ +/* { dg-skip-if "" { *-*-* } { "mfmovd" } { "" } } */ +/* { dg-final { scan-assembler-not "fpscr" } } */ + +float *g; + +float +foo(float f) +{ + return f; +} + +float +foo1(void) +{ + return *g; +} |