[gcc r15-8648] arm: testsuite: memcpy-aligned requires unaligned accesses
Richard Earnshaw
rearnsha@gcc.gnu.org
Fri Mar 21 15:35:40 GMT 2025
https://gcc.gnu.org/g:b1ac0c5f1986d0774cfc980da8323f17747a1ce9
commit r15-8648-gb1ac0c5f1986d0774cfc980da8323f17747a1ce9
Author: Richard Earnshaw <rearnsha@arm.com>
Date: Fri Mar 21 15:15:21 2025 +0000
arm: testsuite: memcpy-aligned requires unaligned accesses
This test is designed to check that if one of the operands is
aligned (but the other isn't) we expand to a sensible sequence and
bypass most of the overhead of doing a memcpy. But on targets without
unaligned accessess, we still end up calling memcpy. It's then a
lottery as to whether the prologue and epilogue code, plus the
set-up for the memcpy itself, generate instructions that match the
scan patterns.
Since in those cases we're not actually testing what the test is looking
for anyway, just skip the test on strict-alignment targets.
gcc/testsuite:
* gcc.target/arm/memcpy-aligned-1.c: Require unaligned accesses.
Diff:
---
gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c b/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
index 852b391388bd..42e2a6bbdf74 100644
--- a/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
+++ b/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2 -save-temps" } */
void *memcpy (void *dest, const void *src, unsigned int n);
More information about the Gcc-cvs
mailing list