aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-12-27 08:47:14 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-12-27 08:47:14 -0500
commit7e2a0d8ef437936d4664dc6dd6fe6e1ec053534a (patch)
treec992b4a3c4ddde3f3c3d2d58dd89d9c01438bc79 /gcc
parent60614fddd4e527bb9861dd7c5669114ef6661a6b (diff)
downloadgcc-7e2a0d8ef437936d4664dc6dd6fe6e1ec053534a.zip
gcc-7e2a0d8ef437936d4664dc6dd6fe6e1ec053534a.tar.gz
gcc-7e2a0d8ef437936d4664dc6dd6fe6e1ec053534a.tar.bz2
(subst, case MINUS): Allow some FP simplifications if -ffast-math.
(reversible_comparison_p): FP comparisons reversible with -ffast-math. From-SVN: r6333
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 8c27d89..cd3585a 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3335,7 +3335,8 @@ subst (x, from, to, in_dest, unique_copy)
if (GET_CODE (XEXP (x, 0)) == MINUS
&& (! FLOAT_MODE_P (mode)
/* x-y != -(y-x) with IEEE floating point. */
- || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT))
+ || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
+ || flag_fast_math))
{
x = gen_binary (MINUS, mode, XEXP (XEXP (x, 0), 1),
XEXP (XEXP (x, 0), 0));
@@ -3428,7 +3429,8 @@ subst (x, from, to, in_dest, unique_copy)
/* In IEEE floating point, x-0 is not the same as x. */
if ((TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- || ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0))))
+ || ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0)))
+ || flag_fast_math)
&& XEXP (x, 1) == CONST0_RTX (GET_MODE (XEXP (x, 0))))
return XEXP (x, 0);
break;
@@ -9198,6 +9200,7 @@ reversible_comparison_p (x)
rtx x;
{
if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
+ || flag_fast_math
|| GET_CODE (x) == NE || GET_CODE (x) == EQ)
return 1;