[gcc(refs/users/aoliva/heads/testme)] use -mno-strict-align for strlenopt-80.c on powerpc

Alexandre Oliva aoliva@gcc.gnu.org
Thu Mar 16 14:21:36 GMT 2023


https://gcc.gnu.org/g:9957e5804f693d82cb4948b06816f6e7cc451995

commit 9957e5804f693d82cb4948b06816f6e7cc451995
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Mar 18 05:35:18 2021 -0300

    use -mno-strict-align for strlenopt-80.c on powerpc
    
    ppc configurations that have -mstrict-align enabled by default fail
    gcc.dg/strlenopt-80.c, because some memcpy calls don't get turned into
    MEM_REFs, which defeats the tested-for strlen optimization.
    
    
    for  gcc/testsuite/ChangeLog
    
            * gcc.dg/strlenopt-80.c: Add -mno-strict-align on ppc.

Diff:
---
 gcc/testsuite/gcc.dg/strlenopt-80.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/strlenopt-80.c b/gcc/testsuite/gcc.dg/strlenopt-80.c
index a8adbf1eed5..ec9a6ad85f7 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-80.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-80.c
@@ -8,6 +8,10 @@
    { dg-options "-O2 -Wall -fdump-tree-optimized" }
    { dg-additional-options "-msse" { target i?86-*-* x86_64-*-* } } */
 
+/* On powerpc configurations that have -mstrict-align by default,
+   the memcpy calls for ncpylog >= 3 are not turned into MEM_REFs.
+   { dg-additional-options "-mno-strict-align" { target powerpc*-*-* } }  */
+
 #define CHAR_BIT      __CHAR_BIT__
 #define SIZE_MAX      __SIZE_MAX__
 #define LEN_MAX       (__PTRDIFF_MAX__ - 2)


More information about the Gcc-cvs mailing list