From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2055.outbound.protection.outlook.com [40.107.21.55]) by sourceware.org (Postfix) with ESMTPS id 0D1B13858D28 for ; Sun, 5 Mar 2023 19:29:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D1B13858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L8CYGDp/85GJxKAh0WneZaH4vmrXdDYInsNytRinZ08=; b=8LaNgMCLNh0/BX/r5FpNp0KY9WD2H92CU448kNlDDO2RQyzE/mmPb4g3I9HHixnksbRRLEdLLflibArllFLIdsyKrzdVqv+7GhGUbfwcoD03RAwQM8mIe3PdztS9l6BJLkHmfjWuG67czv+N/kBUJU5XMu5mPOMpIG4VKOSJvT4= Received: from DB6PR0802CA0048.eurprd08.prod.outlook.com (2603:10a6:4:a3::34) by AM0PR08MB5506.eurprd08.prod.outlook.com (2603:10a6:208:17e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.27; Sun, 5 Mar 2023 19:28:58 +0000 Received: from DBAEUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a3:cafe::94) by DB6PR0802CA0048.outlook.office365.com (2603:10a6:4:a3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.27 via Frontend Transport; Sun, 5 Mar 2023 19:28:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT003.mail.protection.outlook.com (100.127.142.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.27 via Frontend Transport; Sun, 5 Mar 2023 19:28:58 +0000 Received: ("Tessian outbound 55ffa3012b8f:v135"); Sun, 05 Mar 2023 19:28:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b6c3f39789e20cf1 X-CR-MTA-TID: 64aa7808 Received: from 0c16bf2f5851.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EF1035DB-365D-4525-AC2E-06E5ECFDA49C.1; Sun, 05 Mar 2023 19:28:52 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0c16bf2f5851.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 05 Mar 2023 19:28:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ifI4Z1a45RPyMD3FXRRm7pkD27yubEDZ2WJwKDghtu8mVneKtrHfF8+ChS3+rCmXD87iNumaBHnoalW1ZKYIjnPyYWkWKBzqTTZha8yRWSxh9he1099Vh+MgUGrtTkZR0aFkoLufshNcvjRji5rkQ6tYK0OIHqiTR3uhTPpdF14P3+My75vGru/oFXDXZNc1hrA3yJnvsfPU2ub9YeTbrT+UiZc5tvvUORuHMwz7l3/epvWKuzowKEPMIlZoKL4FsT5QAaRXxdY7MM0CKE6W/go/Ihx9w+IMDj625hAa8omE9oGUlg4ZUjWKH7D4w6+yDAOUBiKZRJviK9S/pN4LCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L8CYGDp/85GJxKAh0WneZaH4vmrXdDYInsNytRinZ08=; b=QvQV9yHgBikyuEnygQhpbacRbjAfZU2OdjomO4lHgftwV+u71ANh8MZq0Ko8OyNS7JNFl4dUv+GYPOJbKKnipGWUf5yePdSH9R6ZUQbIzwUODi77GTw60o9l3UkoixdTdFncwZ1dTrnqorRHAtHmLZlEihU6jntCi2r7AiLSNIpFNAFV9cyQ8QJy3R747CCHvehYm4yUgwKA3UtDEY0OLp5+LumvP9zcKmvMpvjSOV5dfiGuFpDH02mqTTq5g7DQG901yjVzCsFo7Sbb61Pcrv2q7g12DNaljsDcA9qW/STWIAWSLU7eH7PgCXkHDmHzuiMySjTqXymJOIPWkiYEZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L8CYGDp/85GJxKAh0WneZaH4vmrXdDYInsNytRinZ08=; b=8LaNgMCLNh0/BX/r5FpNp0KY9WD2H92CU448kNlDDO2RQyzE/mmPb4g3I9HHixnksbRRLEdLLflibArllFLIdsyKrzdVqv+7GhGUbfwcoD03RAwQM8mIe3PdztS9l6BJLkHmfjWuG67czv+N/kBUJU5XMu5mPOMpIG4VKOSJvT4= Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by DB9PR08MB6747.eurprd08.prod.outlook.com (2603:10a6:10:26e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.27; Sun, 5 Mar 2023 19:28:43 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::210c:d369:23f7:84fe]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::210c:d369:23f7:84fe%9]) with mapi id 15.20.6156.027; Sun, 5 Mar 2023 19:28:43 +0000 From: Tamar Christina To: Segher Boessenkool , Roger Sayle CC: 'GCC Patches' , Richard Sandiford Subject: Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend in combine when cheap. Thread-Topic: [PATCH] PR rtl-optimization/106594: Preserve zero_extend in combine when cheap. Thread-Index: AdlOxlGLdZf5RsEKSy2T3BJGVUY5jAAINXiAACxOqpw= Date: Sun, 5 Mar 2023 19:28:43 +0000 Message-ID: References: <000c01d94ec7$a6921430$f3b63c90$@nextmovesoftware.com> <20230304221749.GK25951@gate.crashing.org> In-Reply-To: <20230304221749.GK25951@gate.crashing.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: VI1PR08MB5325:EE_|DB9PR08MB6747:EE_|DBAEUR03FT003:EE_|AM0PR08MB5506:EE_ X-MS-Office365-Filtering-Correlation-Id: 16b94050-03f2-4cc4-2364-08db1dafde3a x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0TCJ+pe2sJrhWJQktMZdnDiHbiiBRBo5Tw5UTqleUNdilTsXbqWf/QjPGpd/isdnfJBm9QFft1ScEDKuRACA4MIjLH6iOcX7uUMQ+TuBnnFUcEjHn49/6Gi0Vl8TwmXfyhflnY5lcDoBVXodbA24Scln0r7M9TbGJmfgvLyZTGPcnLHIs3jiP63nCyntmzEqsl5f9o9a5e3ETGFGQQKbU/6tOHJ/HYVTEEnzNm1U5dFofuI/3hVD9NSmV0vsmduI7Piz3X10PuMBe1ooj1F4vE8XkF8A0Sy/fu4wM8JZCiBwu3fvpWhE6wJ6xNKZoQL7nM0sm1LOSEmb/LdfJ5sSZwBfW31KM+IR9qKkupQo3GviKsnPifSDaTz5mT9LZsmpw6qzsCzkBtM5Kv2SZqmjuAaU0cX9NIOnYk9U6AqsUOEZYSr1WReXFKAON+/6o5JIMR2w99GIiwio2LIF8XhENtVBHBfZpgr2TeO0SAXgKawSoaRU3VFf13OYYShINRV5ZPK7zToI9bWp8VDq2Iax7OcIRrYXsx421QO66doMuw5aMiIGebqat8RtXdr+CokT7RwkizYr9lh4+S3FBFLv3IDyyNYBXracp3loe+c3svLmmqD5vhIwButrT/zp69MwHzZB81mmBxXpi8UnO1EXvSeZEpO655EYRspxQN/K4zSWsJ3I2jJDQ9ua12nFhO6zJmiJgN+FGcZLktqC+L04UB/kQTHn9XiIVOo3db+ZywM= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB5325.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(39860400002)(366004)(376002)(136003)(396003)(451199018)(8936002)(5660300002)(52536014)(66446008)(91956017)(66476007)(66556008)(76116006)(66946007)(2906002)(8676002)(64756008)(4326008)(54906003)(110136005)(316002)(478600001)(7696005)(71200400001)(6506007)(53546011)(26005)(41300700001)(122000001)(33656002)(86362001)(83380400001)(38070700005)(55016003)(186003)(38100700002)(9686003)(158353003);DIR:OUT;SFP:1101; Content-Type: multipart/alternative; boundary="_000_VI1PR08MB53251080224EFA9FF000DC33FFB19VI1PR08MB5325eurp_" MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6747 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ef8007ef-48e2-40cf-f304-08db1dafd526 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DGA5rWKnWavnlt+ycHIDW3/Ki4fYzTB+DdIK10g8luSRIowKJ6cgwmGuLprFHNa+ScH6UwteWJp5MIs8EtnSLNmpj8eLvKTIXvcT3Uyvv6hwVDCZ0VF18HWWd6r69x02ATPKLqu+lW2Pc/1gk+ujhZhmm4JT1d9mJOu990QMWFUs3Z5yDBgp00eIPHUzsL5qDRG5I0Kkm130vZ0HdmTOQ7di8ptTMH8UGQeYu+5rjG3MVEU6fZPbGHS0lMKq4b395kz6c/HXlajsyLPC8Dce3cUdNDvTLFCQVqtJolf5EPKBv5Bu1katmhFU1q2E73phRE/bJwBsbyJjKN4nZZA5NsWZo/JLXdQ5PWAmE+1p/zzu50zPzzPEZp6Oq0sThUI06dntZ01+Q7npqNl/CKRFjf19+heIMpStlQ8EwLyICcA7m7Pjhyr/rKN94+okOZpXU7+OPji9Plg80YcddgrTJZNcYFn51RbwZ8lUfWRgecLv5smSCSyy1o43jKM4ZQQXZa853O+yzaVKv5j+NGeBJyt4nz4mLPrEsmvjvmJbjl21NODY62zSDQkXHBQ7VZ5aNgM6xoGcMS75xYGW+LZxYJkr3Nflf3fjBcFOzQOh2wAEors0Xf8K3waJr2aVx2yAkkb43ELDBgWwiv5l7Nb0H3g6rwpnFcwff0B6Q+C553cHK1Lzty0FeuTJeL5Q1dv+tnCB1Yl35MYyOmZ7gdm7ww== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(346002)(376002)(136003)(396003)(451199018)(36840700001)(46966006)(110136005)(54906003)(83380400001)(316002)(336012)(40480700001)(55016003)(86362001)(82310400005)(33656002)(186003)(9686003)(82740400003)(2906002)(5660300002)(70586007)(8936002)(8676002)(36860700001)(4326008)(41300700001)(70206006)(478600001)(6506007)(26005)(53546011)(47076005)(7696005)(356005)(81166007)(52536014)(158353003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2023 19:28:58.7735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16b94050-03f2-4cc4-2364-08db1dafde3a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5506 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,HTML_MESSAGE,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --_000_VI1PR08MB53251080224EFA9FF000DC33FFB19VI1PR08MB5325eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The regression was reported during stage-1. A patch was provided during sta= ge 1 and the discussions around combine stalled. The regression for AArch64 needs to be fixed in GCC 13. The hit is too big = just to "take". So we need a way forward, even if it's stage-4. Thanks, Tamar ________________________________ From: Segher Boessenkool Sent: Saturday, March 4, 2023 10:17 PM To: Roger Sayle Cc: 'GCC Patches' ; Tamar Christina ; Richard Sandiford Subject: Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend in co= mbine when cheap. On Sat, Mar 04, 2023 at 06:32:15PM -0000, Roger Sayle wrote: > This patch addresses PR rtl-optimization/106594, a P1 performance > regression affecting aarch64. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check, both with and without --target_board=3Dunix{-m32}, > with no new failures. It should be tested for performance everywhere else, too. It can very easily result in worse code on some targets. This kind of thing really should be done in stage 1, not stage 4. > PR rtl-optimization/106594 > * combine.cc (expand_compound_operation): Don't expand/transform > ZERO_EXTEND or SIGN_EXTEND on targets where rtx_cost claims they = are > cheap. That is not how combine works. If the old code is more expensive than what combine comes up with., it *should* transform it. Magic cost cutoffs are not okay anywhere in combine, either. If expand_compound_operation and friends misbehave (not really an "if", unfortunately), then please fix that, instead of randomly disabling parts of combine? Segher --_000_VI1PR08MB53251080224EFA9FF000DC33FFB19VI1PR08MB5325eurp_--