From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id D6D25387545C; Fri, 29 Sep 2023 22:11:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6D25387545C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696025506; bh=h9VguLShPZ3W9e61XoG0Sxbcb0BQjc7PNMnOT2HCclc=; h=From:To:Subject:Date:From; b=rd17Ah6j4r6HoL8sUe5Y6Kj59SokHk6Gd1B5bjdtKZpR/6oX83ap7/CjxAxrXziol EIAlxAjH9BuFFX40d/p8bS5l6jJikltYFan36j933EYhh8ExpZv0/pQI+woMQTB+q4 nINxhwOGo4jqomjRtz0cZmM6cq/QOQ8XHZx6mLtk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] use -mno-strict-align for strlenopt-80.c on powerpc X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: 9a6d4c9aa2bdd8e3f533540f66222aecfba4d158 X-Git-Newrev: 5692e76f500442916b02bf5356a74c6d1e238540 Message-Id: <20230929221146.D6D25387545C@sourceware.org> Date: Fri, 29 Sep 2023 22:11:46 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5692e76f500442916b02bf5356a74c6d1e238540 commit 5692e76f500442916b02bf5356a74c6d1e238540 Author: Alexandre Oliva Date: Fri Apr 14 23:53:18 2023 -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)