From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1107 invoked by alias); 6 Jun 2019 14:55:42 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 1096 invoked by uid 89); 6 Jun 2019 14:55:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx08-00271601.pphosted.com Received: from mx08-00271601.pphosted.com (HELO mx08-00271601.pphosted.com) (62.209.51.218) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Jun 2019 14:55:40 +0000 Received: from pps.filterd (m0107398.ppops.net [127.0.0.1]) by mx08-00271601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x56EsLg4008856; Thu, 6 Jun 2019 16:55:36 +0200 Received: from eur04-vi1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2059.outbound.protection.outlook.com [104.47.14.59]) by mx08-00271601.pphosted.com with ESMTP id 2sy0m5h77c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 06 Jun 2019 16:55:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verisure.onmicrosoft.com; s=selector2-verisure-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9CU602yC7Dx7LiuKqo4Fj/B8yk4h2bDl9NM1OQn8QNg=; b=SUaLU/KWmFFrzt32yzleRzRyIqNHjay1lfgxmIynrCebl/qWBTvO76ZhKgkzOvcN2b9Y0teQnVlqoDNjWwyW02vPftRYGltZ+U96TcibLdIMQ0/qmZRMvhXKLbX7zC2DhytGbF2UAU8JqsWRaEnLUUQWj8nE/LEfiYQ1yXY983M= Received: from HE1PR1001MB1306.EURPRD10.PROD.OUTLOOK.COM (10.171.95.23) by HE1PR1001MB1129.EURPRD10.PROD.OUTLOOK.COM (10.168.130.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Thu, 6 Jun 2019 14:55:31 +0000 Received: from HE1PR1001MB1306.EURPRD10.PROD.OUTLOOK.COM ([fe80::a905:f06c:42ca:bb6d]) by HE1PR1001MB1306.EURPRD10.PROD.OUTLOOK.COM ([fe80::a905:f06c:42ca:bb6d%10]) with mapi id 15.20.1943.023; Thu, 6 Jun 2019 14:55:31 +0000 From: Fredrik Hederstierna To: Segher Boessenkool , "Richard Earnshaw (lists)" CC: Jeff Law , "gcc@gcc.gnu.org" Subject: Re: ARM peephole2 from 2003 never merged, still valid Date: Thu, 06 Jun 2019 14:55:00 -0000 Message-ID: References: <20190602122853.GJ31586@gate.crashing.org> <36c103ab-9a9c-8131-e21c-fa67f8ad526e@redhat.com> <20190605234635.GW31586@gate.crashing.org> ,<20190606140242.GX31586@gate.crashing.org> In-Reply-To: <20190606140242.GX31586@gate.crashing.org> x-ms-exchange-purlcount: 1 x-ms-oob-tlc-oobclassifiers: OLM:6430; received-spf: None (protection.outlook.com: verisure.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fredrik.hederstierna@verisure.com X-SW-Source: 2019-06/txt/msg00044.txt.bz2 > From: Segher Boessenkool > Sent: Thursday, June 6, 2019 4:02 PM > To: Richard Earnshaw (lists) > Cc: Jeff Law; Fredrik Hederstierna; gcc@gcc.gnu.org > Subject: Re: ARM peephole2 from 2003 never merged, still valid =A0=20 > That doesn't stop combine from considering it.=A0 It does make that first= SET > survive, so that you get a parallel as final insn.=A0 It may not like that > one of the parallel SETs is just a move.=A0 Needs testcase :-) =20 Hi all, thanks for investigating this, I added semi-stripped testcase in original issue taken from CSiBE teem sour= ces See attachment in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D9663 Tested gcc-9.1.0 for ARM 32bit targets, first without peephole2 patch: 00000000 : 0: e92d407f push {r0, r1, r2, r3, r4, r5, r6, lr} 4: e2504000 subs r4, r0, #0 8: 0a00003f beq 10c c: e3510000 cmp r1, #0 10: e1a05001 mov r5, r1 then with new peephole2 patch: 00000000 : 0: e92d407f push {r0, r1, r2, r3, r4, r5, r6, lr} 4: e2504000 subs r4, r0, #0 8: 0a00003e beq 108 c: e2515000 subs r5, r1, #0 Thanks, Fredrik