From patchwork Thu May 11 12:19:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1780010 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=SKLEOdZN; 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 4QH9vX2Mwhz213w for ; Thu, 11 May 2023 22:20:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 515723855593 for ; Thu, 11 May 2023 12:20:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 515723855593 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683807606; bh=hQ58heSyyzTaS4GDQmVRex7MrLonYMJB8kRNMr0SOHI=; 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=SKLEOdZNUGXToCk35ybIhAyJzpbAy5Ad3pxqxoEaXw044bPODq6XG5xUAY9xAslMS F6osKrQQrgEXKfFwV5OWRkP3WhdBrBRFBHlhWhgqtmBBW6HiCwjzW2uvSBvO5aUaQL 9kgxtZdkc0RqWtBwlad6DFhbV5+CDUa6yusOGrrA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2063.outbound.protection.outlook.com [40.107.20.63]) by sourceware.org (Postfix) with ESMTPS id 8D8193858434 for ; Thu, 11 May 2023 12:19:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D8193858434 Received: from DU2P250CA0019.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::24) by AM9PR08MB6194.eurprd08.prod.outlook.com (2603:10a6:20b:2d5::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21; Thu, 11 May 2023 12:19:35 +0000 Received: from DBAEUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:231:cafe::49) by DU2P250CA0019.outlook.office365.com (2603:10a6:10:231::24) 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:35 +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 DBAEUR03FT025.mail.protection.outlook.com (100.127.142.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18 via Frontend Transport; Thu, 11 May 2023 12:19:34 +0000 Received: ("Tessian outbound 3a01b65b5aad:v136"); Thu, 11 May 2023 12:19:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5122a0d89b2f709c X-CR-MTA-TID: 64aa7808 Received: from 4e379cc68c34.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 69DCC1A1-1233-4587-ADAA-9F95B4AC0353.1; Thu, 11 May 2023 12:19:27 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4e379cc68c34.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 May 2023 12:19:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L8V7JG5vjoZkntrT97FmzKY46xZIrP3AVu9HqSMYeZBxUkt+2DcTTelgnS9qDCmLNTyh4iCMDS0xhjUmYdiBoLr9lLD/mPybtP9y9mNl7KSw5+2kgB0q2gVQg1mOpGiv4xUq+nKhnloEntORGRu6siGLklsSCXX5E6VQWF8jQn0EZ5l0FbpUwpYlwY6PAaNtUum47BG/MUGhNg8rAOyEt3XAvZh7gQOBXsaLv6aNXdefVw5qyVe211ChH3l8infMBVWQphvS/ru8z5wo8yj3MPQiXJU6zqA3b3H1X3+Iby7YE/pDo/j6opg1PANdiV5cor6kdwrYdCpO9mQqtxCfbw== 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=hQ58heSyyzTaS4GDQmVRex7MrLonYMJB8kRNMr0SOHI=; b=V8EgDRv74o2WAK5QyjqeQBjUb4CAXIlB7KimTxuwsxXquUPTovRipLG2g5cYGrjDD48uN11gpO/glB0DKMVp78Uvxd3HyDZEYvtZB6HV4aakEoLBwOUG7Q9mNfu1gYGYV7AbJKtmq+LcjOaYIRdcxnZlpAxVM51wQ+BoxcTS++tEzcw8eBnbPmvIgDHLOCeX1yInVy5CQm4qXMr32XQ4ZC1+GT9yX7/1UNByG6dF2j1PJIihPEHYSy6VweAs8jW8+KHHMdoLLH7PJhyVqYkEbws2NO6sFYmQkkw9DMu7x5pHIgJDpCCd/QgmtZ9sce7tBxf6vZbb2rcSPKJeoSqKKw== 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 AM6PR10CA0003.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::16) by AM7PR08MB5461.eurprd08.prod.outlook.com (2603:10a6:20b:10e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20; Thu, 11 May 2023 12:19:24 +0000 Received: from AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::59) by AM6PR10CA0003.outlook.office365.com (2603:10a6:209:89::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22 via Frontend Transport; Thu, 11 May 2023 12:19:24 +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 AM7EUR03FT053.mail.protection.outlook.com (100.127.140.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.20 via Frontend Transport; Thu, 11 May 2023 12:19:24 +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; Thu, 11 May 2023 12:19:23 +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; Thu, 11 May 2023 12:19:22 +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:22 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 07/24] arm: [MVE intrinsics] add binary_acca_int32 shape Date: Thu, 11 May 2023 14:19:02 +0200 Message-ID: <20230511121919.16923-7-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: AM7EUR03FT053:EE_|AM7PR08MB5461:EE_|DBAEUR03FT025:EE_|AM9PR08MB6194:EE_ X-MS-Office365-Filtering-Correlation-Id: 35cae71b-1cdf-43ee-25df-08db5219fb3a 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: 78YpfZjGZFComdoXikEr4vINKG/wx53l8gyio13dh7nrNqrMO347ql6FSGhShgMWnWJeReVBh8JLCtodqf16PaOE6AQKw0j0mjjc6K0i+3/XNKnnAOUlpF6VOuVWeaxvQv7/JIqFQ8FWiP3YuVmKw9nJl1GNW9BrnlwVQeDXBIgAK6XVwrSpHalzqEH512xMmr2Y90A5+zFFsxjZ/5kukx1TuaO+ZQSPgnLdhunJBCE5/femJp2TmJn01rfxRftNH9wldAySHuBClhPb66Xd2CQVMZcGbj5rBYS06XQ0ByqRejpas04m9PTauY+NaXN40IdduliJ9c1HFL8j8ylC686bFmkgyjr0TaNRy4X2USPnIc+AK+bDMotjKL9naP6lcoRCXIf5qfxdqi893W8GN9hIfTwoNZhFYFGtINt3AFNa8nXQw+rlLpymXSo0pPexTOV2VrdPrIiMl+AZuKhTJ4P/qVyzJS8OqdOsNxb5s8oMRBiY1EUdBvp0agUPKSpqjUy6rzgKg5x8BN0aPz9Le8/ALkTGDBX1lA06Ov1kbom0i2I5L0eTuI69OLM6uBo0/Zc6VIKC5Aj5p+70/bzoOkC7nIxYV2P2li1Gl6c/r8QeqtYxu702tq8OWE5NbrB67/8IoM4LtB2lVTAoc3zyJdhg3Hij0lr9qSyZ7ee8lkzd8QvpawtUPJ+jL9evS5wKP6H0Ra7vS7Kkgsj2CLl5L6IYcxTqyvoy/Cu3oHH1dWZUqLenXtrrbCRoNit1Q0xQ 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)(136003)(376002)(396003)(346002)(451199021)(46966006)(36840700001)(316002)(110136005)(36860700001)(478600001)(7696005)(86362001)(356005)(82310400005)(6666004)(6636002)(4326008)(70206006)(70586007)(336012)(426003)(36756003)(47076005)(2616005)(8676002)(41300700001)(81166007)(8936002)(44832011)(82740400003)(4001150100001)(26005)(186003)(2906002)(1076003)(5660300002)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5461 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2839148b-fe38-4fc8-7c71-08db5219f50f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wWqXnDtFzo5CLE9L2aH8LeUtIdJ5TKOzehsBjA6K18J8z5CxeILQBNX0kmML5mvEIGLLWxZDmmq7wDkiLl4jOkF0vHYXYv+85GrhqMo+Oo50oTOw2/QvkQsv1GvGlNr/fYPDqngECxdqF6oFNHq0M3NfQXSqAd1/hUEFnKyWCXM3xnrdpxbyXMJ3Gkfj+DIJ5W5ng/hem+qOMvizUPl+KufyhLdl0uMoBhMiRfKPffMD/BvK1FpZEioDQZ4ZVVBX/9DCTu0l4zmYSRw54Sfhb9pFU+L7i4FQ1lvGx5GvleMnPe1REL2wuDVmLpJGb7o5pgjWzPSdJvwpvfuwvSzSK1/d6nd4eHc13svw4HhMjJyE7vezWvG6QR7kYF0FrXGUBG55rh1nMhmeQkRuUrAu6sjNmDE3aSL91MAlKszaqBWKwKvGjVcg8/ylci8zThjwRehLuwegb+3ewJUsi7Pl6RbR+yD3Pol7pEP54E3PeJnIko8798jHOlUYqjn0RzQEG+ZNKiCSPdwclgkwr6pPpSMH3m/nHH/nTugMTYZlkUAMm0WnA4feYzaqI3TAUizP3yeFnWNcf4QiyIA2JyhFNMRCMotm2HMBoNqkRNeaOr/n9kkjow4DolpfudMu1DtDZR71LjOTHgV1SJAubFzB8kISvJ+vb3F09ryOxRL84FsHBh7qK5FoFg7mFFiTplIoc86nzuow2BaG0F8LNGlhUqf599KMSGbWs+xnUoPk2Apk7xY3eS5GkBjgtRg3bCm3 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)(136003)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(36860700001)(426003)(336012)(82310400005)(2616005)(36756003)(40480700001)(26005)(1076003)(86362001)(186003)(41300700001)(70206006)(82740400003)(81166007)(316002)(8676002)(5660300002)(70586007)(6666004)(4326008)(6636002)(8936002)(110136005)(7696005)(47076005)(478600001)(44832011)(2906002)(4001150100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 12:19:34.5609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35cae71b-1cdf-43ee-25df-08db5219fb3a 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: DBAEUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6194 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 binary_acca_int32 shape description. 2022-10-25 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_acca_int32): New. * config/arm/arm-mve-builtins-shapes.h (binary_acca_int32): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 37 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 38 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index e491c810b40..ceb13230da6 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -392,6 +392,43 @@ struct binary_acc_int32_def : public overloaded_base<0> }; SHAPE (binary_acc_int32) +/* <[u]int32>_t vfoo[_]([u]int32_t, _t, _t) + + Example: vmladavaq. + int32_t [__arm_]vmladavaq[_s16](int32_t add, int16x8_t m1, int16x8_t m2) + int32_t [__arm_]vmladavaq_p[_s16](int32_t add, int16x8_t m1, int16x8_t m2, mve_pred16_t p) */ +struct binary_acca_int32_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, "sx32,sx32,v0,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 (3, i, nargs) + || (type = r.infer_vector_type (1)) == NUM_TYPE_SUFFIXES) + return error_mark_node; + + unsigned int last_arg = i; + for (i = 1; i < last_arg; i++) + if (!r.require_matching_vector_type (i, type)) + return error_mark_node; + + if (!r.require_integer_immediate (0)) + return error_mark_node; + + return r.resolve_to (r.mode_suffix_id, type); + } +}; +SHAPE (binary_acca_int32) + /* _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 9e877c9591a..7f68d41efe6 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -38,6 +38,7 @@ namespace arm_mve extern const function_shape *const binary_lshift; extern const function_shape *const binary_lshift_r; extern const function_shape *const binary_acc_int32; + extern const function_shape *const binary_acca_int32; extern const function_shape *const binary_maxamina; extern const function_shape *const binary_maxavminav; extern const function_shape *const binary_maxvminv;