From a0fd8a81277015c50c3af05945016ba784458e4a Mon Sep 17 00:00:00 2001 From: toon Date: Wed, 18 Jul 2001 05:26:38 +0000 Subject: [PATCH] 2001-07-18 Toon Moene * combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if unsafe math optimisations are enabled. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44097 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19e715e..8beb99b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-07-18 Toon Moene + + * combine.c (combine_simplify_rtx): DIV can be treated + associatively for floats if unsafe math optimisations are enabled. + 2001-07-17 Richard Henderson * reload.c (push_secondary_reload): Accept empty-string for ALL_REGS. diff --git a/gcc/combine.c b/gcc/combine.c index f8394e6..b22dd9b 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3722,10 +3722,10 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) /* If CODE is an associative operation not otherwise handled, see if we can associate some operands. This can win if they are constants or if they are logically related (i.e. (a & b) & a). */ - if ((code == PLUS || code == MINUS - || code == MULT || code == AND || code == IOR || code == XOR + if ((code == PLUS || code == MINUS || code == MULT || code == DIV + || code == AND || code == IOR || code == XOR || code == SMAX || code == SMIN || code == UMAX || code == UMIN) - && (INTEGRAL_MODE_P (mode) + && ((INTEGRAL_MODE_P (mode) && code != DIV) || (flag_unsafe_math_optimizations && FLOAT_MODE_P (mode)))) { if (GET_CODE (XEXP (x, 0)) == code) @@ -3745,7 +3745,6 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) } inner = simplify_binary_operation (code == MINUS ? PLUS : code == DIV ? MULT - : code == UDIV ? MULT : code, mode, inner_op0, inner_op1); -- 2.7.4