aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2002-03-20 10:41:46 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2002-03-20 10:41:46 +0100
commited7d44bc74c5af2bd9e44ffe05b5b99c607fc614 (patch)
tree79ccb4c2d3eb0b8df336075f26872944075fde6f /gcc/expr.c
parentb525f5b0f7cccee5addcd54d84cdb86115ab1c7d (diff)
downloadgcc-ed7d44bc74c5af2bd9e44ffe05b5b99c607fc614.zip
gcc-ed7d44bc74c5af2bd9e44ffe05b5b99c607fc614.tar.gz
gcc-ed7d44bc74c5af2bd9e44ffe05b5b99c607fc614.tar.bz2
PR optimization/5999, middle-end/5731
PR optimization/5999, middle-end/5731 * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into multiplications by reciprocals. * gcc.c-torture/compile/20020319-1.c: New test. From-SVN: r51071
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index fd62a39..ef532fe 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7738,6 +7738,7 @@ expand_expr (exp, target, tmode, modifier)
expensive divide. If not, combine will rebuild the original
computation. */
if (flag_unsafe_math_optimizations && optimize && !optimize_size
+ && TREE_CODE (type) == REAL_TYPE
&& !real_onep (TREE_OPERAND (exp, 0)))
return expand_expr (build (MULT_EXPR, type, TREE_OPERAND (exp, 0),
build (RDIV_EXPR, type,