Message ID | LV2PR01MB78398755C9C2FFCC5CE994E8F7AF2@LV2PR01MB7839.prod.exchangelabs.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A7DA385DDFB for <patchwork@sourceware.org>; Sun, 21 Jul 2024 09:15:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from CY4PR05CU001.outbound.protection.outlook.com (mail-westcentralusazlp170100000.outbound.protection.outlook.com [IPv6:2a01:111:f403:c112::]) by sourceware.org (Postfix) with ESMTPS id 84C533858C39 for <gcc-patches@gcc.gnu.org>; Sun, 21 Jul 2024 09:15:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 84C533858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=os.amperecomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 84C533858C39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c112:: ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1721553304; cv=pass; b=KijPTX/21HjJCwOJv4y7GzmjVSkkVXQ3AXVYZBOYiPKFvkI6SFtpU84SK2AKnamV/QP2dls/BJ8M93ktW8BzxCP744ZRyVY8PhBthUzS8fHftzMJHA4a8MN0Z3s0rHgUU4Zldd2VdTBPgqbRUglaiXFCPttUUuHa43E71mxcYXk= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1721553304; c=relaxed/simple; bh=gEz6O6QwI0OEzID0gD8GpdxXGVS9gKUBWhSAMyPy+P4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BDScgPbFnVOlC4oH0lFnwwj0yKzj6Xa8/pGI7WqF8fzpSjIVR4/9Msv72hfMGDbC0apRcGrlXESVyKgIBek/wIMJ0+SJE7B/UVRi/DDbhWY6qTKYPlZB/TeOU6H7Ki30Ff1lImVWG220Kd/LxNhbSVCJKDAsBiOdvCJnnOvwr5w= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=doksAEPyj5mxLsOectPWN+A6AiWbcA3K0Ix+yE+UFOOivu5mBU7crjQJVAZnUDll84VKnReCLDOrjrtSV6mvnk6N74OX67O03+WLqmF4bZwSkPIpzQzKXZnbePA9LaiZxrwxReuj9btcUQny17+kyows/XgjdSw8KkwY2idEDdmDKuUAm/JutKFGHhbZe4H+onngHmAVn09Ezf+vKrjUF6xl3LKvUXdDDKA15liIjc3YB3rs5xShj6wkAnLxuUKqi0wK8MChFRb3IAUc0DdkMTk9xtFLDVlFN6ZGJJWHfgCbGN12gL9zpVu4Oudmra9xynSP13KYcYsEeuuA4336/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=HNDSINRcY8/OxUQogGuBQewkVe+wR/21k1X3QdrMfh0=; b=M/ZMvsKnw4iT6PUYx2TKFVPa7VAuNeGMJCrPYwloOSaOk2jX+DnpTN5WswXUn+vKBZ+BLsfQpx7Jo71bZvKS9BLvaiHhccwnt0PLhjRwTNawUaS8DecfzUT1wO6eaAG5Bptm2XhA+sUkUelDabWtwmT2jEnGxY2v+h4wdNB7BkQFGOhzOitClCDqJhNG+m9gRSs6KAU9NcXQ4G52vrS5SG94NWcUjj4by9pUnELwUMqV0p0L6tAexKPQsCG78wOxS8YUChUo+7VqofB4ViZKscTTflahMIOvz1TWzqS1s/3xupw7mkVlAk2sYLg6xxlcZLC1Oes9+2rX3T0B4vItDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HNDSINRcY8/OxUQogGuBQewkVe+wR/21k1X3QdrMfh0=; b=rVes/5QJIftXTBO5EgY+fPdH8gz9BUDRi3GQacBBIp4GF0E1gdNBbu5z0rl96dMGL+4sDTQJ4/vvFDuAl3bsxVWC3rNNfTEdr+xTHxVAtFojisIISW5anOTjQMJst1W4wuQXsvygOKrFlSWW4SpAMMeWIRmvcRZw9jvkLm8AAm4= Received: from LV2PR01MB7839.prod.exchangelabs.com (2603:10b6:408:14f::13) by DS7PR01MB7855.prod.exchangelabs.com (2603:10b6:8:82::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14; Sun, 21 Jul 2024 09:14:59 +0000 Received: from LV2PR01MB7839.prod.exchangelabs.com ([fe80::2ac3:5a77:36fd:9c63]) by LV2PR01MB7839.prod.exchangelabs.com ([fe80::2ac3:5a77:36fd:9c63%4]) with mapi id 15.20.7784.016; Sun, 21 Jul 2024 09:14:59 +0000 From: Feng Xue OS <fxue@os.amperecomputing.com> To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> CC: Richard Biener <richard.guenther@gmail.com>, Tamar Christina <Tamar.Christina@arm.com>, Richard Sandiford <Richard.Sandiford@arm.com> Subject: [RFC][PATCH 1/5] vect: Fix single_imm_use in tree_vect_patterns Thread-Topic: [RFC][PATCH 1/5] vect: Fix single_imm_use in tree_vect_patterns Thread-Index: AQHa20mwT9DDm8/aJUK1dkZViTITDQ== Date: Sun, 21 Jul 2024 09:14:59 +0000 Message-ID: <LV2PR01MB78398755C9C2FFCC5CE994E8F7AF2@LV2PR01MB7839.prod.exchangelabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Enabled=True; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SiteId=3bc2b170-fd94-476d-b0ce-4229bdc904a7; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SetDate=2024-07-21T09:14:58.925Z; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Name=Confidential; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_ContentBits=0; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV2PR01MB7839:EE_|DS7PR01MB7855:EE_ x-ms-office365-filtering-correlation-id: dddba7b3-c503-4a9d-c132-08dca9659855 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?J+FCIfMyQHhBhnqNkKrtlj/ipI?= =?iso-8859-1?q?Jk53/Kszm92e+oBuzDDVD9HCsy1BMPeVSpAo4fjozAULmjhdPCqQxBJFksrh?= =?iso-8859-1?q?56vcAfAjUjeC2o1Pg/QvG3uP8bTZs/wM2YnJcOMXuG4f9y1+A9kWK7Z8/8Dk?= =?iso-8859-1?q?1d1k6JTs1KI3cob4LwViLuOb4ARKh2yAblEzhXvtulgop8DyLslZSBYHYjw8?= =?iso-8859-1?q?LZzOarB58PwWSPoWLIrNQFS5NmLHSipkv4fEDftpI/Ww8PzSlKFkpfTpM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RP3ID49v8Iaea4MmKP9B1FtpQsy94j3s6VCeXdcFvHIcEr2Y?= =?iso-8859-1?q?y92poZ9nTId/uHq6xNblaJVMbnfZKRMyhetWPWnnvvbmKUPjkt2XH3Nns2Ok?= =?iso-8859-1?q?kLx6Viwcx3488gU68lTohcXaK8E7HEvupYllEtCV5ofUgZCg5vwsxKjrZ/Uy?= =?iso-8859-1?q?uZRODcHcJvnRYvMXqSChfiWbJ2pE2IYIoHKy7fA7v9ima1CpFP9pA0Fj7kfj?= =?iso-8859-1?q?2y7jdXP4QOkZ2bBs+6Lrw55kusTPrPLqwWJg9GFaMPgr4Bn23y/eeoEkZHnI?= =?iso-8859-1?q?iYzh9X0W3aZLrDoEI+uvKmJg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR01MB7839.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zCtgjHc934898222nDwKYDZ?= =?iso-8859-1?q?8tTA4szZCsCA02T04gz+FUWBN6Q5tNhNDelyWv43UpvqEgwNNXBRwEnt2Wrr?= =?iso-8859-1?q?yJ7MmYZA/NwWXWwDQDXoeC1n4ZbzXR6D7nExJ7k4wFn7p1qU80HiuxJ/QWZc?= =?iso-8859-1?q?Wu/pFYCUTTOXGc37y7SgoZJvpuJtLBQ22Ue2u3wxa6DaF98NU+QZ4hmiJ9Fj?= =?iso-8859-1?q?v6efu3xICJCBZZkMJtd9Jr+BrKooPMXPdfHKOg3UaGqcpXEQwDMBCZeTvFKv?= =?iso-8859-1?q?sOtuFUGCKJalK8wNtajojUbKAKydId+WJ9u4fMFJjkbwLUlXcDW4zNfqRPFo?= =?iso-8859-1?q?um9NGmH33reKKNz39uXTXDVhk4Ou5l+WHv7Rfux9Dzj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?q?49aTN4GnPNDX8sahi86KO24xXcigq3+23sbuAcnvjyuBtoGuRqJXiNR8y5ea?= =?iso-8859-1?q?59rPyyf94ehA4V58+tzw6DDEHGxGwFJJc70NnWnzscFavscSXAE+62QLJJz6?= =?iso-8859-1?q?eRRdrjFFvD4eteNdrT+bOT3rfEldHITvV1SbpgtS4fchXx71hEwmhjDbEgsJ?= =?iso-8859-1?q?UJSr8ZfVDw9QdH4H7euI0k/4Xn7juhLqNjjt8pJkfogOuogrg1wo0+CuNs3b?= =?iso-8859-1?q?t8kbAhZrrjcAsXXhdkJJtfwTq36kiW26ra0VgEl24t77Et4z9P/Kjqch+lrB?= =?iso-8859-1?q?mQ5LzYPZgrS1ne/q0Fwk+DYBNeyQ7MX2NlLnScAOrpdJ/pBY41b2Jx0ZoKFG?= =?iso-8859-1?q?tjipbtMWDQWkAXjTmBfAayIKtW9IIskH25iltug=3D=3D?= Content-Type: multipart/mixed; boundary="_002_LV2PR01MB78398755C9C2FFCC5CE994E8F7AF2LV2PR01MB7839prod_" MIME-Version: 1.0 X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV2PR01MB7839.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dddba7b3-c503-4a9d-c132-08dca9659855 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2024 09:14:59.1761 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dprWdc78DaSLlJBD2wPamL3bFJJ+nZ1b6XbwegFWL7MLPtZe9Cl6FPBhqriakJqGfWuEvqkwJED3YmSr03lcoWxWjlnu2nlI/LL3cmijn7Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7855 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
[RFC,1/5] vect: Fix single_imm_use in tree_vect_patterns
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | fail | Patch failed to apply |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Feng Xue OS
July 21, 2024, 9:14 a.m. UTC
The work for RFC (https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657860.html) involves not a little code change, so I have to separate it into several batches of patchset. This and the following patches constitute the first batch. Since pattern statement coexists with normal statements in a way that it is not linked into function body, we should not invoke utility procedures that depends on def/use graph on pattern statement, such as counting uses of a pseudo value defined by a pattern statement. This patch is to fix a bug of this type in vect pattern formation. Thanks, Feng --- gcc/ * tree-vect-patterns.cc (vect_recog_bitfield_ref_pattern): Only call single_imm_use if statement is not generated by pattern recognition. --- gcc/tree-vect-patterns.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Sun, Jul 21, 2024 at 11:15 AM Feng Xue OS <fxue@os.amperecomputing.com> wrote: > > The work for RFC (https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657860.html) > involves not a little code change, so I have to separate it into several batches > of patchset. This and the following patches constitute the first batch. > > Since pattern statement coexists with normal statements in a way that it is > not linked into function body, we should not invoke utility procedures that > depends on def/use graph on pattern statement, such as counting uses of a > pseudo value defined by a pattern statement. This patch is to fix a bug of > this type in vect pattern formation. > > Thanks, > Feng > --- > gcc/ > * tree-vect-patterns.cc (vect_recog_bitfield_ref_pattern): Only call > single_imm_use if statement is not generated by pattern recognition. > --- > gcc/tree-vect-patterns.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc > index 4570c25b664..ca8809e7cfd 100644 > --- a/gcc/tree-vect-patterns.cc > +++ b/gcc/tree-vect-patterns.cc > @@ -2700,7 +2700,8 @@ vect_recog_bitfield_ref_pattern (vec_info *vinfo, stmt_vec_info stmt_info, > /* If the only use of the result of this BIT_FIELD_REF + CONVERT is a > PLUS_EXPR then do the shift last as some targets can combine the shift and > add into a single instruction. */ > - if (lhs && single_imm_use (lhs, &use_p, &use_stmt)) > + if (lhs && !STMT_VINFO_RELATED_STMT (stmt_info) !is_pattern_stmt_p (stmt_info) should be clearer OK with that change. > + && single_imm_use (lhs, &use_p, &use_stmt)) > { > if (gimple_code (use_stmt) == GIMPLE_ASSIGN > && gimple_assign_rhs_code (use_stmt) == PLUS_EXPR) > -- > 2.17.1 >
From 52e1725339fc7e4552eb7916570790c4ab7f133d Mon Sep 17 00:00:00 2001 From: Feng Xue <fxue@os.amperecomputing.com> Date: Fri, 14 Jun 2024 15:49:23 +0800 Subject: [PATCH 1/5] vect: Fix single_imm_use in tree_vect_patterns Since pattern statement coexists with normal statements in a way that it is not linked into function body, we should not invoke utility procedures that depends on def/use graph on pattern statement, such as counting uses of a pseudo value defined by a pattern statement. This patch is to fix a bug of this type in vect pattern formation. 2024-06-14 Feng Xue <fxue@os.amperecomputing.com> gcc/ * tree-vect-patterns.cc (vect_recog_bitfield_ref_pattern): Only call single_imm_use if statement is not generated by pattern recognition. --- gcc/tree-vect-patterns.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index 4570c25b664..ca8809e7cfd 100644 --- a/gcc/tree-vect-patterns.cc +++ b/gcc/tree-vect-patterns.cc @@ -2700,7 +2700,8 @@ vect_recog_bitfield_ref_pattern (vec_info *vinfo, stmt_vec_info stmt_info, /* If the only use of the result of this BIT_FIELD_REF + CONVERT is a PLUS_EXPR then do the shift last as some targets can combine the shift and add into a single instruction. */ - if (lhs && single_imm_use (lhs, &use_p, &use_stmt)) + if (lhs && !STMT_VINFO_RELATED_STMT (stmt_info) + && single_imm_use (lhs, &use_p, &use_stmt)) { if (gimple_code (use_stmt) == GIMPLE_ASSIGN && gimple_assign_rhs_code (use_stmt) == PLUS_EXPR) -- 2.17.1