public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Mark variables addressable if they are copied using libcall in RTL expander
@ 2011-06-21  2:15 Easwaran Raman
  2011-06-21  9:02 ` Richard Guenther
  0 siblings, 1 reply; 14+ messages in thread
From: Easwaran Raman @ 2011-06-21  2:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Guenther

This fixes bugs introduced by r175063. OK for trunk if there are no
test regressions?

-Easwaran


2011-06-20  Easwaran Raman  <eraman@google.com>

        PR rtl-optimization/49429
        * 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.

Index: gcc/expr.c
===================================================================
--- gcc/expr.c  (revision 175081)
+++ gcc/expr.c  (working copy)
@@ -1181,8 +1181,19 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enu
   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);

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-06-24  8:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21  2:15 Mark variables addressable if they are copied using libcall in RTL expander Easwaran Raman
2011-06-21  9:02 ` Richard Guenther
2011-06-22 13:15   ` Eric Botcazou
2011-06-22 13:53     ` Jakub Jelinek
2011-06-22 13:54       ` Richard Guenther
2011-06-22 14:26   ` Eric Botcazou
2011-06-22 19:39     ` Easwaran Raman
2011-06-23 10:00       ` Eric Botcazou
2011-06-23 10:32         ` Richard Guenther
2011-06-23 11:07           ` Eric Botcazou
2011-06-23 19:16             ` Easwaran Raman
2011-06-23 19:32               ` Jakub Jelinek
2011-06-23 21:56                 ` Easwaran Raman
2011-06-24  9:00                   ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).