From patchwork Tue Apr 18 13:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 84857 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2867022vqo; Tue, 18 Apr 2023 06:52:09 -0700 (PDT) X-Google-Smtp-Source: AKy350brZKIEYiRvwPHT86Ec2O8TsbFUqU2uiPRbxp/perHZGkDQQTEAD2LT4r3xp6zq1m1M4Wju X-Received: by 2002:a17:906:3acd:b0:94f:5b91:7952 with SMTP id z13-20020a1709063acd00b0094f5b917952mr6997054ejd.21.1681825929312; Tue, 18 Apr 2023 06:52:09 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id up34-20020a170907cca200b0094f33368759si5850009ejc.553.2023.04.18.06.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 06:52:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=LSOzuBAv; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BCEDC3882025 for ; Tue, 18 Apr 2023 13:49:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCEDC3882025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681825785; bh=SOlJw5YduTgES+zEBpr0eHGqnaHZpNWqLV+RJ6aRH7s=; 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=LSOzuBAvSj+lz9MOxFzdPCZDPHJ88S5HYtXDzfPm5X/su6Oo1seLB5W2zu0F3nYds 0nqh07i0ksX+nGAUtRZNR6sRDePcLl91sjEBi7r3q2OwLw5l8xH9q/j9g/8kmSUTF5 s85hEkVaFjZJ4BkFQ9CnXi01ORE2I0p/63EEtvQg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2062.outbound.protection.outlook.com [40.107.22.62]) by sourceware.org (Postfix) with ESMTPS id 1E01B3857711 for ; Tue, 18 Apr 2023 13:47:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E01B3857711 Received: from AM6P194CA0028.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::41) by AM0PR08MB5489.eurprd08.prod.outlook.com (2603:10a6:208:18e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 13:47:35 +0000 Received: from AM7EUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:90:cafe::bc) by AM6P194CA0028.outlook.office365.com (2603:10a6:209:90::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.47 via Frontend Transport; Tue, 18 Apr 2023 13:47: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 AM7EUR03FT058.mail.protection.outlook.com (100.127.140.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20 via Frontend Transport; Tue, 18 Apr 2023 13:47:35 +0000 Received: ("Tessian outbound 3a01b65b5aad:v136"); Tue, 18 Apr 2023 13:47:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 82d221db7da05c2e X-CR-MTA-TID: 64aa7808 Received: from b8df48cbbd4e.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B8D722B3-3AF7-4A4A-8E37-1F4FE5D6C743.1; Tue, 18 Apr 2023 13:47:23 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b8df48cbbd4e.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 18 Apr 2023 13:47:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JRRWPsZBWKp+oVuk0BKK8EFKkX2RIpWksVsdxowAph8xRZYuRyD50sxh2op3/Nwe0InbGLd8HRID57fT3IgB4tBfNt02jznEc05eV4aPY9od0uLeFvZMng8veJUQAponQA/PQecAtNUWJ9YXIhPerQeuCZb2LJ2ARMyksmR1dmVldcSfsmAVCewLvosr60DM/NSPpf/K+1JmoaMGueWjYgpbNqP107TxTax2ljZ7sRdx2GfAm/FrWtU5ZzTYCMLrJOgOoJ/zrFxILNJ4MvvUifI8ILuv/06Z5fDlPt3yzSwTE14zuNBlJuuLnPpWVxb9xb4HDyT2wquO3235nt/9sA== 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=SOlJw5YduTgES+zEBpr0eHGqnaHZpNWqLV+RJ6aRH7s=; b=BK8gaAbvA2+qg1aqLrNM6J3h/InQH1vcjjs5Lo3914naSAYcZhcnxkLJu/mDUdCYTw5jU1oreT1IrpLpROaIpBTXlI4buYTP+MGqDv2W+fHJusxmQRXm1AMBb268S3+prRXfTn953goL8AgvoYp1Kx+ht4qo1p07fq03VVaeQ7NZy41CeTf8DvvTn88s7VwqcEmxV8hN6VVEdSw1RC8X7bxfJzhEOqT160+i/mKhb4wObC5M30NxdE2e1QJgyyeNMjCUO/ARwLSeP4cxwqvma781EkDhpI255urGnakGeEfDZDNNKbk8mD4H9ImbiUMfMIznKGrJTnSAnu8wHRaFnQ== 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 AM5PR0502CA0023.eurprd05.prod.outlook.com (2603:10a6:203:91::33) by AS4PR08MB7501.eurprd08.prod.outlook.com (2603:10a6:20b:4e5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 13:47:11 +0000 Received: from AM7EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:91:cafe::a9) by AM5PR0502CA0023.outlook.office365.com (2603:10a6:203:91::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.46 via Frontend Transport; Tue, 18 Apr 2023 13:47:11 +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 AM7EUR03FT062.mail.protection.outlook.com (100.127.140.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6319.16 via Frontend Transport; Tue, 18 Apr 2023 13:47:10 +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; Tue, 18 Apr 2023 13:47:07 +0000 Received: from e129018.arm.com (10.57.54.117) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 18 Apr 2023 13:47:07 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 05/22] arm: [MVE intrinsics] add binary_opt_n shape Date: Tue, 18 Apr 2023 15:45:51 +0200 Message-ID: <20230418134608.244751-6-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230418134608.244751-1-christophe.lyon@arm.com> References: <20230418134608.244751-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT062:EE_|AS4PR08MB7501:EE_|AM7EUR03FT058:EE_|AM0PR08MB5489:EE_ X-MS-Office365-Filtering-Correlation-Id: 43a5917e-892e-48dc-6790-08db401377a5 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: t6FjYL3RNAfj3Q4ytbNxijr1yf0nRDvlO/mPiUqEcUV9RKDgBXoL38mVcwLcnEy7mTeapZGMCXRJlE3O2i2mUVMLt3tSyaduSDmG+67+hsxEV2lasJouIJxhzUUSAGqNAE0sWUSpJc5naMRHnuOISsZWK3TQ0mCETUmQK/yg2hZYY3bW4hgqYhJBc9pOOamWB7e4bTx6eSLXdkBs4tsKjj6yR1/t0L1XAsR3H2hsorDWxpJPRerFH6F4PxxTercicn96j5C/8B1AmCwZEPc7tfGaZ2UiTnvBaxanYr5+YIoMAY+eX8QOboBftx0/qF8tROQg3Q+0VJVAiiVkyUwHjLDmcqgBg2hJ8ckzWQi0oeApWURD0pc45G6KURmvXIzCKPcAmWTvC9ibR4+jSVzc/uLMtp0TXPMQkGpnA7p6PCp4w0HfFofihiHZdsOILnFAJIfM3rmjkxBAxDk2OF5+BKVkhGHTkQsck4/6kWWA+7tnUo/To9dsto4nPoJ8xVpUeB2Ouc/+nB3EAyv08fCT2Oeyw5kOCOOScMjPOSGBjZJ7NBJdZMypEkMGLNxLkkH5IZINWJCYIa1BGWW/WBm2CnxcGY3drZRMpQxpJs3o/OEl2ZdvFJcqbF7SOqa8pizM6pv+dGbv1NHwMMWv/ugCLdH804sjdzlSiZ4Do1o5glenA1hVT2iAuVgEoJc/QGNQ+FU8ed1XVDYaZBU3LcY9Xg== 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)(346002)(396003)(39860400002)(376002)(451199021)(36840700001)(46966006)(7696005)(6666004)(478600001)(110136005)(86362001)(36860700001)(36756003)(47076005)(2616005)(426003)(336012)(40480700001)(186003)(1076003)(26005)(82740400003)(82310400005)(81166007)(356005)(316002)(4326008)(70206006)(70586007)(2906002)(44832011)(8676002)(8936002)(5660300002)(41300700001)(6636002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7501 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 90cc76e5-d6fa-4e69-df52-08db401368d1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v/TwspBCTYbnoG0zo8mwE9iM07UxryqMltsUA6wrkcQN3tna1Z4pPoRFAtiRACmQq43ixoTDH7pgHKpxf8YlhjAoZ1/uWD3Ikxnd1x/kbMX66NTV3+SsZ8KFr/kYNR7YGso4ZxFDDDalN/jhiE8vB6d36ZNnh78p7O4WgyLCMkHoC5ykNSkVWqRpihwjyvofTgx0K4DXmR0j1Xmf3SaW+Npim61euTAChg1PFnfpRp46yNi5A2Pq4Yist6m6TokdT/kTxNEcNN4csV2JGlwizywMpBr8ePuUN/iPJvCqSjWoeV9qWU4WMd3FKwILN/sPlpVZFoBXHXlXzexm6+bt63lVx9B+sMclFbvuwh/fXdVyaDKh7GjUiyA316Mr9EF4QCVNTX4tpSXMXc1KdlDp5ccIXRZU4MfzSyWONRte+noIHV4t2ZjcUMg3pjR0mvkeAsbzYyAFm2SxgrvWPAgSpRxoWPk8qDnIopbzhsZosGyKJ33nHXYsqNbvxioOiTU3hAGx1VF5HW5YDWObhzXtiBmBAjqsu1cPM0lzNqSreyWxZvLzLR4k0LvBxX+c2hZUNn/Jbk5f8a23zfzUQS8MhtAepmG7K2lPdraHi4XkoR4ciHpAb3soDchfu6zClhmThf5aHCmTR4Ki2Y/EdNSzAq+BD0QhkHAOSs46xOSPc6E56Wsd56bUPhvr4YqFvbdxKVaqui77VV4DcZ96PAXNPQ== 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)(346002)(136003)(376002)(396003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(44832011)(5660300002)(8936002)(4326008)(70206006)(70586007)(2906002)(8676002)(41300700001)(316002)(6636002)(478600001)(110136005)(6666004)(7696005)(1076003)(26005)(186003)(36860700001)(2616005)(47076005)(426003)(336012)(81166007)(82310400005)(40460700003)(36756003)(40480700001)(82740400003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 13:47:35.8317 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43a5917e-892e-48dc-6790-08db401377a5 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: AM7EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5489 X-Spam-Status: No, score=-12.4 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763522305658602538?= X-GMAIL-MSGID: =?utf-8?q?1763522305658602538?= This patch adds the binary_opt_n shape description. gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_opt_n): New. * config/arm/arm-mve-builtins-shapes.h (binary_opt_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 32 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 33 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index ce476aa196e..033b304060a 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -338,6 +338,38 @@ struct overloaded_base : public function_shape } }; +/* _t vfoo[_t0](_t, _t) + _t vfoo[_n_t0](_t, _t) + + i.e. the standard shape for binary operations that operate on + uniform types. + + Example: vaddq. + int8x16_t [__arm_]vaddq[_s8](int8x16_t a, int8x16_t b) + int8x16_t [__arm_]vaddq[_n_s8](int8x16_t a, int8_t b) + int8x16_t [__arm_]vaddq_m[_s8](int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p) + int8x16_t [__arm_]vaddq_m[_n_s8](int8x16_t inactive, int8x16_t a, int8_t b, mve_pred16_t p) + int8x16_t [__arm_]vaddq_x[_s8](int8x16_t a, int8x16_t b, mve_pred16_t p) + int8x16_t [__arm_]vaddq_x[_n_s8](int8x16_t a, int8_t b, mve_pred16_t p) */ +struct binary_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", group, MODE_none, preserve_user_namespace); + build_all (b, "v0,v0,s0", group, MODE_n, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + return r.resolve_uniform_opt_n (2); + } +}; +SHAPE (binary_opt_n) + /* [xN]_t vfoo_t0(). Example: vuninitializedq. diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index a491369425c..43798fdde57 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -34,6 +34,7 @@ namespace arm_mve namespace shapes { + extern const function_shape *const binary_opt_n; extern const function_shape *const inherent; extern const function_shape *const unary_convert;