aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2005-05-17 09:55:44 +0000
committerPaolo Bonzini <bonzini@gnu.org>2005-05-17 09:55:44 +0000
commit803fc71b1da97145acee3347ced535af14d0c7cb (patch)
tree8e47af6adacdca86c18a58438d78923a88ce610b /gcc/expr.c
parenteff58f41db733b598705c41dfd7e812a926dafe9 (diff)
gcc:
2005-05-17 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Add tree-ssa-math-opts.c. * expr.c (expand_expr_real_1) <case RDIV_EXPR>: Never emit as a*(1/b). * fold-const.c (distribute_real_division): New. (fold_binary) <case PLUS_EXPR, case MINUS_EXPR>: Use it. * tree-pass.h (pass_cse_reciprocals): New. * tree-optimize.c (init_tree_optimization_passes): Run it. * tree-ssa-math-opts.c: New file. * doc/passes.texi: Document the new pass. gcc/testsuite: 2005-05-17 Paolo Bonzini <bonzini@gnu.org> * gcc.dg/fold-div-1.c, gcc.dg/recip-1.c, gcc.dg/recip-2.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@99826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 12fa129fb85..459c248f420 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7806,18 +7806,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return expand_divmod (0, code, mode, op0, op1, target, unsignedp);
case RDIV_EXPR:
- /* Emit a/b as a*(1/b). Later we may manage CSE the reciprocal saving
- 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 (build2 (MULT_EXPR, type, TREE_OPERAND (exp, 0),
- build2 (RDIV_EXPR, type,
- build_real (type, dconst1),
- TREE_OPERAND (exp, 1))),
- target, tmode, modifier);
-
goto binop;
case TRUNC_MOD_EXPR: