From patchwork Fri May 12 09:38:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 69224 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 526663873E44 for ; Fri, 12 May 2023 09:42:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 526663873E44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683884522; bh=BpO7ZbsIT3XXYWeZrzCPJkI0AYzJddcHoXRgasx4ZdE=; 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=LcZ2OS6YUZ9cfVxHKKZqBP/nrtqPI+jDJWxVwMKfq+f0edW1L7qKP5D/dyGtVMKBe qkO5Py8yP/oW2mGKvBVJrVwEWpejVBF/IpAK5Ff8r8rbyByGlkadGDxlDnXO7cMo58 eF5qXA67zit9l2QtpzQiMnxtJxyoFZzUFyMwOGbs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2043.outbound.protection.outlook.com [40.107.241.43]) by sourceware.org (Postfix) with ESMTPS id 6C2863858425 for ; Fri, 12 May 2023 09:39:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C2863858425 Received: from DUZPR01CA0292.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b7::14) by AM7PR08MB5304.eurprd08.prod.outlook.com (2603:10a6:20b:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20; Fri, 12 May 2023 09:39:23 +0000 Received: from DBAEUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b7:cafe::5f) by DUZPR01CA0292.outlook.office365.com (2603:10a6:10:4b7::14) 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:23 +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; Fri, 12 May 2023 09:39:23 +0000 Received: ("Tessian outbound 945aec65ec65:v136"); Fri, 12 May 2023 09:39:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 33d683dc3ff65f36 X-CR-MTA-TID: 64aa7808 Received: from f70cf1b42714.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E6301F1C-2A99-457F-A98F-2A9DEE4F0336.1; Fri, 12 May 2023 09:39:15 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f70cf1b42714.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 May 2023 09:39:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbIwTbVQ8ZEOs9VfAuUkBxAidAitQwiYyuvPr4ZuMmerri+k5mbUsMT4YySpfOTe3m/J5iTKRl89RtqX8zsWLGYDrg7L4/umu0MG6dTQtNYciYPO4215XlseN8EiKRXDJmGot7w2oyH20fj9Us8HxryqjQYythN3SCBfkgZFl//cQjRScr6vNeT6YGR/5hq9tuAhRk+no4mvO6t92B1whRFGXrg3mQfkVhFLrAlZ7xGEW+YQ0ix3govsKWxiTnPTRuR1yEwZByUIcEHGf6Z9djZ4EY30hK7gvR/Ex5f1Q4TSDm7eCMCp3qzojM8TIeYGNAT1BZGOeJbb0ClBigHsoA== 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=BpO7ZbsIT3XXYWeZrzCPJkI0AYzJddcHoXRgasx4ZdE=; b=HbiTdvQUe204sb5/01LFA3M/u6mzBCkPyP9Ugd8US++FRzxMQCAnlLNVkzm0H6gRHmTFCN3AjK5k2Mn3JHKKlp+ZjcjmFvDh2jiuYmppzT8CmwXPyeXxol581KQqNGf+EORNMzwKA3Nmfe2UCkwlrIezwEMkeJdL2B+sAyIPYx6GBEpVa8D63L/BA7nJuQwCS6JdgYbMxcfoePbRgtMSYnrJdwhVbPW4YTiUe2CO529vVRS6wO22gplw4vcD7D7gWFBMUEOZH06K3M5IUkxC346nw+wDhdHT8LNkW0Vmpry4lUsAXJhwcywaV8YmuNS1kb8ie1/ckSYRmQ5Mh+BWhw== 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 AS9PR06CA0459.eurprd06.prod.outlook.com (2603:10a6:20b:49a::8) by DU0PR08MB8400.eurprd08.prod.outlook.com (2603:10a6:10:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.37; Fri, 12 May 2023 09:39:13 +0000 Received: from AM7EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49a:cafe::ec) by AS9PR06CA0459.outlook.office365.com (2603:10a6:20b:49a::8) 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:13 +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 AM7EUR03FT039.mail.protection.outlook.com (100.127.140.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.24 via Frontend Transport; Fri, 12 May 2023 09:39:13 +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; Fri, 12 May 2023 09:39:02 +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:01 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 19/26] arm: [MVE intrinsics] add vpsel shape Date: Fri, 12 May 2023 11:38:48 +0200 Message-ID: <20230512093855.79529-19-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: AM7EUR03FT039:EE_|DU0PR08MB8400:EE_|DBAEUR03FT025:EE_|AM7PR08MB5304:EE_ X-MS-Office365-Filtering-Correlation-Id: 675334e4-b520-409c-d21c-08db52ccc4c7 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: Wz0DfJ09Pgi0/ytMN1ORuuqJkwGH2B1B+Pmkq35HIkJueX7UhUY3RVjgwMuN8S6uOMQJRyfaLYAkTHYk5Ya4/TFAK1McOfdT06/SVypiuYsGtzcgQYl/GsYngNH3lXKjst2ExgN6CL9Kzx/PuHdUowYioFr9mNVqZ24H7DKs4alOe8Muq7mLuFZkhjzhqUF6VBhXc7LauVRJoEIuigCHNru6dD04ZYUSKbLpGi9WIJ2+dNxEaeVNEQOWsMfSSYHG5pLXExUByhiyEjYbfye0wXGsxicyPdyD7o7E2kqRkaDPOdJjtam3m1dU9rrR6Uq70W/nRTVM8WpnbZxwafO34ugTVlX1Ze+Xot0yyMvoJRvHlCJ+FlKVKJO7tva5AFbFr7sCf8a7jBM4hrvVN9vD8VvfZYSvH0zjCEX64rpFP/rttQbgLj9EPEi7gN9LAImtS2VyPjiJyOeaTmqoldn+KrvdVkbncXZHM/YIy3IG6zfsyCyo81YL786Bhz7p1yNqlutADOD4lNFn+/FGHxZap4Zj2wUIcDBKULr9bamFPvXTOJ0ZP/obbxQDi8Wg/jwWbZPIpvU7Cw3AJM68bkb/3nV+IYQ/vvKzY7ihd0DzgLr4hI0guPu9V+jbH/g558PZ8O58Hib5OP6OGZYZ/PC3d1isSbohrT5T+KS9EtjEnfE+YLn+NFw3KziqwMKh3IgxGpXp5/7W82kdtNmmhBwoN0G3pCVnco3rqeZks0cqlK4= 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)(346002)(396003)(376002)(136003)(451199021)(36840700001)(40470700004)(46966006)(86362001)(36756003)(110136005)(316002)(4326008)(70586007)(6636002)(70206006)(7696005)(478600001)(41300700001)(6666004)(40480700001)(82310400005)(4001150100001)(8676002)(5660300002)(8936002)(2906002)(44832011)(81166007)(356005)(82740400003)(2616005)(186003)(26005)(1076003)(36860700001)(426003)(47076005)(336012)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8400 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e9755779-30b1-4261-0d42-08db52ccbf08 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H6VldlBnXp4uz2VPx6f2eWjUNUZ5C8gtEXWecqb9jfNaWBQpxjLitYNuBr2iLz124SuoeOFJr4C+OICmYRKzcKkU4Ef3o0uHfS0iaoBEZDhnSoPaSb+fBd8pPKORBWLkeIBGL9RCHx0yLYkGKvPakd0BWvDmEdQSUYBpNs4mHtlSVxbMAb4bJig+g3z+gO4pHlv6wYQvfbYDLqbWY9sUUWAdZIHX8AnwDGCoxIuz0pnS/MT+26AC++73FG6TZtoGFoB5SViwJIB6CpYOCd6/2WCXuHYMyXYBHjf3iKcFiMHFN4ADn8F+mQYpytmOSrgn1YpBBWKueZ1YYQvYFtTB4FA4BN4BpeUzMCUhI1OvevY754JjjuMaEJzdBse4qhOKY2XY5/TGPkdjoe9+2wQGFutt2sTuwOXAN2J12UevLUo4n6n1jloITgQeE6sb+BqkAvtz0k5z6yxJ52tBrOpIrwgcgskoQ3C1TfIbrFmbh/PWFbct5+J+9mW43lm/7mpCMQLLO+AwUgTW/SpPdywBAMRNqKXHnNJT5wg1hDarT/zYezn7LqJlDX5I2Ck3u/94Fq4iWG3Z/LfnjTWG3VTE1ERCIUiv/0ur9zOsojq8ATRHKyOThOp4k/WqAc+Ycw/x/CeXlo0bb82d3M8o+XuWOMaIBzQ7RIuldoKHx+Hgv7csY4Gx5clGlRI8Tv2t/Vx/6ZdVXhc9uGEcFukv8y3DGEPmq+x/psFhcHQVV3zLQg7BVKnnNVMRaBdfGKh5g5Ki 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)(39860400002)(376002)(346002)(396003)(136003)(451199021)(40470700004)(36840700001)(46966006)(478600001)(36756003)(110136005)(6666004)(7696005)(316002)(70586007)(4001150100001)(4326008)(6636002)(70206006)(8936002)(44832011)(41300700001)(8676002)(40460700003)(2906002)(5660300002)(40480700001)(81166007)(86362001)(82740400003)(36860700001)(82310400005)(336012)(47076005)(26005)(2616005)(1076003)(186003)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 09:39:23.1136 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 675334e4-b520-409c-d21c-08db52ccc4c7 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: AM7PR08MB5304 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 vpsel shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (vpsel): New. * config/arm/arm-mve-builtins-shapes.h (vpsel): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 39 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 40 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 43532601fbe..012cf3ef4c0 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1706,6 +1706,45 @@ struct unary_widen_acc_def : public overloaded_base<0> }; SHAPE (unary_widen_acc) +/* _t vfoo[_t0](_t, _t, mve_pred16_t) + + i.e. a version of the standard ternary shape in which + the final argument is always a set of predicates. + + Example: vpselq. + int16x8_t [__arm_]vpselq[_s16](int16x8_t a, int16x8_t b, mve_pred16_t p) */ +struct vpsel_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,p", 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 (0)) == NUM_TYPE_SUFFIXES) + return error_mark_node; + + unsigned int last_arg = i; + for (i = 0; i < last_arg; i++) + if (!r.require_matching_vector_type (i, type)) + return error_mark_node; + + if (!r.require_vector_type (2 , VECTOR_TYPE_mve_pred16_t)) + return error_mark_node; + + return r.resolve_to (r.mode_suffix_id, type); + } +}; +SHAPE (vpsel) + } /* 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 f67a484c146..6e818092a87 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -71,6 +71,7 @@ namespace arm_mve extern const function_shape *const unary_n; extern const function_shape *const unary_widen; extern const function_shape *const unary_widen_acc; + extern const function_shape *const vpsel; } /* end namespace arm_mve::shapes */ } /* end namespace arm_mve */