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
This commit is contained in:
Christian Bruel 2014-05-19 10:04:22 +02:00 committed by Christian Bruel
parent 34dbb287c7
commit 72d82e7ab1
4 changed files with 52 additions and 3 deletions

View File

@ -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

View File

@ -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" "")

View File

@ -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

View File

@ -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;
}