From patchwork Fri May 12 09:38:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 69230 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 714E53893C73 for ; Fri, 12 May 2023 09:43:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 714E53893C73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683884591; bh=B2UCPMYaNyBc0lBcP8ZmOcptxxVR/YZzYyhS5wyOIDk=; 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=c9cMBmyPvRd5MDw3s1jtJTpiGBCtD/7KQijTrOHhomBuoe+PC2UjNTIvrFMK7K7BM lSFMlEdTuYP+dvvCcy3i/Cb/zB/M4VHSRLhvuDHdcbrmeyySUvZeqfU799214SdcjJ CRRMeq76ETSSHUdFXsDs6X5ubXbtZjTUqvMI6XzY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2082.outbound.protection.outlook.com [40.107.7.82]) by sourceware.org (Postfix) with ESMTPS id AB7FD3856976 for ; Fri, 12 May 2023 09:39:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB7FD3856976 Received: from DB6PR0801CA0062.eurprd08.prod.outlook.com (2603:10a6:4:2b::30) by VI1PR08MB5422.eurprd08.prod.outlook.com (2603:10a6:803:12e::24) 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:17 +0000 Received: from DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:2b:cafe::ff) by DB6PR0801CA0062.outlook.office365.com (2603:10a6:4:2b::30) 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:17 +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 DBAEUR03FT004.mail.protection.outlook.com (100.127.142.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23 via Frontend Transport; Fri, 12 May 2023 09:39:17 +0000 Received: ("Tessian outbound 8b05220b4215:v136"); Fri, 12 May 2023 09:39:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cb8799e14dc1c894 X-CR-MTA-TID: 64aa7808 Received: from 3e8e40f1723f.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E262A239-A8F1-4F3B-90A8-B574CF7B1990.1; Fri, 12 May 2023 09:39:10 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3e8e40f1723f.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 May 2023 09:39:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jhZYKZqfiQMxGAXI5fwVTc+qMvYVoWh5Iw3j1ulCAGPxnpegX3WubOPw7wuJ8BKUsABNQ56Je4fB7Qb23e0Weltmt7fmaFMNm7Yhc+CAcg+VgafZDjXzr6nJV3L+opdiH0xumVtfzPSXoKoi104D+d8w48AO3RtYx9I8agOi2T8GmY8iqZ2+QrRL4N9kg7tV9gEwVT770kpUob3h3b165gYF68aNrGvg0vD0aP/f82te85IXEiWxe02kM6A/LMINjF3g1o78GbGBZuejs3+FjH0uSuquLi1D3KCIfHToqHs13c30/y3LzuZYLOk857/LaGXMkR2rmtNpDESwayGWqQ== 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=B2UCPMYaNyBc0lBcP8ZmOcptxxVR/YZzYyhS5wyOIDk=; b=nJ7vW1SBFYWuFkYG1yc2Qx6M+jsIQOzWEPGdHJIJCzHng3eCXw9L7c1xf1PfEPQKY5x5g4HP+eqAyCH5CKANixdUx+/6bKJ/mUP/B9UOaLITQqasKJyREJst+lIVy/UQpjwxAccvKtrAybuYRvhUGX/jM95w8hB2GNfP3IDtq77EiA8i4rjThDgVDPRGLGizKCuE2MMdDO41VUAMu4tV590PY7Jqwm2r5qtqgzCMvZkw+5XbJNv42jPsHgFOBJ23v80kYvrS9HFZbIP1z2pQ1pL5svlOFPcPSYZ/xrkit5uTEeoWawRshUPCIAfsPw40H+KOicQuPS9qHKJ/4ELeGw== 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 AM0PR07CA0002.eurprd07.prod.outlook.com (2603:10a6:208:ac::15) by DB9PR08MB6618.eurprd08.prod.outlook.com (2603:10a6:10:263::21) 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:39:02 +0000 Received: from AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:ac:cafe::6c) by AM0PR07CA0002.outlook.office365.com (2603:10a6:208:ac::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.6 via Frontend Transport; Fri, 12 May 2023 09:39:02 +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:39:02 +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:39:00 +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:39:00 +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:39:00 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 15/26] arm: [MVE intrinsics] add ternary_opt_n shape Date: Fri, 12 May 2023 11:38:44 +0200 Message-ID: <20230512093855.79529-15-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_|DB9PR08MB6618:EE_|DBAEUR03FT004:EE_|VI1PR08MB5422:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d66bb7f-2721-4df4-7b61-08db52ccc13a 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: GxW9xpJl3XV0FsLZhs0g6EnoVUeZ6fDxJw597mEd5FnX3j1z8VpOD8509nl7mGoV5lemRwSxbWDvr1KLMUDBrCWhsMV/riMeLVVZnm2pAJi78r9MDAc4Zeh5tVzeoliVkvPDqg/+Y+a+pUZHUT7Pu5u0W44T1vPM/s4hi4Sy3xPpvxG3cTxhoSl/0L4rdYcyRNPmaX4SdkNTuV5ScSg4s5TIwYkDPzIPOAyMSpmPwaaIs2G0NFxt2EgMMGxqxKDUuKMmw9NL2rsfxwBmjNwpvU74eYBz4n7ODReX57XFjVXFz7ORq+CrUabhpOXVLHOt5GULwZTX6eK0xBh53YzstGcLIqhDYd46yukEVw4LEKiPoUmxctcatIvmCkvbx9klMHMtZWzKalL6DdQMjolVTpLzWDckVwAexG6y0uf30yCQRICIngKaPS810oHNk3QKkdc7aNsgACqy3L1eR6PXa1C8n5B/UvzhowouWdYXhfjwReBRu4FWhMD2yTH2JTmGZgw32URLO3DOmGxiZrth0bcWHOJASjRtFpYcE6x2romOqrtXRHKwUHQstxz91S5utBl2SLV0mF8Mk1Ki1yBXVnBVF9TpzXQW0xBOA0hqTOa2MkDoA0ncfGaUV7I6jGtItaLx6AXykpC1Aw4vHzgcwuo0lWaQBhlAPOYN0b82TQ3F8iQMLdaSKeaNYYgnBgO0CT6dDo6H/wZwKPnOSffviTcQchEtD/rlZpDRyijwGhKjqadeLku2oHNuSEXVe4oC 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)(39860400002)(376002)(396003)(136003)(346002)(451199021)(46966006)(36840700001)(2906002)(4001150100001)(86362001)(2616005)(36860700001)(4326008)(6636002)(36756003)(6666004)(186003)(70586007)(70206006)(47076005)(336012)(426003)(1076003)(26005)(8676002)(41300700001)(8936002)(7696005)(44832011)(82310400005)(356005)(110136005)(81166007)(40480700001)(316002)(82740400003)(5660300002)(478600001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6618 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3aa29b82-17db-4787-6af6-08db52ccb88e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tN/XzXgprA7jUB4XtGeqGrNKEJUiVOnu/8uWD/Hvx4HjJkEavpJFteEDOVAfJAX6QRELu02MhwP7OpsLAiuQwNVOuKlZrkemQnqs36VArBAAEwn7SflESvzgKY1WsFGeLmID3rcnW/IV+UHBUZj6UYfmFFTcPSqblzAa9dhG4nNAIGgew6wQrkMturTVO7bk1iNeqMXSnYJDG+8ZDE+bkenalKmbwvS4rcN3byu82kX5iFIcvz73T4Jb4Q4Fn+9V3hVGZs0rgTDxwo9DFofGqhUdxQD7lqSMkCIBYlAXJymwJOkMvG01JqhQDt0RUfHBOnoraJGPTcl/ohQB/ipwyt+E9qJ8yq0r9/pk8397AesZm9pvlmRw8ME3cCzQ8qaGvYnLkMslUZhzkshwmkUUToJ7XF7oADFm3RxZ+rNbSlxaz9rMzBVAusvkNLYPRUcppwJEYVqsh9/fu7DahWclQT6V1uSfh8vQdnj7i6HuoqVies1xC/n0sgSARh5xaVNemxzrHSISh+NdBjVTM4XXAdMnppGR4MtmZNDo6vHsnE0lsGchhnJ2VKCwLTVH7gqgoLuTodzAmuCfzBkqI6m/kZ7bIUnGugV5PXuFKa3LwkkrS2pQy19q4/BAj4+hg2A+vhe5KzLyzi7IO3ozPZQKRCns9fmDL4nvLx3kdqTqceWdMX3TARr+WCfVQcRZFTmxgiyMAhjpIb7ZM8vzoHv6nmS2Zq4BlwTIAtFYZ1F01AhiToa016b+HGfE0h7kxenz 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)(376002)(346002)(396003)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(36756003)(26005)(186003)(4001150100001)(1076003)(82740400003)(81166007)(2906002)(40480700001)(336012)(47076005)(426003)(2616005)(36860700001)(40460700003)(82310400005)(41300700001)(86362001)(7696005)(6666004)(70586007)(70206006)(4326008)(316002)(6636002)(478600001)(5660300002)(110136005)(44832011)(8676002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 09:39:17.1698 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d66bb7f-2721-4df4-7b61-08db52ccc13a 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: DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5422 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 ternary_opt_n shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (ternary_opt_n): New. * config/arm/arm-mve-builtins-shapes.h (ternary_opt_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 30 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 31 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 6401a79c570..43532601fbe 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1399,6 +1399,36 @@ struct ternary_n_def : public overloaded_base<0> }; SHAPE (ternary_n) +/* _t vfoo[_t0](_t, _t, _t) + _t vfoo[_n_t0](_t, _t, _t) + + i.e. the standard shape for ternary operations that operate on + uniform types. + + Example: vfmaq. + float16x8_t [__arm_]vfmaq[_n_f16](float16x8_t add, float16x8_t m1, float16_t m2) + float16x8_t [__arm_]vfmaq_m[_n_f16](float16x8_t add, float16x8_t m1, float16_t m2, mve_pred16_t p) + float16x8_t [__arm_]vfmaq[_f16](float16x8_t add, float16x8_t m1, float16x8_t m2) + float16x8_t [__arm_]vfmaq_m[_f16](float16x8_t add, float16x8_t m1, float16x8_t m2, mve_pred16_t p) */ +struct ternary_opt_n_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_none, preserve_user_namespace); + build_all (b, "v0,v0,v0,v0", group, MODE_none, preserve_user_namespace); + build_all (b, "v0,v0,v0,s0", group, MODE_n, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + return r.resolve_uniform_opt_n (3); + } +}; +SHAPE (ternary_opt_n) + /* _t vfoo[_t0](_t) i.e. the standard shape for unary operations that operate on diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index ba53e8cc52e..f67a484c146 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -62,6 +62,7 @@ namespace arm_mve extern const function_shape *const mvn; extern const function_shape *const ternary; extern const function_shape *const ternary_n; + extern const function_shape *const ternary_opt_n; extern const function_shape *const unary; extern const function_shape *const unary_acc; extern const function_shape *const unary_convert;