diff options
author | Andrew Bennett <andrew.bennett@imgtec.com> | 2025-04-21 09:56:47 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-04-21 09:57:28 -0600 |
commit | 2d07e3687998f31dfc7a18cbf14f17096c599549 (patch) | |
tree | 38603a8a11ba742584a23d5af09132591bace76e /gcc | |
parent | 7c48d3e49b5417bd26beea7eb832fa9ca5caf38e (diff) | |
download | gcc-2d07e3687998f31dfc7a18cbf14f17096c599549.zip gcc-2d07e3687998f31dfc7a18cbf14f17096c599549.tar.gz gcc-2d07e3687998f31dfc7a18cbf14f17096c599549.tar.bz2 |
[PATCH 21/61] Testsuite: Modify the gcc.dg/memcpy-4.c test
From: Andrew Bennett <andrew.bennett@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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/memcpy-4.c | 7 | ||||
-rw-r--r-- | 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 4c726f0..b17b369 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 0000000..df0cd18 --- /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" } } */ |