From patchwork Fri May 12 09:38:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 69215 Return-Path: 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 847F53853D32 for ; Fri, 12 May 2023 09:39:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 847F53853D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683884381; bh=vz5BVOS2hitNjmaAb141OZTa00+g9fEyEVr5w5+S/90=; h=To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=WOOFvkFlYavQVbczvExTzZhJRLS07RIHKd/dvVRbLIk94uI/0z2BBKKRlhyzYDFxX 1azH3DYp3rkDrV9a2mMJ4Fu9txRh5GqdMvOOJVFzqX3DWGKwYdSDcvOY7+XUrY3dqc Q9yg+aB65Ybi4oqJKn1hkxXoQAR8eQXWaDT+05Ho= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2058.outbound.protection.outlook.com [40.107.249.58]) by sourceware.org (Postfix) with ESMTPS id 9EB16385840E for ; Fri, 12 May 2023 09:39:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EB16385840E Received: from AM6PR10CA0063.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::40) by PAXPR08MB6558.eurprd08.prod.outlook.com (2603:10a6:102:151::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23; Fri, 12 May 2023 09:39:08 +0000 Received: from AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:80:cafe::8b) by AM6PR10CA0063.outlook.office365.com (2603:10a6:209:80::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.24 via Frontend Transport; Fri, 12 May 2023 09:39:08 +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 AM7EUR03FT017.mail.protection.outlook.com (100.127.140.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18 via Frontend Transport; Fri, 12 May 2023 09:39:08 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Fri, 12 May 2023 09:39:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 27aefe1dc196cba3 X-CR-MTA-TID: 64aa7808 Received: from 126e4ec45e27.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 020CC1FB-B866-45FA-B4D3-090565107032.1; Fri, 12 May 2023 09:39:01 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 126e4ec45e27.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 May 2023 09:39:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h79XWSFegGQI9g+iBZAN0JufU0kdENUZ6WL7sHg9f0ghmqsErNU+Tmg+7qKEhkl88GflXHq0wx/v6dMp7r8ip8KPEFhM8urK16Zj+qkGmmHy3wJfCb0Lo7MPSs6irXEl3LK+JPfUpdx6FJcEaZQpM8WBp6vvoloXjNrBGnIg/vyeVj0oRSCuW7aHshoJ9otgCRPY+ug46H9F/SNlnGmnnVZmmXXx55PDfpKCvp0vYURJsmka+l7gd2ETbVcy5SzoPS9HXao6vKB6BQzlATsoGYdKdwS1hKJRQQwLHJ/vYCGZOW49blxvV1PLyqPTMNPD4ZSKqRfNfSDe/aN7dZ3uKg== 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=vz5BVOS2hitNjmaAb141OZTa00+g9fEyEVr5w5+S/90=; b=B+UbNTHmfh3dC1DqY6wTHu3cf8eUmGVeeWQWU5UwxO+D+GFDyx2Pi769lV8QYF/QP0twEuUiLTV8AydTRxiDFOOkNnN+6Yv2ZsJnt2HiXosXYC4F0YqzSPy3foVFcDCHlIreZggle+cIMj9ajw0AHA/P87+SJlWhuDSdvZALCBQz8ErZX04lmA7kJ9gRe3H/fYx9tmeubl7q8hrFcSAuPW+MK54WWXNGKEWI02R14SDffmKBaoaAgRXtZS3TzGmSp+jdDh/fXFwjj/jdTtMtnxjCYgM3DkbSe/jzwn1vUVgPYGm6AKjluoFyVeZMWwGzxjhKZiklUC44W81btX/P7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM0PR07CA0012.eurprd07.prod.outlook.com (2603:10a6:208:ac::25) by DB9PR08MB7627.eurprd08.prod.outlook.com (2603:10a6:10:30b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22; Fri, 12 May 2023 09:38:59 +0000 Received: from AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:ac:cafe::21) by AM0PR07CA0012.outlook.office365.com (2603:10a6:208:ac::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.8 via Frontend Transport; Fri, 12 May 2023 09:38:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT012.mail.protection.outlook.com (100.127.141.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.18 via Frontend Transport; Fri, 12 May 2023 09:38:59 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 12 May 2023 09:38:58 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 12 May 2023 09:38:58 +0000 Received: from e129018.arm.com (10.57.21.161) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Fri, 12 May 2023 09:38:58 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 09/26] arm: [MVE intrinsics] add binary_imm32 shape Date: Fri, 12 May 2023 11:38:38 +0200 Message-ID: <20230512093855.79529-9-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230512093855.79529-1-christophe.lyon@arm.com> References: <20230512093855.79529-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT012:EE_|DB9PR08MB7627:EE_|AM7EUR03FT017:EE_|PAXPR08MB6558:EE_ X-MS-Office365-Filtering-Correlation-Id: 98b5e66b-129e-4c85-b670-08db52ccbbf3 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: 0pEAk9X3RfkquUeR5jEjJ3rX+Yyd7itduLtvTYeRRGnRYamo7QcKTbfxgnnffq/WGG1NAWmaKNDXzUCctDGcWf9JHx9Y+0poIFs3QREYQa74yOOo97SEQGS7VROfcxT5+3s6DCOxZyG1WjfxG58atescEU0UkoIX3j6tnblgdurlSWEqX1GV1E0s7osf+K3YBgrW5NlZaCae/hmN/+IpFUQ85uzuNO50oOlNMW5Lxtksee37IHDMcAYes7aVh4k0bTQYnYQYcixb7wtZfrhP9+2ftr9SxodOrCYQkgfTKGJyHMOITjDyy8SVNqIRxaIxqP0wL8bUcKGjRnjeODP0sNM7E2eLwciI7wR8Q5D9rlBdsmwPF9sDy2Bxle0f3V78AvaU6uy9CavsC8/XtUvTalks43VlSiOGbyLjjXmnlu1rpU7406Y9uOX1eDC2N5HzAL9Yhmuk761jNHRzRMsOBw1f1srLWdrSsYE9EcpTNYue28GbM/uqDAs3G7AkFQ7KLLh8KrlycFlqPKwjt6dmkBBfAnPyZVU697ojVGCgaNTKXuN2u4n99sg1wMAyFc+NkwNkAMpOYglwlCnF2Crn+EqnhwvUbCv2JsrZoKSK1GrNAPBiPsBmP20E7IgEl9Y25Ud1wYmZA3ovjzTKY2pNJJS6fSrRsAWucikJk5kHJmTD1MirD2Nym9L4rk2RmVi8qa1GRFhJbkk3+addvaa+kDEl4OUhsAMTjdC3LgYgcYhm0sfX3JQSk4OkY5BLsxAE X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199021)(36840700001)(46966006)(7696005)(82310400005)(40480700001)(36756003)(336012)(36860700001)(2616005)(47076005)(426003)(26005)(1076003)(82740400003)(86362001)(44832011)(4001150100001)(2906002)(316002)(41300700001)(110136005)(5660300002)(8936002)(6636002)(8676002)(4326008)(356005)(81166007)(186003)(70586007)(70206006)(478600001)(6666004)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7627 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a5305211-0495-4b3a-14a8-08db52ccb6a8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HyFOnxYSz5UDmp4at/E++Qi40JW4lwNftau1gXFgwrcira6XDRR+eltveeyaS7JZe2yyCQD9GUh0DDPMhtPjVZmgaRq5KQeROuJhLvmU6Xt4d9rZ+nQMkg1eV/crTeYNcrTUi71gk3LMeJRgJJm/ToViEztQTIulKQMh+c1wdI1PLdeL/gvE0w/eVXhQComnjthn8/keNy+xNDAsD2aBZoBZ51YeKz+SMeHGg5H0yW2+/kQil3UZfcPrZ8ir/W99Fb2qviFVlfj1V+aXgBq9k2mCjvnfFvUCYcyOMwKmLpeOLenYG82dK4hUEojw/VpPRw1UTdciZLf1iN+he20C/P9ZdONECrrirkzwrAen6kIkLk/e0AZsNZ5sCEQaeCBdOWoCnmFuMPPitoM9YpWJes8+UPYMi5Wur7btgjP1k5FvvWaEz24HkelA8Y7h6r4Ap6la6gO1yiZf63K07Y5xkpNVFtzGWCffKgytSy2Dqv5ri2ZsJzBTWXkYVZGQLx5A7mWZH0e5F3F0w27kB675s0ZZB5DAMdxdKCvJRQCr80dpFXztyj8YeNj7P2Pmy4jDpDqvbKySnIJ3avypTzBV2O0WEabzO6vkP+HePAkW+GajJzs8hQWL8IGLaFeCiLg2asv+ZFIoDA4gIsp/k/Ym3sv5YR3ZAkuLwP9xqyjBmk4OI4qJaq80Cwp/z5o2UrNVkUlsNM2ldEs/Ii5xCpN+1nD0Q3bguEiPOhzLHt6mRqCHQJm2pxSLNjK1SmvsT9ag 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)(346002)(136003)(39860400002)(376002)(451199021)(40470700004)(36840700001)(46966006)(40460700003)(47076005)(426003)(4001150100001)(2616005)(2906002)(336012)(186003)(6636002)(4326008)(36860700001)(6666004)(316002)(70586007)(41300700001)(70206006)(110136005)(5660300002)(44832011)(478600001)(26005)(1076003)(7696005)(8936002)(8676002)(40480700001)(81166007)(82740400003)(82310400005)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 09:39:08.2549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98b5e66b-129e-4c85-b670-08db52ccbbf3 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: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6558 X-Spam-Status: No, score=-12.7 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Christophe Lyon via Gcc-patches From: Christophe Lyon Reply-To: Christophe Lyon Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch adds the binary_imm32 shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_imm32): New. * config/arm/arm-mve-builtins-shapes.h (binary_imm32): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 27 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 28 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 91540838e03..c2e138c12e1 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -489,6 +489,33 @@ struct binary_acca_int64_def : public overloaded_base<0> }; SHAPE (binary_acca_int64) +/* _t vfoo[_n_t0](_t, int32_t) + + i.e. the shape for binary operations that operate on + a vector and an int32_t. + + Example: vbrsrq. + int16x8_t [__arm_]vbrsrq[_n_s16](int16x8_t a, int32_t b) + int16x8_t [__arm_]vbrsrq_m[_n_s16](int16x8_t inactive, int16x8_t a, int32_t b, mve_pred16_t p) + int16x8_t [__arm_]vbrsrq_x[_n_s16](int16x8_t a, int32_t b, mve_pred16_t p) */ +struct binary_imm32_def : public overloaded_base<0> +{ + void + build (function_builder &b, const function_group_info &group, + bool preserve_user_namespace) const override + { + b.add_overloaded_functions (group, MODE_n, preserve_user_namespace); + build_all (b, "v0,v0,ss32", group, MODE_n, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + return r.resolve_uniform (1, 1); + } +}; +SHAPE (binary_imm32) + /* _t vfoo[_n_t0](_t, const int) Shape for vector shift right operations that take a vector first diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index 6ae1443f26b..bba38194ce2 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -41,6 +41,7 @@ namespace arm_mve extern const function_shape *const binary_acc_int64; extern const function_shape *const binary_acca_int32; extern const function_shape *const binary_acca_int64; + extern const function_shape *const binary_imm32; extern const function_shape *const binary_lshift_unsigned; extern const function_shape *const binary_maxamina; extern const function_shape *const binary_maxavminav;