From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by sourceware.org (Postfix) with ESMTPS id 21561388206E for ; Mon, 20 Nov 2023 02:57:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21561388206E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=t-online.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21561388206E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=194.25.134.20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700449056; cv=none; b=jcfqNxDOeYVDwHmjjvDBxg8vWqB0vu4DjVJLpDP4u3sxn92/DAMlZf8GTStDUgkMZ3cN53+KH6KfI8fI9fQrfeiDjOtJzLRuf2DJhCJDNS6xH6YtSqCYo3hgL8FIQIXjrpSCApi4ScrmT82nBfkH7+CmWKM47gK8yM3l51IKG9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700449056; c=relaxed/simple; bh=PcUBSVDXUiOqlU/1MiytiY8lF2J5dgPyYd2cRLMBIvc=; h=Message-ID:Subject:From:To:Date:MIME-Version; b=pdeW6TCvjg1wYx5RA8eFlExmWsW37EZvDWXnQeLhK8DRO5RRSTTwIZVoE7q6dKCiZSVn/CQSpY/+2b7cAk8BkThmJQuOmSEbWg0Gmb7naP0IfSk+HxCAs5FSoKlKSXhGNCcnPAPE9cTxHbt+7Y7RHwdjYMt8oEJOSbYIVtv9L4s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fwd70.aul.t-online.de (fwd70.aul.t-online.de [10.223.144.96]) by mailout08.t-online.de (Postfix) with SMTP id E5BEC19A98; Mon, 20 Nov 2023 03:57:33 +0100 (CET) Received: from localhost.localdomain ([115.165.108.210]) by fwd70.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1r4uTb-23hI8m0; Mon, 20 Nov 2023 03:57:33 +0100 Message-ID: <4e12744d14456a538fe34b80a758c5462d788d06.camel@t-online.de> Subject: Re: [RFA] New pass for sign/zero extension elimination From: Oleg Endo To: Jeff Law , "gcc-patches@gcc.gnu.org" Cc: Jivan Hakobyan Date: Mon, 20 Nov 2023 11:57:28 +0900 In-Reply-To: <463a5426-ad0b-4b2f-b630-2b7e664c65bb@ventanamicro.com> References: <6d5f8ba7-0c60-4789-87ae-68617ce6ac2c@ventanamicro.com> <5b865c34a380c7d08514ce5da8956d798e3478a8.camel@t-online.de> <463a5426-ad0b-4b2f-b630-2b7e664c65bb@ventanamicro.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-TOI-EXPURGATEID: 150726::1700449053-31FF8937-F16EE3E0/0/0 CLEAN NORMAL X-TOI-MSGID: 8da7bbb1-bc3e-49f8-ae01-09eefb914bf6 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, 2023-11-19 at 19:51 -0700, Jeff Law wrote: >=20 > On 11/19/23 18:22, Oleg Endo wrote: > >=20 > > On Sun, 2023-11-19 at 17:47 -0700, Jeff Law wrote: > > > This is work originally started by Joern @ Embecosm. > > >=20 > > > There's been a long standing sense that we're generating too many > > > sign/zero extensions on the RISC-V port. REE is useful, but it's rea= lly > > > focused on a relatively narrow part of the extension problem. > > >=20 > > > What Joern's patch does is introduce a new pass which tracks liveness= of > > > chunks of pseudo regs. Specifically it tracks bits 0..7, 8..15, 16..= 31 > > > and 32..63. > > >=20 > > > If it encounters a sign/zero extend that sets bits that are never rea= d, > > > then it replaces the sign/zero extension with a narrowing subreg. Th= e > > > narrowing subreg usually gets eliminated by subsequent passes (it's j= ust > > > a copy after all). > > >=20 > >=20 > > Have you tried it on SH, too? (and if so any numbers?) > Just bootstrap with C regression testing on sh4/sh4eb. No data on=20 > improvements. >=20 Alright. I'll check what it does for SH once it's in. Cheers, Oleg