]> gcc.gnu.org Git - gcc.git/commitdiff
i386.md (movmemsi): Also active when TARGET_INLINE_ALL_STRINGOPS.
authorMichael Matz <matz@gcc.gnu.org>
Sun, 1 May 2005 00:48:43 +0000 (00:48 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Sun, 1 May 2005 00:48:43 +0000 (00:48 +0000)
        * config/i386/i386.md (movmemsi): Also active when
        TARGET_INLINE_ALL_STRINGOPS.
        * gcc.dg/inline-mcpy.c: New test.

From-SVN: r99054

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/inline-mcpy.c [new file with mode: 0644]

index bfe3fb58dc9b24997df085ac8d93984ef18564d0..279d4b19d50c0f1537d0b5279d68932ab2ba5f43 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-30  Michael Matz  <matz@suse.de>
+
+       * config/i386/i386.md (movmemsi): Also active when
+       TARGET_INLINE_ALL_STRINGOPS.
+
 2005-04-30  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR bootstrap/20633
index 66659ae5abc42f5f099d0fd97e1329f377bdfde3..9ae0ae9925fe8688269d9cc73d6c88c511a6f57e 100644 (file)
    (use (match_operand:BLK 1 "memory_operand" ""))
    (use (match_operand:SI 2 "nonmemory_operand" ""))
    (use (match_operand:SI 3 "const_int_operand" ""))]
-  "! optimize_size"
+  "! optimize_size || TARGET_INLINE_ALL_STRINGOPS"
 {
  if (ix86_expand_movmem (operands[0], operands[1], operands[2], operands[3]))
    DONE;
index 00edc96465e22ee4cac78474b31d2339297137fb..d212e86ee2e1a8d6517348cb306ae430c8884f1e 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-30  Michael Maty  <matz@suse.de>
+
+       * gcc.dg/inline-mcpy.c: New test.
+
 2005-04-30  Thomas Koenig  <Thomas.Koenig@online.de>
 
        PR libfortran/18958
diff --git a/gcc/testsuite/gcc.dg/inline-mcpy.c b/gcc/testsuite/gcc.dg/inline-mcpy.c
new file mode 100644 (file)
index 0000000..4917394
--- /dev/null
@@ -0,0 +1,11 @@
+/* Test if we inline memcpy even with -Os, when the user requested it.  */
+/* Don't name this test with memcpy in its name, otherwise the scan-assembler
+   would be confused.  */
+/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-Os -minline-all-stringops" } */
+/* { dg-final { scan-assembler-not "memcpy" } } */
+char f(int i)
+{
+  char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" };
+  return ram_split[i][0];
+}
This page took 0.140384 seconds and 5 git commands to generate.