From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2084.outbound.protection.outlook.com [40.107.6.84]) by sourceware.org (Postfix) with ESMTPS id 27B963856956 for ; Fri, 5 May 2023 10:57:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 27B963856956 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=3B5eTNrAUrMKr9aSuyAlDF1lvx08Lb5Ym2Kc3KVHWxU=; b=mz1SR7xu5FgvBrU1HM84GltWIZRjMX2PY1RJIstcfLEV0P1zMaVVdUSSHO6Id2yWvQYn0hTkGd5hExymgFtQDrxJ+tjYxBsZowwxY3Qar/9+KG94xxnAhx1Kgr+/HQyEAmG9J0MrAHm0uhLf+imOUEa6HAXE3FOphAcO2eTEw+I= Received: from AS9PR06CA0224.eurprd06.prod.outlook.com (2603:10a6:20b:45e::21) by DB5PR08MB10113.eurprd08.prod.outlook.com (2603:10a6:10:4a6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26; Fri, 5 May 2023 10:57:11 +0000 Received: from AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45e:cafe::e9) by AS9PR06CA0224.outlook.office365.com (2603:10a6:20b:45e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 10:57:11 +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 AM7EUR03FT016.mail.protection.outlook.com (100.127.140.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.12 via Frontend Transport; Fri, 5 May 2023 10:57:11 +0000 Received: ("Tessian outbound 3570909035da:v136"); Fri, 05 May 2023 10:57:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5a77281ac809b2ca X-CR-MTA-TID: 64aa7808 Received: from aa6c0388e3da.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E1080EFA-E094-490D-8248-7F475D5034ED.1; Fri, 05 May 2023 10:57:00 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id aa6c0388e3da.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 05 May 2023 10:57:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P511KgfjX9ngDoo4nh33Yt+mTd/oBotf31PHjGGlkC0K39EtCxN1SkswMeIqXc6jBSgPZMgGPS6HGrDHXQE90pROhriIA5fh9lEexVImoeJqVyAAwyU80wddRXHFryfpX0JsZhMeSdhQS7cXvp9uXI4NcG2ADP2ReduyVJNmal5X5AWlyWgemTv7qs8NbDzavFfzAHdwOmlfKEZQzdvCKdPcFKP1PMaidl2ED707oWdMpdMhQk5fyTbl29QhMJ3hEvyWELytxddYoj+I4QQBENh1j38dZJa0O5B7ce+yxj4yT0tlXlJX90LbM81L00/4YL6jbFOlY29Agg2/ICkebw== 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=3B5eTNrAUrMKr9aSuyAlDF1lvx08Lb5Ym2Kc3KVHWxU=; b=NSdIIlPx/qQ/2fgPmFSv1KQiXGobdHcPq4PmfwdqBten2SkEdIG9x417oBFyufAeyibJ32qNPThQ7Vm0fHkgzbfjqqxIGRZcja4lrw0ap736247YCLo8jy8gch6oewj/sZuTrCm7CY0icBl4bsTml60IkmoFzlh8a5haIt0lrd9A4Eg1tWnhZ7VTanzcvpCgfRIOlz3XNv4/nDMzCn3K8hnrEAzBE9V/rjlsWEvvOSz7fTJRMcpmvZntTRzCtqsdHri8Jcs1PQtdpSFxbrsb9aCcXspUYL939/b9SsvAf/MP93K8kHugyHtAtjwY2LvDrQOriiR09F8rkp9JasRCAA== 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=3B5eTNrAUrMKr9aSuyAlDF1lvx08Lb5Ym2Kc3KVHWxU=; b=mz1SR7xu5FgvBrU1HM84GltWIZRjMX2PY1RJIstcfLEV0P1zMaVVdUSSHO6Id2yWvQYn0hTkGd5hExymgFtQDrxJ+tjYxBsZowwxY3Qar/9+KG94xxnAhx1Kgr+/HQyEAmG9J0MrAHm0uhLf+imOUEa6HAXE3FOphAcO2eTEw+I= Received: from PAXPR08MB6926.eurprd08.prod.outlook.com (2603:10a6:102:138::24) by PA4PR08MB6157.eurprd08.prod.outlook.com (2603:10a6:102:e3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 10:56:54 +0000 Received: from PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::db73:66ba:ae70:1ff1]) by PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::db73:66ba:ae70:1ff1%3]) with mapi id 15.20.6363.027; Fri, 5 May 2023 10:56:54 +0000 From: Kyrylo Tkachov To: Christophe Lyon , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Richard Sandiford CC: Christophe Lyon Subject: RE: [PATCH 11/23] arm: [MVE intrinsics] add unspec_mve_function_exact_insn_vshl Thread-Topic: [PATCH 11/23] arm: [MVE intrinsics] add unspec_mve_function_exact_insn_vshl Thread-Index: AQHZfy0yoFX453dJREO3gCQrbNqgHa9Lgjgw Date: Fri, 5 May 2023 10:56:54 +0000 Message-ID: References: <20230505083930.101210-1-christophe.lyon@arm.com> <20230505083930.101210-11-christophe.lyon@arm.com> In-Reply-To: <20230505083930.101210-11-christophe.lyon@arm.com> Accept-Language: en-GB, 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: PAXPR08MB6926:EE_|PA4PR08MB6157:EE_|AM7EUR03FT016:EE_|DB5PR08MB10113:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bae8b4e-1d0a-4a04-e1bc-08db4d577a7e 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: Zad7P8bDKaq3N4XBujb43WWk+Hb/1Uh3Lfpbojn/6DQwxcyA1jBgPkOCfFrFdOupVne/ulxitaVIhOQO9eDHG7cKK2VSGmRG9LvwAxJXmjGNIiSDCljDGUJuj9sqHKXdWJNaKzsgQIZNGQjhnmBoCU8RVmFMcNWQmTkIqa4gx82Sq+nxB4ytqoic9PeGGHDxieZ7MhY1o2ndC2sQ20yKS6Bakw32iXfkHJZw9NMozxeycuejOG00z46GXInSFmsf0owYVSlZ0xXj8IJZF6a3dEBrLgVu8KTwmSaw2+qXbN73WAj4fOtH9uDOISnfFfatEFZdLeYX5zIeEBY9bymtk64T5OIg8bXsxUgXKhLfboOIejyb80Idf7BAW48XFng94AwcJAcHTibFx+Sv9BZOhx1hHl3cnMRYolcdN6zLS5aJjvb1IvE+JzQGbeXkC8Eb1YuhqEACM+YAniCMyx44wQN57k09Hsy4CsUtQ/OvQ3V7HW+b8Ujv29NiR+oNDRvyCmqb8/7dDDv6ft7MFYwTQzvYNSMOKaRh5Cul5DIc91nzHF/+K80JhIJxtXY0nLxDbxl/q/jZjHVDmFhf5zK6CyCWPdniRYaOHgKRiEVrRStgZ3yppPKUWmijOHEYDxsG X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6926.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(346002)(376002)(136003)(396003)(451199021)(7696005)(76116006)(66946007)(66556008)(66446008)(64756008)(66476007)(6636002)(4326008)(478600001)(316002)(110136005)(33656002)(71200400001)(86362001)(83380400001)(53546011)(9686003)(6506007)(26005)(8676002)(52536014)(8936002)(5660300002)(2906002)(41300700001)(55016003)(38100700002)(38070700005)(186003)(122000001);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6157 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: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 84dcf773-6485-49c5-c323-08db4d57706a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7iQhVZ3WHaeOoQ+MhrZ0ZpHS5C9THj48HTFE0Pgr1j1dJw1Z+2ci+iAk9/hWIyOCg4d89rUI4x04p71iMKGJz4/k78wlrdpPn/ah8Yu3ftwGoR2etMw/gWd474EZiHKW8xdFDu5bENtLJ2bzx0GFmYX1EmULqAjxkwEFh53xoP9PEAN/nzQRiNSxO6yviUWq7dBGL0SqNL+yfrYFcF0CI2nvhe18ebGYe3FSYkqPbYCOoFa2HXfa7GuPCJsYP5HOiYifKbwIqcpWu+ZWyaVDLnt0pFy4NINTOnbAyQ2e72mtKQQzXDfobZNvs3NLPOcRCQXAfB59EPXSKUrpXsd38CztCzcKHkkoZJ0qVabgqqsWL10U+lqjOiUgEuvjbYuI+2ccxjoXxu1eXT/I1L3QnEqQgqcxQ4hf0q/1eF6f3PC+lhlNNHePOILOUtznyPLqpsclQGj3AnuURP9cXRzUJEs7csF8I5P7AT4LHEc2R7pjj38XTq29CBLpj0EbarT9ytcxfZFpqp7mpFrEdqiDOUJEc/JIFhrjvfYAo/rRQ3HX9TNQR4kPbW/CX3Phf1ceeOG4AQ03bKAl29AFyPfTlAxX8NX0kM6crdchNJWKJoe/tMKj5sC/2OhdgHC0s6z7mNXJ8fuwe16nP5dopv3D2NsrtGYSWTqwtaVehTqxEIfilPXuE9pOQZ22EG8his6DJFQOTHhP5D3VXiUWNcdWaqg6Qr3XlqbTNrCMk0EEze8= 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:(13230028)(4636009)(396003)(39850400004)(136003)(376002)(346002)(451199021)(46966006)(40470700004)(36840700001)(36860700001)(47076005)(26005)(53546011)(2906002)(186003)(33656002)(7696005)(6506007)(9686003)(356005)(110136005)(83380400001)(336012)(82310400005)(34020700004)(478600001)(82740400003)(81166007)(316002)(40480700001)(40460700003)(6636002)(4326008)(70586007)(70206006)(8936002)(8676002)(41300700001)(52536014)(5660300002)(55016003)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 10:57:11.4905 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0bae8b4e-1d0a-4a04-e1bc-08db4d577a7e 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: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10113 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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: > -----Original Message----- > From: Christophe Lyon > Sent: Friday, May 5, 2023 9:39 AM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; > Richard Earnshaw ; Richard Sandiford > > Cc: Christophe Lyon > Subject: [PATCH 11/23] arm: [MVE intrinsics] add > unspec_mve_function_exact_insn_vshl >=20 > Introduce a function that will be used to build vshl intrinsics. They > are special because they have to handle MODE_r. >=20 Ok. Thanks, Kyrill > 2022-09-08 Christophe Lyon >=20 > gcc/ > * config/arm/arm-mve-builtins-functions.h (class > unspec_mve_function_exact_insn_vshl): New. > --- > gcc/config/arm/arm-mve-builtins-functions.h | 150 ++++++++++++++++++++ > 1 file changed, 150 insertions(+) >=20 > diff --git a/gcc/config/arm/arm-mve-builtins-functions.h > b/gcc/config/arm/arm-mve-builtins-functions.h > index 5abf913d182..533fd1159c6 100644 > --- a/gcc/config/arm/arm-mve-builtins-functions.h > +++ b/gcc/config/arm/arm-mve-builtins-functions.h > @@ -376,6 +376,156 @@ public: > } > }; >=20 > +/* Map the function directly to CODE (UNSPEC, M) for vshl-like > + builtins. The difference with unspec_mve_function_exact_insn is > + that this function handles MODE_r and the related unspecs.. */ > +class unspec_mve_function_exact_insn_vshl : public function_base > +{ > +public: > + CONSTEXPR unspec_mve_function_exact_insn_vshl (int unspec_for_sint, > + int unspec_for_uint, > + int unspec_for_n_sint, > + int unspec_for_n_uint, > + int unspec_for_m_sint, > + int unspec_for_m_uint, > + int unspec_for_m_n_sint, > + int unspec_for_m_n_uint, > + int unspec_for_m_r_sint, > + int unspec_for_m_r_uint, > + int unspec_for_r_sint, > + int unspec_for_r_uint) > + : m_unspec_for_sint (unspec_for_sint), > + m_unspec_for_uint (unspec_for_uint), > + m_unspec_for_n_sint (unspec_for_n_sint), > + m_unspec_for_n_uint (unspec_for_n_uint), > + m_unspec_for_m_sint (unspec_for_m_sint), > + m_unspec_for_m_uint (unspec_for_m_uint), > + m_unspec_for_m_n_sint (unspec_for_m_n_sint), > + m_unspec_for_m_n_uint (unspec_for_m_n_uint), > + m_unspec_for_m_r_sint (unspec_for_m_r_sint), > + m_unspec_for_m_r_uint (unspec_for_m_r_uint), > + m_unspec_for_r_sint (unspec_for_r_sint), > + m_unspec_for_r_uint (unspec_for_r_uint) > + {} > + > + /* The unspec code associated with signed-integer, unsigned-integer > + and floating-point operations respectively. It covers the cases > + with the _n suffix, and/or the _m predicate. */ > + int m_unspec_for_sint; > + int m_unspec_for_uint; > + int m_unspec_for_n_sint; > + int m_unspec_for_n_uint; > + int m_unspec_for_m_sint; > + int m_unspec_for_m_uint; > + int m_unspec_for_m_n_sint; > + int m_unspec_for_m_n_uint; > + int m_unspec_for_m_r_sint; > + int m_unspec_for_m_r_uint; > + int m_unspec_for_r_sint; > + int m_unspec_for_r_uint; > + > + rtx > + expand (function_expander &e) const override > + { > + insn_code code; > + switch (e.pred) > + { > + case PRED_none: > + switch (e.mode_suffix_id) > + { > + case MODE_none: > + /* No predicate, no suffix. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q (m_unspec_for_uint, m_unspec_for_uint, > e.vector_mode (0)); > + else > + code =3D code_for_mve_q (m_unspec_for_sint, m_unspec_for_sint, > e.vector_mode (0)); > + break; > + > + case MODE_n: > + /* No predicate, _n suffix. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_n (m_unspec_for_n_uint, > m_unspec_for_n_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_n (m_unspec_for_n_sint, > m_unspec_for_n_sint, e.vector_mode (0)); > + break; > + > + case MODE_r: > + /* No predicate, _r suffix. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_r (m_unspec_for_r_uint, > m_unspec_for_r_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_r (m_unspec_for_r_sint, > m_unspec_for_r_sint, e.vector_mode (0)); > + break; > + > + default: > + gcc_unreachable (); > + } > + return e.use_exact_insn (code); > + > + case PRED_m: > + switch (e.mode_suffix_id) > + { > + case MODE_none: > + /* No suffix, "m" predicate. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_m (m_unspec_for_m_uint, > m_unspec_for_m_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_m (m_unspec_for_m_sint, > m_unspec_for_m_sint, e.vector_mode (0)); > + break; > + > + case MODE_n: > + /* _n suffix, "m" predicate. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_m_n (m_unspec_for_m_n_uint, > m_unspec_for_m_n_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_m_n (m_unspec_for_m_n_sint, > m_unspec_for_m_n_sint, e.vector_mode (0)); > + break; > + > + case MODE_r: > + /* _r suffix, "m" predicate. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_m_r (m_unspec_for_m_r_uint, > m_unspec_for_m_r_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_m_r (m_unspec_for_m_r_sint, > m_unspec_for_m_r_sint, e.vector_mode (0)); > + break; > + > + default: > + gcc_unreachable (); > + } > + return e.use_cond_insn (code, 0); > + > + case PRED_x: > + switch (e.mode_suffix_id) > + { > + case MODE_none: > + /* No suffix, "x" predicate. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_m (m_unspec_for_m_uint, > m_unspec_for_m_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_m (m_unspec_for_m_sint, > m_unspec_for_m_sint, e.vector_mode (0)); > + break; > + > + case MODE_n: > + /* _n suffix, "x" predicate. */ > + if (e.type_suffix (0).unsigned_p) > + code =3D code_for_mve_q_m_n (m_unspec_for_m_n_uint, > m_unspec_for_m_n_uint, e.vector_mode (0)); > + else > + code =3D code_for_mve_q_m_n (m_unspec_for_m_n_sint, > m_unspec_for_m_n_sint, e.vector_mode (0)); > + break; > + > + default: > + gcc_unreachable (); > + } > + return e.use_pred_x_insn (code); > + > + default: > + gcc_unreachable (); > + } > + > + gcc_unreachable (); > + } > +}; > + > } /* end namespace arm_mve */ >=20 > /* Declare the global function base NAME, creating it from an instance > -- > 2.34.1