epiphany.c (epiphany_override_options): If TARGET_SOFT_CMPSF is not enabled, set flag_finite_math_only.

gcc:
        * config/epiphany/epiphany.c (epiphany_override_options):
        If TARGET_SOFT_CMPSF is not enabled, set flag_finite_math_only.
        * config/epiphany/epiphany.md (mov<mode>cc): Don't use
        reverse_condition_maybe_unordered if flag_finite_math_only is set.
gcc/testsuite:
        * gcc.target/epiphany/fcmp-1.c: New test.

From-SVN: r218323
This commit is contained in:
Joern Rennecke 2014-12-03 16:25:25 +00:00 committed by Joern Rennecke
parent 028c9c9ed7
commit f577844da9
5 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2014-12-03 Joern Rennecke <joern.rennecke@embecosm.com>
* config/epiphany/epiphany.c (epiphany_override_options):
If TARGET_SOFT_CMPSF is not enabled, set flag_finite_math_only.
* config/epiphany/epiphany.md (mov<mode>cc): Don't use
reverse_condition_maybe_unordered if flag_finite_math_only is set.
2014-12-03 Andrew Stubbs <ams@codesourcery.com>
Revert:

View File

@ -1542,6 +1542,8 @@ epiphany_override_options (void)
if (epiphany_stack_offset & 3)
error ("stack_offset must be a multiple of 4");
epiphany_stack_offset = (epiphany_stack_offset + 3) & -4;
if (!TARGET_SOFT_CMPSF)
flag_finite_math_only = 1;
/* This needs to be done at start up. It's convenient to do it here. */
epiphany_init ();

View File

@ -1960,7 +1960,7 @@
&& !rtx_equal_p (operands[0], operands[3]))
{
rtx tmp = operands[2]; operands[2] = operands[3]; operands[3] = tmp;
code = (FLOAT_MODE_P (GET_MODE (cmp_op0))
code = (FLOAT_MODE_P (GET_MODE (cmp_op0)) && !flag_finite_math_only
? reverse_condition_maybe_unordered (code)
: reverse_condition (code));
}

View File

@ -1,3 +1,7 @@
2014-12-03 Joern Rennecke <joern.rennecke@embecosm.com>
* gcc.target/epiphany/fcmp-1.c: New test.
2014-12-03 Petr Murzin <petr.murzin@intel.com>
* gcc.target/i386/avx512bw-kunpckdq-1.c: Fix regexps for assembler

View File

@ -0,0 +1,13 @@
/* { dg-options "-Ofast -mno-soft-cmpsf" } */
#if 0
#include <math.h>
#else
extern float fminf (float, float);
#endif
void test(int a, float *b, int n)
{
if (n < 10) {
*b = a*fminf(0.0,1.0*a);
}
}