From patchwork Thu May 11 12:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1780008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=myuR7vSX; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QH9vP3PY7z214M for ; Thu, 11 May 2023 22:20:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 10CB33856DDF for ; Thu, 11 May 2023 12:19:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10CB33856DDF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683807599; bh=fbKYgF/fb2xCxSpk5Smi22BkbFAYRxzw56BTXOHAMSs=; 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=myuR7vSXqQyK1XuSrkW2NhdPJrxrkPOzKhM+sqt7Pou0qLrBk7OV8xG2GOYJ1YwlA 9BQkyi40bEABBbYsH1pdltjjZAIFHsxtxPhkwU9WXbf4X/L8mQ0KC95i88A8kfHPe0 qimR/hY1hKQr6Y2Par5TIIb/uuGO/hk2/TePzvoQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2065.outbound.protection.outlook.com [40.107.21.65]) by sourceware.org (Postfix) with ESMTPS id A39873858C54 for ; Thu, 11 May 2023 12:19:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A39873858C54 Received: from DUZPR01CA0062.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c2::15) by AS8PR08MB8112.eurprd08.prod.outlook.com (2603:10a6:20b:54e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Thu, 11 May 2023 12:19:29 +0000 Received: from DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3c2:cafe::59) by DUZPR01CA0062.outlook.office365.com (2603:10a6:10:3c2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21 via Frontend Transport; Thu, 11 May 2023 12:19:29 +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 DBAEUR03FT057.mail.protection.outlook.com (100.127.142.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21 via Frontend Transport; Thu, 11 May 2023 12:19:29 +0000 Received: ("Tessian outbound 99a3040377ca:v136"); Thu, 11 May 2023 12:19:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 580b2aefcb4c5225 X-CR-MTA-TID: 64aa7808 Received: from a74ae9ad63ed.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F533EE52-9FFA-42F6-A328-63C5FB945C7B.1; Thu, 11 May 2023 12:19:23 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a74ae9ad63ed.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 May 2023 12:19:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IPQRwWi5hTBOTDjwIXb8m9ScTJp1/C89nzhR1k9UhN2EfNdUJz3pFav4+a7hErZVOXVKyKdOB30AoKfzU30xbNccVrcwcKzi6/Mi3e9C8m06m+KHKLlvv1QWPSfN9iw0ZV86oh329L/5qGYKhnqarMxnbn+UO6fy4ChGsDbgkqXgrE02frojwSYoVly9DJZLQl29vug9lpY15vbWgHdC5i8XaO+ASZvzL+8F5yr8ISUs3ffbmY3xw+eWh0bM9T0xHYzYRnClyPqRgJLQXMDrvwXbBV+wbIKj//w1OA1m55B8rR0YVDnPSMAtWn7B3KmK9oyvtN7c7n7OqkDknUXWPA== 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=fbKYgF/fb2xCxSpk5Smi22BkbFAYRxzw56BTXOHAMSs=; b=fTUzWeRiJs6W77TWP28WKnqd04rE8ibvS0Qumdhx2GUh0/6fgAWfKGv4j06QGWKgTe+axI+akzmHUflHWJxh60USIPEynPWH7KXM2IQuCQhmUPXDvfa69mjQcW1ogFu2u7swWKJFrdZgy2xK7qqTCD0sOsXqcv+qZPx2D4IxS42MbM3nRfnETp+bHcaomIroo43kYCIioQtEuQuJboQQIWX6tN84fN3JZOv08y7o95XW65/hOcOfYqz5zwDvIriPmktaJMo+faDQD7nEYDcmEsDrEreAsA8wmJPSRQye2GoU2bVYpLiI9agq4WFd0j/8aCnbWGYDBphd7U9kQECYsg== 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 DB9PR02CA0009.eurprd02.prod.outlook.com (2603:10a6:10:1d9::14) by PAWPR08MB10210.eurprd08.prod.outlook.com (2603:10a6:102:367::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18; Thu, 11 May 2023 12:19:21 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d9:cafe::5e) by DB9PR02CA0009.outlook.office365.com (2603:10a6:10:1d9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21 via Frontend Transport; Thu, 11 May 2023 12:19:21 +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 DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.22 via Frontend Transport; Thu, 11 May 2023 12:19:21 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 11 May 2023 12:19:20 +0000 Received: from e129018.arm.com (10.57.23.121) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 12:19:20 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 02/24] arm: [MVE intrinsics] add unary_widen_acc shape Date: Thu, 11 May 2023 14:18:57 +0200 Message-ID: <20230511121919.16923-2-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511121919.16923-1-christophe.lyon@arm.com> References: <20230511121919.16923-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT007:EE_|PAWPR08MB10210:EE_|DBAEUR03FT057:EE_|AS8PR08MB8112:EE_ X-MS-Office365-Filtering-Correlation-Id: 7950d880-4b41-4ff7-7bd0-08db5219f853 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: Y80lFdg7aAu2jACe4qaIJxU0A/cEKBws2hgxdQf+MqBAnDRQjv93gUTuQd0iRDJkYmBfJB5aRmGOgjkPTHv3u6ShOZKID7CIBxdl5Fl4H58sFRGbcHsvfW7sJwGgnJIqZWkyXIA8ZdSYob8d1jvbb6FWZBQkMjJx9ohwV9uldmRdyZaz7H+FGGUz3aaH0R95K5cFxi9xZGk6x5YCb0MpnUfQwzlC+Uc+Ag6Beh+0/u1iFx9NdkWwQqYDAE5BTijZNWxMnWkdQ8YAHTo3fisL/5AjJT/ZG3k7VLB+ZIVULVQwQVgReMhp/MXv4owlYUeTaKA/rUSWc5wdgDVxKQSkhtSjPVBlp8/ivzNXgJd3asSsEILbKb/OsQKiHmDsIuc2fa8EV1S2Eh2fxVqRs+y+r1FY3CvYbWw3IELlfrRzQzLfERB6wId7AXRaK7MaM6IdqhM9QQxCaGMQ5o8PC2Qlasu2RvgEhZwseIz4x70fSUhPqVjdNSXKTSngniY25QMWVktIJ9yZ0/RFV5feYWFzCVDiss1NGjmio+Tq9vUirgzIwnieITyRTWndO4mrxOXy3JbbNYub79tn7b9zoTakMbnBq9wTCaLZtsJ0P/yaj/ZD8mlrcu2Nr5g5cF2FscyWIPH5k+bqKXttxskdrzivDZmYLrtSFFQjwJr51qyXxm+Dc7kc4w7wfTtGLvh6KEfBZp6BQInUj4sflBABEJ3LR3CtU4I2nJiu/8xAmUDNM7gMKQifnxI1+vdcS4haFPMQ11edx1Ihp0LjqgvEdBjG5g== 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)(136003)(396003)(346002)(376002)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(47076005)(426003)(4001150100001)(336012)(2616005)(40460700003)(186003)(86362001)(36756003)(82310400005)(82740400003)(81166007)(356005)(2906002)(36860700001)(40480700001)(6666004)(8676002)(5660300002)(8936002)(4326008)(70206006)(70586007)(44832011)(6636002)(1076003)(41300700001)(316002)(7696005)(478600001)(26005)(110136005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10210 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0d294092-a448-4a26-f823-08db5219f354 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s68/3C6T0eFr0AjNlh5I7q8gs7/mfhOOZ+7wG8g9pvyAEgEtQudhbPBP378kvb2UtDMA8eyZ+vGGfxgRWWggdi13PB0qy0Ja6GkcnnsTmUV27XWWmVd4SCiR7Gtpeq7bJ/vHTenVYq2w4gb1ptxIc5y0RXJekYEvF1Y0GmsApGsrt8wnuqg5WB5f9HkuiuOoX1e4pctjCfXxRy1ENH/MHQ7MGrMrg8JPR+Mz4ZIWOVYT4UIN7QLSmdtgapxbA2DOYK3cBez6FdTzaP9rVDLvpFKq47O5ezd6ScQwXFp6LcpWtFiMCAHIraEpRwIvHt7nADAU/drKL228troktacyBmgHDDECdiWlZxPa0tNvkLraZrHPdsCeEalCYj+FL70cnePNTfyol+73DD/dRsSte54258ZxHlaRotMLPpUPu2EdEFt/NGUGLL4a6j8UPk5RWBO0lRW2fiZvlPBm1+bMnK9fcDf3uInsIJAyKp7aRepg+kLL2Qt3HkeLsqyB7N1pAZDLDD+D8JWN84vulYjy3ptNLHr2kS7CGbyjGZTxaO4s7YkBPX9uuf1KKVa9L6lsjTBMjHwqrqHMJAlFX+boHP/V3EyoOuWEaA5FF+/+tOA3cABY7mlB1HgGf0X/A+cO1jlo7mMujT1Tj2gozJ0cex+t0EzNOkJKfvcWJE5mwUHkZPRiFL55HucvP3rVnPRbe5wxfMkM6PpB2KyL6ORGfA== 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)(39860400002)(376002)(346002)(136003)(451199021)(36840700001)(40470700004)(46966006)(6666004)(40460700003)(36860700001)(47076005)(316002)(426003)(4326008)(70586007)(86362001)(478600001)(6636002)(336012)(2616005)(44832011)(110136005)(26005)(7696005)(186003)(1076003)(70206006)(2906002)(4001150100001)(40480700001)(8936002)(82310400005)(41300700001)(36756003)(82740400003)(8676002)(81166007)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 12:19:29.6937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7950d880-4b41-4ff7-7bd0-08db5219f853 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: DBAEUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8112 X-Spam-Status: No, score=-12.6 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This patch adds the unary_widen_acc shape description. 2022-10-25 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (unary_widen_acc): New. * config/arm/arm-mve-builtins-shapes.h (unary_widen_acc): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 34 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 35 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index ae73fc6b1b7..a7faf8299cb 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1282,6 +1282,40 @@ struct unary_widen_def : public overloaded_base<0> }; SHAPE (unary_widen) +/* _t vfoo[_](_t, _t) + + i.e. a version of "unary" in which the source elements are half the + size of the destination scalar and accumulator, but have the same + type class. + + Example: vaddlvaq. + int64_t [__arm_]vaddlvaq[_s32](int64_t a, int32x4_t b) + int64_t [__arm_]vaddlvaq_p[_s32](int64_t a, int32x4_t b, mve_pred16_t p) */ +struct unary_widen_acc_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, "sw0,sw0,v0", group, MODE_none, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + unsigned int i, nargs; + type_suffix_index type; + if (!r.check_gp_argument (2, i, nargs) + || !r.require_derived_scalar_type (0, r.SAME_TYPE_CLASS) + || (type = r.infer_vector_type (i)) == NUM_TYPE_SUFFIXES) + return error_mark_node; + + return r.resolve_to (r.mode_suffix_id, type); + } +}; +SHAPE (unary_widen_acc) + } /* end namespace arm_mve */ #undef SHAPE diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index 5a8d9fe2b2d..46cc26ef918 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -59,6 +59,7 @@ namespace arm_mve extern const function_shape *const unary_int32_acc; extern const function_shape *const unary_n; extern const function_shape *const unary_widen; + extern const function_shape *const unary_widen_acc; } /* end namespace arm_mve::shapes */ } /* end namespace arm_mve */