diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-01-22 10:10:25 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-22 10:10:25 +0100 |
commit | c4814f99ed1340f009a804a19e81f787f7b31ea6 (patch) | |
tree | 12b6bf05546c0a6b3e9bcc4b10d90a4d3b37d812 /gcc/expr.c | |
parent | c4d825b5e780cea568317b2ca2c82420b677f119 (diff) | |
download | gcc-c4814f99ed1340f009a804a19e81f787f7b31ea6.zip gcc-c4814f99ed1340f009a804a19e81f787f7b31ea6.tar.gz gcc-c4814f99ed1340f009a804a19e81f787f7b31ea6.tar.bz2 |
re PR rtl-optimization/49429 (dse.c change (r175063) causes execution failures)
PR rtl-optimization/49429
PR target/49454
PR rtl-optimization/86334
PR target/88906
* expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
addressable from here...
(emit_block_op_via_libcall): ... to here.
* gcc.target/i386/pr86334.c: New test.
* gcc.target/i386/pr88906.c: New test.
From-SVN: r268138
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1631,14 +1631,6 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enum block_op_methods method, if (may_use_call < 0) return pc_rtx; - /* 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_copy_via_libcall (x, y, size, method == BLOCK_OP_TAILCALL); } @@ -1884,6 +1876,15 @@ emit_block_op_via_libcall (enum built_in_function fncode, rtx dst, rtx src, tree call_expr, dst_tree, src_tree, size_tree; machine_mode size_mode; + /* Since dst and src are passed to a libcall, mark the corresponding + tree EXPR as addressable. */ + tree dst_expr = MEM_EXPR (dst); + tree src_expr = MEM_EXPR (src); + if (dst_expr) + mark_addressable (dst_expr); + if (src_expr) + mark_addressable (src_expr); + dst_addr = copy_addr_to_reg (XEXP (dst, 0)); dst_addr = convert_memory_address (ptr_mode, dst_addr); dst_tree = make_tree (ptr_type_node, dst_addr); |