]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: testsuite: memcpy-aligned requires unaligned accesses
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 21 Mar 2025 15:15:21 +0000 (15:15 +0000)
committerRichard Earnshaw <rearnsha@arm.com>
Fri, 21 Mar 2025 15:32:59 +0000 (15:32 +0000)
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.

gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c

index 852b391388bdaec9e5fcc2f03cf8fd9fa469281a..42e2a6bbdf7463b42015ff5dfaac0eebf90c77b6 100644 (file)
@@ -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);