https://gcc.gnu.org/g:bcd3886e6692ba4b7127debcdfe4890199ec9e54

commit r15-7356-gbcd3886e6692ba4b7127debcdfe4890199ec9e54
Author: Thiago Jung Bauermann <thiago.bauerm...@linaro.org>
Date:   Sun Feb 2 16:46:07 2025 -0300

    arm: testsuite: Adapt mve-vabs.c to improved codegen
    
    Since commit r15-491-gc290e6a0b7a9de this failure happens on
    armv8l-linux-gnueabihf and arm-eabi:
    
    Running gcc:gcc.target/arm/simd/simd.exp ...
    gcc.target/arm/simd/mve-vabs.c: memmove found 0 times
    FAIL: gcc.target/arm/simd/mve-vabs.c scan-assembler-times memmove 3
    
    In PR PR target/116010, Andrew Pinski noted that
    "gcc.target/arm/simd/mve-vabs.c now calls memcpy because of the restrict
    instead of memmove. That should be a simple fix there."
    
    Therefore change the test to expect memcpy rather than memmove.
    
    Another change is that memcpy is inlined rather than called, so also change
    the test to check the optimized tree dump rather than the generated
    assembly.
    
    Tested on armv8l-linux-gnueabihf and arm-eabi.
    
    gcc/testsuite/ChangeLog:
            PR target/116010
            * gcc.target/arm/simd/mve-vabs.c: Test tree dump and adjust to new
            code.
    
    Suggested-by: Andrew Pinski <quic_apin...@quicinc.com>

Diff:
---
 gcc/testsuite/gcc.target/arm/simd/mve-vabs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/simd/mve-vabs.c 
b/gcc/testsuite/gcc.target/arm/simd/mve-vabs.c
index f2f9ee349906..e85d0b18ee71 100644
--- a/gcc/testsuite/gcc.target/arm/simd/mve-vabs.c
+++ b/gcc/testsuite/gcc.target/arm/simd/mve-vabs.c
@@ -1,7 +1,7 @@
 /* { dg-do assemble } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-add-options arm_v8_1m_mve_fp } */
-/* { dg-additional-options "-O3 -funsafe-math-optimizations" } */
+/* { dg-additional-options "-O3 -funsafe-math-optimizations 
-fdump-tree-optimized" } */
 
 #include <stdint.h>
 #include <arm_mve.h>
@@ -35,10 +35,10 @@ FUNC_FLOAT(f, float, 32, 4, vabs)
 FUNC(f, float, 16, 8, vabs)
 
 /* Taking the absolute value of an unsigned value is a no-op, so half of the
-   integer optimizations actually generate a call to memmove, the other ones a
+   integer optimizations actually generate a call to memcpy, the other ones a
    'vabs'.  */
 /* { dg-final { scan-assembler-times {vabs.s[0-9]+\tq[0-9]+, q[0-9]+} 3 } } */
 /* { dg-final { scan-assembler-times {vabs.f[0-9]+\tq[0-9]+, q[0-9]+} 2 } } */
 /* { dg-final { scan-assembler-times {vldr[bhw].[0-9]+\tq[0-9]+} 5 } } */
 /* { dg-final { scan-assembler-times {vstr[bhw].[0-9]+\tq[0-9]+} 5 } } */
-/* { dg-final { scan-assembler-times {memmove} 3 } } */
+/* { dg-final { scan-tree-dump-times "memcpy" 3 "optimized" } } */

Reply via email to