aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorToon Moene <toon@moene.indiv.nluug.nl>2001-07-18 07:26:38 +0200
committerToon Moene <toon@gcc.gnu.org>2001-07-18 05:26:38 +0000
commit493efd37cdfae36cc289d78ae81ce72d52fc4510 (patch)
tree52785302a0f2c7c6c298e0451dbc15c422e5d962 /gcc/combine.c
parenta7c07f1ef066dd8817eb2da0c66f60aef5fb3e84 (diff)
downloadgcc-493efd37cdfae36cc289d78ae81ce72d52fc4510.zip
gcc-493efd37cdfae36cc289d78ae81ce72d52fc4510.tar.gz
gcc-493efd37cdfae36cc289d78ae81ce72d52fc4510.tar.bz2
combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if...
2001-07-18 Toon Moene <toon@moene.indiv.nluug.nl> * combine.c (combine_simplify_rtx): DIV can be treated associatively for floats if unsafe math optimisations are enabled. From-SVN: r44097
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c7
1 files changed, 3 insertions, 4 deletions
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);