From: Toon Moene Date: Wed, 18 Jul 2001 05:26:38 +0000 (+0200) Subject: combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=493efd37cdfae36cc289d78ae81ce72d52fc4510;p=gcc.git combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if... 2001-07-18 Toon Moene * combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if unsafe math optimisations are enabled. From-SVN: r44097 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19e715e0583..8beb99b68e3 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 f8394e6c573..b22dd9bb41b 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);