diff options
author | Easwaran Raman <eraman@google.com> | 2011-06-24 17:10:18 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@gcc.gnu.org> | 2011-06-24 17:10:18 +0000 |
commit | c4b9a87e0df50293a420e98952c9593f58dcd1da (patch) | |
tree | dd6ee8493a7ef5063267b7d09ebfc67cb2cf91e9 /gcc/expr.c | |
parent | 1f134bd6d6d6f324c4830c45fa70ab3e49fcd3ef (diff) | |
download | gcc-c4b9a87e0df50293a420e98952c9593f58dcd1da.zip gcc-c4b9a87e0df50293a420e98952c9593f58dcd1da.tar.gz gcc-c4b9a87e0df50293a420e98952c9593f58dcd1da.tar.bz2 |
re PR rtl-optimization/49429 (dse.c change (r175063) causes execution failures)
2011-06-24 Easwaran Raman <eraman@google.com>
PR rtl-optimization/49429
PR target/49454
* expr.c (emit_block_move_hints): Mark MEM_EXPR(x) and
MEM_EXPR(y) addressable if emit_block_move_via_libcall is
used to copy y into x.
* calls.c (initialize_argument_information): Mark
an argument addressable if it is passed by invisible reference.
(emit_library_call_value_1): Mark MEM_EXPR (val) addressable
if it is passed by reference.
From-SVN: r175384
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1181,8 +1181,19 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enum block_op_methods method, else if (may_use_call && ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (x)) && ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (y))) - retval = emit_block_move_via_libcall (x, y, size, - method == BLOCK_OP_TAILCALL); + { + /* Since x and y are passed to a libcall, mark the corresponding + tree EXPR as addressable. */ + tree y_expr = MEM_EXPR (y); + tree x_expr = MEM_EXPR (x); + if (y_expr) + mark_addressable (y_expr); + if (x_expr) + mark_addressable (x_expr); + retval = emit_block_move_via_libcall (x, y, size, + method == BLOCK_OP_TAILCALL); + } + else emit_block_move_via_loop (x, y, size, align); |