From 600f3598c72114182a6e2647bda341492734a4d3 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 1 May 2005 00:48:43 +0000 Subject: [PATCH] i386.md (movmemsi): Also active when TARGET_INLINE_ALL_STRINGOPS. * config/i386/i386.md (movmemsi): Also active when TARGET_INLINE_ALL_STRINGOPS. * gcc.dg/inline-mcpy.c: New test. From-SVN: r99054 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.md | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/inline-mcpy.c | 11 +++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/inline-mcpy.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfe3fb5..279d4b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-30 Michael Matz + + * config/i386/i386.md (movmemsi): Also active when + TARGET_INLINE_ALL_STRINGOPS. + 2005-04-30 Eric Botcazou PR bootstrap/20633 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 66659ae..9ae0ae9 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -16984,7 +16984,7 @@ (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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00edc96..d212e86 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-04-30 Michael Maty + + * gcc.dg/inline-mcpy.c: New test. + 2005-04-30 Thomas Koenig 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 index 0000000..4917394 --- /dev/null +++ b/gcc/testsuite/gcc.dg/inline-mcpy.c @@ -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]; +} -- 2.7.4