OSDN Git Service

* integrate.c (expand_inline_function): Don't inline if would
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Apr 2003 21:33:05 +0000 (21:33 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Apr 2003 21:33:05 +0000 (21:33 +0000)
lose /u on a BLKmode TARGET.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65594 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/integrate.c

index a53b3b6..8b0dafc 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * integrate.c (expand_inline_function): Don't inline if would
+       lose /u on a BLKmode TARGET.
+
 2003-04-14  Joel Brobecker  <brobecker@gnat.com>
 
         * dwarf2out.c (gen_compile_unit_die): Emit DW_LANG_Ada95 instead
index f26a94c..7a18658 100644 (file)
@@ -736,6 +736,14 @@ expand_inline_function (fndecl, parms, target, ignore, type,
        return (rtx) (size_t) -1;
     }
 
+  /* If there is a TARGET which is a readonly BLKmode MEM and DECL_RESULT
+     is also a mem, we are going to lose the readonly on the stores, so don't
+     inline.  */
+  if (target != 0 && GET_CODE (target) == MEM && GET_MODE (target) == BLKmode
+      && RTX_UNCHANGING_P (target) && DECL_RTL_SET_P (DECL_RESULT (fndecl))
+      && GET_CODE (DECL_RTL (DECL_RESULT (fndecl))) == MEM)
+    return (rtx) (size_t) -1;
+
   /* Extra arguments are valid, but will be ignored below, so we must
      evaluate them here for side-effects.  */
   for (; actual; actual = TREE_CHAIN (actual))