diff options
author | Paolo Bonzini <bonzini@gcc.gnu.org> | 2005-05-17 09:55:44 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2005-05-17 09:55:44 +0000 |
commit | f8912a553ae9e4da3bcbdd9aaf802dd179434ebc (patch) | |
tree | 8e47af6adacdca86c18a58438d78923a88ce610b /gcc/expr.c | |
parent | fb664a2cba8002496836cffe6381ad3f834df6cc (diff) | |
download | gcc-f8912a553ae9e4da3bcbdd9aaf802dd179434ebc.zip gcc-f8912a553ae9e4da3bcbdd9aaf802dd179434ebc.tar.gz gcc-f8912a553ae9e4da3bcbdd9aaf802dd179434ebc.tar.bz2 |
Makefile.in: Add tree-ssa-math-opts.c.
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.
From-SVN: r99826
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -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: |