https://gcc.gnu.org/g:2d07e3687998f31dfc7a18cbf14f17096c599549

commit r16-53-g2d07e3687998f31dfc7a18cbf14f17096c599549
Author: Andrew Bennett <andrew.benn...@imgtec.com>
Date:   Mon Apr 21 09:56:47 2025 -0600

    [PATCH 21/61] Testsuite: Modify the gcc.dg/memcpy-4.c test
    
    From: Andrew Bennett <andrew.benn...@imgtec.com>
    
    Firstly, remove the MIPS specific bit of the test.
    Secondly, create a MIPS specific version in the gcc.target/mips.
    This will only execute for a MIPS ISA less than R6.
    
    Cherry-picked c8b051cdbb1d5b166293513b0360d3d67cf31eb9
    from https://github.com/MIPS/gcc
    
    gcc/testsuite
            * gcc.dg/memcpy-4.c: Remove mips specific code.
            * gcc.target/mips/memcpy-2.c: New test.

Diff:
---
 gcc/testsuite/gcc.dg/memcpy-4.c          |  7 +------
 gcc/testsuite/gcc.target/mips/memcpy-2.c | 12 ++++++++++++
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/memcpy-4.c b/gcc/testsuite/gcc.dg/memcpy-4.c
index 4c726f0ad74d..b17b369c5c63 100644
--- a/gcc/testsuite/gcc.dg/memcpy-4.c
+++ b/gcc/testsuite/gcc.dg/memcpy-4.c
@@ -1,13 +1,8 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-rtl-expand" } */
+/* { dg-options "-O2" } */
 
-#ifdef __mips
-__attribute__((nomips16))
-#endif
 void
 f1 (char *p)
 {
   __builtin_memcpy (p, "12345", 5);
 }
-
-/* { dg-final { scan-rtl-dump "mem/u.*mem/u" "expand" { target mips*-*-* } } } 
*/
diff --git a/gcc/testsuite/gcc.target/mips/memcpy-2.c 
b/gcc/testsuite/gcc.target/mips/memcpy-2.c
new file mode 100644
index 000000000000..df0cd18c2b2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/memcpy-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "isa_rev<=5 -fdump-rtl-expand" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-Os" } { "" } } */
+
+__attribute__((nomips16))
+void
+f1 (char *p)
+{
+  __builtin_memcpy (p, "12345", 5);
+}
+
+/* { dg-final { scan-rtl-dump "mem/u.*mem/u" "expand" } } */

Reply via email to