From patchwork Wed May 10 13:30:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 69056 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 0250F3829BCF for ; Wed, 10 May 2023 13:33:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0250F3829BCF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683725581; bh=Gxsjh26il0b8W7cvEzU0l2TSmfrHBS+nWm9JRESHX5A=; 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=aVq/5rwliWQcqgrdDKNxof5WS2wS5givciAS1dycnn2W+vDXSw+R8gvll3muPBknE GFbyjkhcb1UpyOsMexN1LZJ40a97RkaZAKODFhhc0DoHAqg+C5HRyLJzewUlx9oaI2 1r1WFUKaCTCjfy05y4NQdJlOKAlcibQbRHX2v8xQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2053.outbound.protection.outlook.com [40.107.14.53]) by sourceware.org (Postfix) with ESMTPS id 104F23853550 for ; Wed, 10 May 2023 13:31:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 104F23853550 Received: from DB6PR07CA0195.eurprd07.prod.outlook.com (2603:10a6:6:42::25) by AS2PR08MB9569.eurprd08.prod.outlook.com (2603:10a6:20b:60b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Wed, 10 May 2023 13:31:06 +0000 Received: from DBAEUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:42:cafe::fc) by DB6PR07CA0195.outlook.office365.com (2603:10a6:6:42::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18 via Frontend Transport; Wed, 10 May 2023 13:31:06 +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 DBAEUR03FT039.mail.protection.outlook.com (100.127.142.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.19 via Frontend Transport; Wed, 10 May 2023 13:31:06 +0000 Received: ("Tessian outbound 3570909035da:v136"); Wed, 10 May 2023 13:31:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1d5541455cde890a X-CR-MTA-TID: 64aa7808 Received: from e33ffe5bbe1c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EF985262-2733-4B0F-B7F1-8B1E4578A978.1; Wed, 10 May 2023 13:31:00 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e33ffe5bbe1c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 10 May 2023 13:31:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j5C1Lo/bomI/Ik4VshpsE2Jf8E2Cxv16c02oZNM8d9aDGgf+MugKjheHAXciXIXOAjMovo1ITm4pGY+pMGyIiGpEFBkVNJo4enZtxout6gkP3ciI1NIwuZ4UPf7YgWkNPYLk5BaHhnGz82tXNT1xl3kN8wlw2L0EqcptIJhGWXdDUVSOUDXq/N94pEF0cHJClWyq+jilKoCRf8JXt+ISuLgegXLSDUQpau0j7gcUQefEx9ghs5Y1TI0/EvbLFGOKiVA5CCo6OqmR5P3sZEvlcODR1qoKXWWr2INAF2QDeAWCs/ehfrO6HsDd/KiU/wkvu8tykJFaUA73KuhBuJ/rzQ== 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=Gxsjh26il0b8W7cvEzU0l2TSmfrHBS+nWm9JRESHX5A=; b=esSK1p3TWMVnYTnjgLSSNLu0qTSixJiG4LHgqF30t4pvaW3WiLGAbQYFa2O/lp4BLwoAs95VhyEMvp3oAwzeq35oCV8jHmCZ81ZZy8IJBT9lRhL18Jor909bpjN5Z9m1rxH8tetzNMYmsbquLXlbnmhu962mxng9oKb0Ye+wYR/ZJ/IAR73659LAGiAaRuU4sT1DiyQBpgrNAvJxdfZvRt8ECrlT6peDfASOqKQIeN/dadvWVNUTad+WdxaRdAdTkUBr1Fz3emaSQe3t3rqIlC0CBUCF/NUZqmFbJghfoXN4HQDhoEF6yKqhv5DmT4x/JzjpF3hDvZ9246NW1FdcEQ== 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 AM8P190CA0001.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:219::6) by PA4PR08MB6014.eurprd08.prod.outlook.com (2603:10a6:102:ee::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Wed, 10 May 2023 13:30:53 +0000 Received: from AM7EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:219:cafe::55) by AM8P190CA0001.outlook.office365.com (2603:10a6:20b:219::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33 via Frontend Transport; Wed, 10 May 2023 13:30:53 +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 AM7EUR03FT057.mail.protection.outlook.com (100.127.140.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.20 via Frontend Transport; Wed, 10 May 2023 13:30:52 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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; Wed, 10 May 2023 13:30:47 +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; Wed, 10 May 2023 13:30:47 +0000 Received: from e129018.arm.com (10.57.23.51) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Wed, 10 May 2023 13:30:46 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape Date: Wed, 10 May 2023 15:30:31 +0200 Message-ID: <20230510133036.596530-15-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230510133036.596530-1-christophe.lyon@arm.com> References: <20230510133036.596530-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT057:EE_|PA4PR08MB6014:EE_|DBAEUR03FT039:EE_|AS2PR08MB9569:EE_ X-MS-Office365-Filtering-Correlation-Id: 4bb0fb49-81e0-4061-39aa-08db515acf2d 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: DsFaE6FZV7rU6cGrakZBs5FEsr7r9Ipm7mOCSgmk3TcI/sZfMHquah5b4zw6mQfxtyfqKKTqWj8d96Sdl1MZ/VsVaZzYngX/NjcUKlZpmns4IaS2RrWRB2Yt9GG7ELzQNhVWKFKdm3PL2gaMU1Alfj1eclfGtl/6tuyQ59cgyRmi1rIVV65vAbd55DTj35tIQQLTSrb3Z0DUJxo8Pnqv4w+K1RQ7p362+Xa4nIQdMNxfm2HSTAmZVLftnei1dgntoYXi72rFd8ceZVv0ahMikNI/BUaBC4Rc6YTRAKG/XkdM3anQ2dOShxZuNQyGbrzvASgKVs/SIWTXKCL0NBwyVf7+WZbFY+wi7xwmXshOCPX3dAdeS7kOrMPwFFZdyxrTKJGHLqV3rmSeuE+Re5J0wUwF0U3FgFoYRxxfoLEwfTHaMM9obhwgo1MhSn1Izo8Q2aWwudz4YCZutC2KuTtojjQfU9XtZU5ZnnI47Xdnb54xjCTTVkAWbH57Aht2AGb9Dqv5PN8e7kaxDft2F4d/XPhp9nMe6+9VZGeRwYaBeWjNPnFbQ7VMypa9oqWj7/rhyrqCmmyEoIEaQ/TlH4PLktfifkaHiKByaZuYsJ1JB0gQA2fKvcd8fi9aErrz7QxBAPfvsnZ7oJM5c38cp4B1GB/RpCkzizDqvjNEJ8w7U11lp7MNM998dzsyp26UF9JPa+oN8BBWt0stvYors3dgfcRuRLCPrilOJCUoZym/yqk= 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)(376002)(136003)(346002)(39860400002)(396003)(451199021)(40470700004)(46966006)(36840700001)(36860700001)(36756003)(7696005)(40460700003)(82310400005)(82740400003)(41300700001)(86362001)(356005)(2906002)(40480700001)(4001150100001)(5660300002)(336012)(8676002)(44832011)(81166007)(8936002)(70206006)(6636002)(316002)(70586007)(4326008)(478600001)(426003)(47076005)(186003)(6666004)(110136005)(26005)(1076003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6014 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b0a98ff2-701e-481f-f32f-08db515ac6f4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AfvsWeF4E/XW2oxw4bHMqpOkqE3QGtTXjDEem+5oefAXQd5rIFelGK//6EMqTJoMl/gumzTIeZN4yPr+OV8iu12RMbQztePH863LuFyqeOa+Ss3FNRizh/OtUEIoawYDxrdPGMyY5UBvHZkviWrG/mr9zqFte2g0wGLA42MhOjlZ8iWgSSRFCK9i1vYkLe/3gqiPc0iu4eU7qJwCdx3Ivaw0QxmXV6F3obQgH1o2IG40HIY26TZbu2pdjvId3ULvyK9lObCYGKRgxpWXwgMWp76FlE3bUj8y6PMDY1bzuRAiZnxRfU5HCIbQfNyVSBSB0xisWdthHU1x/oDZ3qfKRkDMvDYjmaykPUNc6s1ZxAfWb8kOvpJQTcOObXtG90mVQmz9hphQfsqf5zyI3Rpd+1016A/c08EEOa6M5zitf6QK1nFjTs2sAHyiDpL2nuauCgWjj1h+2CaYL3wCYuoU7uJL1DFfhbP/PrANvTMuCiH1BwRas0xj2S4v3EQxT6tDOqd+PMKzHmUe9Qy5G1LM3/qPLTQhR653drvsIJJgGVpQRR3PxGRh7TZMw4NZZlILSN/nKzO0rNs1j6Vufl/NGD/sj84lZv35IwhI/QpnDyGByqK35glNJQFHnrdlBKORd4EyB69oZzUA+6ORWM3RQSpNEvbpNOehsiZPQ1rLzfgdBx4Lg3WSyLPjIO1k03nIWs7WUGAM+GXeHnEQWhRhUg== 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)(40470700004)(46966006)(36840700001)(4001150100001)(4326008)(8676002)(2906002)(8936002)(5660300002)(478600001)(316002)(41300700001)(110136005)(6636002)(6666004)(70586007)(70206006)(44832011)(86362001)(47076005)(1076003)(26005)(186003)(82740400003)(7696005)(40460700003)(36860700001)(426003)(36756003)(2616005)(336012)(40480700001)(82310400005)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 13:31:06.7655 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4bb0fb49-81e0-4061-39aa-08db515acf2d 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: DBAEUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9569 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch adds the unary_acc shape description. 2022-10-25 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (unary_acc): New. * config/arm/arm-mve-builtins-shapes.h (unary_acc): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 28 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 29 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index bff1c3e843b..e77a0cc20ac 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1066,6 +1066,34 @@ struct unary_def : public overloaded_base<0> }; SHAPE (unary) +/* _t vfoo[_](_t) + + i.e. a version of "unary" in which the source elements are half the + size of the destination scalar, but have the same type class. + + Example: vaddlvq. + int64_t [__arm_]vaddlvq[_s32](int32x4_t a) + int64_t [__arm_]vaddlvq_p[_s32](int32x4_t a, mve_pred16_t p) */ +struct unary_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,v0", group, MODE_none, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + /* FIXME: check that the return value is actually + twice as wide as arg 0. */ + return r.resolve_unary (); + } +}; +SHAPE (unary_acc) + /* _t foo_t0[_t1](_t) where the target type must be specified explicitly but the source diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index fc1bacbd4da..c062fe624c4 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -53,6 +53,7 @@ namespace arm_mve extern const function_shape *const create; extern const function_shape *const inherent; extern const function_shape *const unary; + extern const function_shape *const unary_acc; extern const function_shape *const unary_convert; extern const function_shape *const unary_int32; extern const function_shape *const unary_int32_acc;