diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-17 09:55:44 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-17 09:55:44 +0000 |
commit | 429f2f90251e5a4bfdd214017e9824995f5d4ae1 (patch) | |
tree | 8e47af6adacdca86c18a58438d78923a88ce610b /gcc/expr.c | |
parent | adcfa3a3f7ceb81c9e701b82dfda6d5a5f5b93f3 (diff) | |
download | gcc-429f2f90251e5a4bfdd214017e9824995f5d4ae1.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
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: |