diff options
author | Jan Hubicka <jh@suse.cz> | 2001-07-20 13:30:13 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-07-20 11:30:13 +0000 |
commit | bc8d3f9122da17fd715724c8e1102f0325cb5bae (patch) | |
tree | 68a78b6db80ae50443d9150291420d446bb9de23 /gcc/fold-const.c | |
parent | 08f66b04859024c4da60b2f9cbb1ae70bdf46c2a (diff) | |
download | gcc-bc8d3f9122da17fd715724c8e1102f0325cb5bae.zip gcc-bc8d3f9122da17fd715724c8e1102f0325cb5bae.tar.gz gcc-bc8d3f9122da17fd715724c8e1102f0325cb5bae.tar.bz2 |
integrate.c (copy_insn_list): handle NOTE_INSN_DELETED_LABEL, as if it were CODE_LABEL.
* integrate.c (copy_insn_list): handle
NOTE_INSN_DELETED_LABEL, as if it were CODE_LABEL.
(copy_rtx_and_substitute): Likewise; behave to NOTE_INSN_DELETED_LABEL
identically as to CODE_LABEL.
* fold-const (fold): Convert A/B/C to A/(B*C) and
A/(B/C) to (A/B)*C
* except.c (connect_post_landing_pads): Delete the RESX insns.
From-SVN: r44193
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ce96f11..55480d2 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5866,6 +5866,23 @@ fold (expr) } } } + /* Convert A/B/C to A/(B*C). */ + if (flag_unsafe_math_optimizations + && TREE_CODE (arg0) == RDIV_EXPR) + { + return fold (build (RDIV_EXPR, type, TREE_OPERAND (arg0, 0), + build (MULT_EXPR, type, TREE_OPERAND (arg0, 1), + arg1))); + } + /* Convert A/(B/C) to (A/B)*C. */ + if (flag_unsafe_math_optimizations + && TREE_CODE (arg1) == RDIV_EXPR) + { + return fold (build (MULT_EXPR, type, + build (RDIV_EXPR, type, arg0, + TREE_OPERAND (arg1, 0)), + TREE_OPERAND (arg1, 1))); + } goto binary; case TRUNC_DIV_EXPR: |