From b1ac0c5f1986d0774cfc980da8323f17747a1ce9 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Fri, 21 Mar 2025 15:15:21 +0000 Subject: [PATCH] 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. --- 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); -- 2.47.2