From patchwork Fri May 5 08:39:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 90366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp248234vqo; Fri, 5 May 2023 01:53:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YTwrBC2xgG6/964FCq42aDPE/I9KdoU1OL9C2fEuo9jNzc6LswiebKx8K4kmx8yTpigEt X-Received: by 2002:a17:907:97c5:b0:8e1:12b6:a8fc with SMTP id js5-20020a17090797c500b008e112b6a8fcmr504829ejc.4.1683276836119; Fri, 05 May 2023 01:53:56 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id jz12-20020a170906bb0c00b00965c288b5cesi850487ejb.764.2023.05.05.01.53.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 01:53:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Vj4v4gDS; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 181D33888C6F for ; Fri, 5 May 2023 08:46:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 181D33888C6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683276409; bh=PalgiFKVqw8tB2fz840qnd+XEd87lj66GbSuBPp4QLk=; 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=Vj4v4gDSmd9A4IAPBs3eD5D84ZAtNrTGJf0LCEF6wCYNBJJjGSvFPwkR0zUHcv+qo JQDP9fN36A5TsXAbJcUgF8W4nuV15b7mTxXQglIu/5HopOb2qMuzL2dQio6pfYjoX4 muYr/5mKozV4O1hTLe8aFOP9UbnvV3WdTsiV4XeA= 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-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) by sourceware.org (Postfix) with ESMTPS id B97283858D33 for ; Fri, 5 May 2023 08:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B97283858D33 Received: from AS9PR06CA0483.eurprd06.prod.outlook.com (2603:10a6:20b:49b::8) by DU0PR08MB8836.eurprd08.prod.outlook.com (2603:10a6:10:47d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 08:40:07 +0000 Received: from AM7EUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49b:cafe::d3) by AS9PR06CA0483.outlook.office365.com (2603:10a6:20b:49b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 08:40:07 +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 AM7EUR03FT063.mail.protection.outlook.com (100.127.140.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 08:40:07 +0000 Received: ("Tessian outbound 3570909035da:v136"); Fri, 05 May 2023 08:40:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 64cbdec9bc0fc09b X-CR-MTA-TID: 64aa7808 Received: from 6d5d8d994faa.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D30F5F97-703E-4B18-83A9-BD8B8A48DBC8.1; Fri, 05 May 2023 08:40:01 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6d5d8d994faa.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 05 May 2023 08:40:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VxHdK5khgBCRfA0V5IxUy+o7aLrfHyS9sU8kCbZ+gmncDwfv7NofO9Jg82gDtQ8hD1y38+MRQudWXzGGjNVzLDlsZ9POyKvP08KrSzCq6IHSCSh/avt2Nh500LKv7XNGwnDQQIKPo7SjfOQdKJyqGPXVwgVIIGr8M4BlYTkRo38dix5cVNVl9D2aVUrli7LalnD9tqzqZYvMCXhRTT2+MAagXrK/jeKDzJ/80N0XGqlbmqsbBfF6pVyZhaz7P9kBxbQU8PvQKVEa+qkehMjQ5W3cPxBKwqLpLoJL4dLgiI188UP2XwIkI9VSJ5uoKmKWGWT8Gn3rYs0wKNUbbkFi0Q== 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=PalgiFKVqw8tB2fz840qnd+XEd87lj66GbSuBPp4QLk=; b=dKWiBnavGUn+rFe01whZvSxzcFnl89GxRFhM4Wau80qQwkSFSEmoLvp5lmwkTiw0Jtqquo0n+14siVPATECxjaaT3ot00Y5mGzRalUnRcLqyHbYv0mYL4wz5RMjNE/WWaiMTwfTW2bJH0m5TOGPFuPyK64fvNu03YrtaTKq7Xx9oh7Kmujw3Bw9MpiEYZ3iUFBV54ByX8dtMtNYIZDeFXbzu+zYAjv/IKP1lbwTh1CFVYmb6guC9tIllR7DHkwvB2h2TFB+ur1XvFq30JJDAsYZIBGR9lAjTllIJ0PMLg1CfVsavPlQlpw1GB98LjKk3uADz5JaOTkXpuAghpFc+Lg== 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 DUZPR01CA0106.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::14) by DB9PR08MB6537.eurprd08.prod.outlook.com (2603:10a6:10:250::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 08:39:58 +0000 Received: from DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4bb:cafe::c2) by DUZPR01CA0106.outlook.office365.com (2603:10a6:10:4bb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 08:39:58 +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 DBAEUR03FT020.mail.protection.outlook.com (100.127.143.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6363.20 via Frontend Transport; Fri, 5 May 2023 08:39:58 +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; Fri, 5 May 2023 08:39:53 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 5 May 2023 08:39:52 +0000 Received: from e129018.arm.com (10.57.22.112) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Fri, 5 May 2023 08:39:52 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 16/23] arm: [MVE intrinsics] factorize vshrntq vshrnbq vrshrnbq vrshrntq vqshrnbq vqshrntq vqrshrnbq vqrshrntq Date: Fri, 5 May 2023 10:39:23 +0200 Message-ID: <20230505083930.101210-16-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230505083930.101210-1-christophe.lyon@arm.com> References: <20230505083930.101210-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT020:EE_|DB9PR08MB6537:EE_|AM7EUR03FT063:EE_|DU0PR08MB8836:EE_ X-MS-Office365-Filtering-Correlation-Id: 1dd2cecb-cc60-434b-28ad-08db4d4454b9 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: GmJn3GnO/a+TuaAa+7ZKpJggI2SIW2GwUvHTeLiVOUZHSO0syCK+ZwAz+lw7wuysSV6VgkDkTuqImn/MZHOxCA2K2HqaZkRwBSz0AQv+5C2wmp29e1KR8WXBBkgFLhwzBlkSu/tMOTcQ+HRfUtoJrzE5ZhyqCa/L8RziKI4vTbCEvjOl35/I5Ku3TXqq+3LlT6m89LA5cY5fsKRa0m/DNsHu4m2sSwMdumfAlBBlMlp7D1Zs4mvIihOLDBBzQ0FYJ3NRUKrpdEMeG2gpRzTGll1qWzrbA+493EDBx+36vmHqb+Qsjd+I62Yjd5ZLkPm2iG7U7WRd7KEFQbg1khlXwzFF0utyXkWAPiLn14PauBeGopoYZXwSIAc6c1mQn2tgCkJmdcRAfhMi5H9P1rGMlx5h07rwRgVO9QCV0iI0Fp9avzrOHc1E41img31fU8sZnsHvcZUTo9rOpxMl4f8tO/DFLTHvh7i7/8X26XfYQmAt1P54P5mKRIbdrIQaxCQIzAgm+Dp2qCEPGRXCSdbV1YGtbnekS/7ySQwip4kplGiQcSKh/ERR5xl1sC373zAmMgNaAi3FBFF7fNMLsZQ8cwndP1/pLy/rFtofY6QKR9sFXubw5ANtadBLxhdSWERf5xTBAgxSDPBjA6A7+Gmol0hOdTSHgBSsMpvUbENJFRwMVRdmnDWjBK6hPvnwGuogpfyaX8dqfOjOw0rmK2KpVeHk5C0q7TlCHIy/azpnl+MHWjgjWd5GcoYdG0zCjhbjCPsafacFmY2g00bJQN4+PEmARz+agX/vASVZM9Vzxt/levMeAsNAb/DvXv8GglLozxbbLnPT6OuY1I/oWw4hjlnMaJxA9tbZoOhas80VB2CIGGXWnA7YwwK5RSJU5hnxDVwQ17RY7hrh2jhtvqxQLJhJ19AzVJ9XoCR/I/1MRls= 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)(39860400002)(376002)(451199021)(46966006)(36840700001)(40470700004)(40460700003)(7696005)(70586007)(70206006)(6636002)(4326008)(478600001)(6666004)(316002)(110136005)(86362001)(36756003)(47076005)(336012)(426003)(83380400001)(2616005)(1076003)(26005)(36860700001)(8936002)(8676002)(5660300002)(44832011)(30864003)(2906002)(41300700001)(82310400005)(40480700001)(82740400003)(356005)(186003)(81166007)(34020700004)(146423001)(40753002)(121003001)(17423001)(133343001)(156123004)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6537 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c0c79cbd-0bfd-4e36-ef77-08db4d444f4b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pJHFJAXKLun3169ujqxWo4Ah10auPcFkFPPeCnfijTlghPvbCmzkxV0uJy+bPzdwBBTqYPlriaP2f/scvG28pBIdzMkSLveE8uoAAKk2ovoquTli8zde73ilrEMTBmE2o/WXZLm5zb9Q5kOz8J5h7rQZG/BVsOBnRIIlJPI6PmVUHwSHTj8pV6c+fcH6joPUHwMGzYwjKU6Ral0S9yYMsq7UQAoCyIPbnJSlawuT7EqWhcdHp4mA/PBnkhyam42qTcrsqG+/Lsv3Y04zyb+Ku4ImxRvH7WWBWzewJZ5KGDemuFXYIgM4SxoxXYFYm9EXI6J5TrT6eIikmT3He8wQBTxDWwW8GjIz/yT7Zzgl15Tr69Vl1AG5irDfPWH0VJQ3/4ZCyWYURUiHfKcHOsP8/mumBqKZ/lDxXgjpj8/liJxczj6l+N1sh2ACLnX9uqoC8cSyCLBlmx6GrUu9Gj2Vd8WwgD89Ybegj9yx7mPGotDOLrjzncYu/IupEIoRfe2oiLL0fInD/OfPzhjPUkjwSpEg43WRH1j28Lc0MdDFaJvfb5mKRG9ZD8UHfVwEHwqbFFHunOJh8AJf2B+7DKPI5qaiDj6PdX+YjtP9udEFs6bik7JXNj3A1Bp9ru2Eqd7TKy5wp+Du2X14qM7Y7Dm8EiYDaYQnJU6GUVhfWCJxd3xPjei61ktVfA/oUScUtusUybgJoEHDf+gNkvkvP0xcqYHpUrhy4+uwyHDVtszTO51moNP9DPx0kBYuRO0b/i9J4beGnj3HUcpDhOiqAUn7lX2bnb0caNIKYx20qU/U3sMeF3YfJPcJba6m9rAnBjZz47cdoHYgTmj5pKmWWyalosBZzinD/WeiHwDUri6x6QJ4/i7EiRtb1XnqmnjFNKmqgLu6T24MywfCOw4TGoqMkQ== 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)(136003)(376002)(346002)(396003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(86362001)(36756003)(110136005)(316002)(6636002)(4326008)(70206006)(70586007)(7696005)(478600001)(6666004)(41300700001)(40480700001)(82310400005)(8676002)(8936002)(5660300002)(30864003)(2906002)(44832011)(34020700004)(82740400003)(81166007)(186003)(2616005)(1076003)(26005)(36860700001)(426003)(47076005)(336012)(83380400001)(40460700003)(146423001)(40753002)(17423001)(121003001)(133343001)(156123004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 08:40:07.6967 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1dd2cecb-cc60-434b-28ad-08db4d4454b9 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: AM7EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8836 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, LONGWORDS, 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?1765043691828815771?= X-GMAIL-MSGID: =?utf-8?q?1765043691828815771?= Factorize vqshrnbq, vqshrntq, vqrshrnbq, vqrshrntq, vshrntq, vshrnbq, vrshrnbq and vrshrntq so that they use the same pattern. Introduce iterator for *shrn* so that we can use the same pattern despite the different "s", "u" and "i" suffixes. 2022-09-08 Christophe Lyon gcc/ * config/arm/iterators.md (MVE_SHRN_N, MVE_SHRN_M_N): New. (mve_insn): Add vqrshrnb, vqrshrnt, vqshrnb, vqshrnt, vrshrnb, vrshrnt, vshrnb, vshrnt. (isu): New. * config/arm/mve.md (mve_vqrshrnbq_n_) (mve_vqrshrntq_n_, mve_vqshrnbq_n_) (mve_vqshrntq_n_, mve_vrshrnbq_n_) (mve_vrshrntq_n_, mve_vshrnbq_n_) (mve_vshrntq_n_): Merge into ... (@mve_q_n_): ... this. (mve_vqrshrnbq_m_n_, mve_vqrshrntq_m_n_) (mve_vqshrnbq_m_n_, mve_vqshrntq_m_n_) (mve_vrshrnbq_m_n_, mve_vrshrntq_m_n_) (mve_vshrnbq_m_n_, mve_vshrntq_m_n_): Merge into ... (@mve_q_m_n_): ... this. --- gcc/config/arm/iterators.md | 57 ++++++++ gcc/config/arm/mve.md | 270 ++++-------------------------------- 2 files changed, 85 insertions(+), 242 deletions(-) diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md index 9ff61e0573b..d64c924a513 100644 --- a/gcc/config/arm/iterators.md +++ b/gcc/config/arm/iterators.md @@ -468,6 +468,28 @@ (define_int_iterator MVE_RSHIFT_N [ VRSHLQ_N_S VRSHLQ_N_U ]) +(define_int_iterator MVE_SHRN_N [ + VQRSHRNBQ_N_S VQRSHRNBQ_N_U + VQRSHRNTQ_N_S VQRSHRNTQ_N_U + VQSHRNBQ_N_S VQSHRNBQ_N_U + VQSHRNTQ_N_S VQSHRNTQ_N_U + VRSHRNBQ_N_S VRSHRNBQ_N_U + VRSHRNTQ_N_S VRSHRNTQ_N_U + VSHRNBQ_N_S VSHRNBQ_N_U + VSHRNTQ_N_S VSHRNTQ_N_U + ]) + +(define_int_iterator MVE_SHRN_M_N [ + VQRSHRNBQ_M_N_S VQRSHRNBQ_M_N_U + VQRSHRNTQ_M_N_S VQRSHRNTQ_M_N_U + VQSHRNBQ_M_N_S VQSHRNBQ_M_N_U + VQSHRNTQ_M_N_S VQSHRNTQ_M_N_U + VRSHRNBQ_M_N_S VRSHRNBQ_M_N_U + VRSHRNTQ_M_N_S VRSHRNTQ_M_N_U + VSHRNBQ_M_N_S VSHRNBQ_M_N_U + VSHRNTQ_M_N_S VSHRNTQ_M_N_U + ]) + (define_int_iterator MVE_FP_M_BINARY [ VABDQ_M_F VADDQ_M_F @@ -568,12 +590,20 @@ (define_int_attr mve_insn [ (VQRSHLQ_M_S "vqrshl") (VQRSHLQ_M_U "vqrshl") (VQRSHLQ_N_S "vqrshl") (VQRSHLQ_N_U "vqrshl") (VQRSHLQ_S "vqrshl") (VQRSHLQ_U "vqrshl") + (VQRSHRNBQ_M_N_S "vqrshrnb") (VQRSHRNBQ_M_N_U "vqrshrnb") + (VQRSHRNBQ_N_S "vqrshrnb") (VQRSHRNBQ_N_U "vqrshrnb") + (VQRSHRNTQ_M_N_S "vqrshrnt") (VQRSHRNTQ_M_N_U "vqrshrnt") + (VQRSHRNTQ_N_S "vqrshrnt") (VQRSHRNTQ_N_U "vqrshrnt") (VQSHLQ_M_N_S "vqshl") (VQSHLQ_M_N_U "vqshl") (VQSHLQ_M_R_S "vqshl") (VQSHLQ_M_R_U "vqshl") (VQSHLQ_M_S "vqshl") (VQSHLQ_M_U "vqshl") (VQSHLQ_N_S "vqshl") (VQSHLQ_N_U "vqshl") (VQSHLQ_R_S "vqshl") (VQSHLQ_R_U "vqshl") (VQSHLQ_S "vqshl") (VQSHLQ_U "vqshl") + (VQSHRNBQ_M_N_S "vqshrnb") (VQSHRNBQ_M_N_U "vqshrnb") + (VQSHRNBQ_N_S "vqshrnb") (VQSHRNBQ_N_U "vqshrnb") + (VQSHRNTQ_M_N_S "vqshrnt") (VQSHRNTQ_M_N_U "vqshrnt") + (VQSHRNTQ_N_S "vqshrnt") (VQSHRNTQ_N_U "vqshrnt") (VQSUBQ_M_N_S "vqsub") (VQSUBQ_M_N_U "vqsub") (VQSUBQ_M_S "vqsub") (VQSUBQ_M_U "vqsub") (VQSUBQ_N_S "vqsub") (VQSUBQ_N_U "vqsub") @@ -586,17 +616,44 @@ (define_int_attr mve_insn [ (VRSHLQ_M_S "vrshl") (VRSHLQ_M_U "vrshl") (VRSHLQ_N_S "vrshl") (VRSHLQ_N_U "vrshl") (VRSHLQ_S "vrshl") (VRSHLQ_U "vrshl") + (VRSHRNBQ_M_N_S "vrshrnb") (VRSHRNBQ_M_N_U "vrshrnb") + (VRSHRNBQ_N_S "vrshrnb") (VRSHRNBQ_N_U "vrshrnb") + (VRSHRNTQ_M_N_S "vrshrnt") (VRSHRNTQ_M_N_U "vrshrnt") + (VRSHRNTQ_N_S "vrshrnt") (VRSHRNTQ_N_U "vrshrnt") (VSHLQ_M_N_S "vshl") (VSHLQ_M_N_U "vshl") (VSHLQ_M_R_S "vshl") (VSHLQ_M_R_U "vshl") (VSHLQ_M_S "vshl") (VSHLQ_M_U "vshl") (VSHLQ_N_S "vshl") (VSHLQ_N_U "vshl") (VSHLQ_R_S "vshl") (VSHLQ_R_U "vshl") (VSHLQ_S "vshl") (VSHLQ_U "vshl") + (VSHRNBQ_M_N_S "vshrnb") (VSHRNBQ_M_N_U "vshrnb") + (VSHRNBQ_N_S "vshrnb") (VSHRNBQ_N_U "vshrnb") + (VSHRNTQ_M_N_S "vshrnt") (VSHRNTQ_M_N_U "vshrnt") + (VSHRNTQ_N_S "vshrnt") (VSHRNTQ_N_U "vshrnt") (VSUBQ_M_N_S "vsub") (VSUBQ_M_N_U "vsub") (VSUBQ_M_N_F "vsub") (VSUBQ_M_S "vsub") (VSUBQ_M_U "vsub") (VSUBQ_M_F "vsub") (VSUBQ_N_S "vsub") (VSUBQ_N_U "vsub") (VSUBQ_N_F "vsub") ]) +(define_int_attr isu [ + (VQRSHRNBQ_M_N_S "s") (VQRSHRNBQ_M_N_U "u") + (VQRSHRNBQ_N_S "s") (VQRSHRNBQ_N_U "u") + (VQRSHRNTQ_M_N_S "s") (VQRSHRNTQ_M_N_U "u") + (VQRSHRNTQ_N_S "s") (VQRSHRNTQ_N_U "u") + (VQSHRNBQ_M_N_S "s") (VQSHRNBQ_M_N_U "u") + (VQSHRNBQ_N_S "s") (VQSHRNBQ_N_U "u") + (VQSHRNTQ_M_N_S "s") (VQSHRNTQ_M_N_U "u") + (VQSHRNTQ_N_S "s") (VQSHRNTQ_N_U "u") + (VRSHRNBQ_M_N_S "i") (VRSHRNBQ_M_N_U "i") + (VRSHRNBQ_N_S "i") (VRSHRNBQ_N_U "i") + (VRSHRNTQ_M_N_S "i") (VRSHRNTQ_M_N_U "i") + (VRSHRNTQ_N_S "i") (VRSHRNTQ_N_U "i") + (VSHRNBQ_M_N_S "i") (VSHRNBQ_M_N_U "i") + (VSHRNBQ_N_S "i") (VSHRNBQ_N_U "i") + (VSHRNTQ_M_N_S "i") (VSHRNTQ_M_N_U "i") + (VSHRNTQ_N_S "i") (VSHRNTQ_N_U "i") + ]) + ;; plus and minus are the only SHIFTABLE_OPS for which Thumb2 allows ;; a stack pointer operand. The minus operation is a candidate for an rsub ;; and hence only plus is supported. diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md index 44409b40e5f..d64a075c7bb 100644 --- a/gcc/config/arm/mve.md +++ b/gcc/config/arm/mve.md @@ -2162,21 +2162,30 @@ (define_insn "mve_vcvtq_m_to_f_" "vpst\;vcvtt.f%#.%# %q0, %q2" [(set_attr "type" "mve_move") (set_attr "length""8")]) + ;; -;; [vqrshrnbq_n_u, vqrshrnbq_n_s]) +;; [vqrshrnbq_n_u, vqrshrnbq_n_s] +;; [vqrshrntq_n_u, vqrshrntq_n_s] +;; [vqshrnbq_n_u, vqshrnbq_n_s] +;; [vqshrntq_n_u, vqshrntq_n_s] +;; [vrshrnbq_n_s, vrshrnbq_n_u] +;; [vrshrntq_n_u, vrshrntq_n_s] +;; [vshrnbq_n_u, vshrnbq_n_s] +;; [vshrntq_n_s, vshrntq_n_u] ;; -(define_insn "mve_vqrshrnbq_n_" +(define_insn "@mve_q_n_" [ (set (match_operand: 0 "s_register_operand" "=w") (unspec: [(match_operand: 1 "s_register_operand" "0") (match_operand:MVE_5 2 "s_register_operand" "w") (match_operand:SI 3 "" "")] - VQRSHRNBQ_N)) + MVE_SHRN_N)) ] "TARGET_HAVE_MVE" - "vqrshrnb.%# %q0, %q2, %3" + ".%#\t%q0, %q2, %3" [(set_attr "type" "mve_move") ]) + ;; ;; [vqrshrunbq_n_s]) ;; @@ -2192,6 +2201,7 @@ (define_insn "mve_vqrshrunbq_n_s" "vqrshrunb.s%#\t%q0, %q2, %3" [(set_attr "type" "mve_move") ]) + ;; ;; [vrmlaldavhaq_s vrmlaldavhaq_u]) ;; @@ -3992,22 +4002,6 @@ (define_insn "mve_vqmovuntq_m_s" [(set_attr "type" "mve_move") (set_attr "length""8")]) -;; -;; [vqrshrntq_n_u, vqrshrntq_n_s]) -;; -(define_insn "mve_vqrshrntq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VQRSHRNTQ_N)) - ] - "TARGET_HAVE_MVE" - "vqrshrnt.%# %q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - ;; ;; [vqrshruntq_n_s]) ;; @@ -4024,38 +4018,6 @@ (define_insn "mve_vqrshruntq_n_s" [(set_attr "type" "mve_move") ]) -;; -;; [vqshrnbq_n_u, vqshrnbq_n_s]) -;; -(define_insn "mve_vqshrnbq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VQSHRNBQ_N)) - ] - "TARGET_HAVE_MVE" - "vqshrnb.%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - -;; -;; [vqshrntq_n_u, vqshrntq_n_s]) -;; -(define_insn "mve_vqshrntq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VQSHRNTQ_N)) - ] - "TARGET_HAVE_MVE" - "vqshrnt.%# %q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - ;; ;; [vqshrunbq_n_s]) ;; @@ -4296,70 +4258,6 @@ (define_insn "mve_vrndxq_m_f" [(set_attr "type" "mve_move") (set_attr "length""8")]) -;; -;; [vrshrnbq_n_s, vrshrnbq_n_u]) -;; -(define_insn "mve_vrshrnbq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VRSHRNBQ_N)) - ] - "TARGET_HAVE_MVE" - "vrshrnb.i%# %q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - -;; -;; [vrshrntq_n_u, vrshrntq_n_s]) -;; -(define_insn "mve_vrshrntq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VRSHRNTQ_N)) - ] - "TARGET_HAVE_MVE" - "vrshrnt.i%# %q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - -;; -;; [vshrnbq_n_u, vshrnbq_n_s]) -;; -(define_insn "mve_vshrnbq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VSHRNBQ_N)) - ] - "TARGET_HAVE_MVE" - "vshrnb.i%# %q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - -;; -;; [vshrntq_n_s, vshrntq_n_u]) -;; -(define_insn "mve_vshrntq_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "")] - VSHRNTQ_N)) - ] - "TARGET_HAVE_MVE" - "vshrnt.i%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") -]) - ;; ;; [vcvtmq_m_s, vcvtmq_m_u]) ;; @@ -4992,70 +4890,26 @@ (define_insn "mve_vmlaldavaxq_p_" (set_attr "length""8")]) ;; -;; [vqrshrnbq_m_n_u, vqrshrnbq_m_n_s]) -;; -(define_insn "mve_vqrshrnbq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VQRSHRNBQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vqrshrnbt.%# %q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - -;; -;; [vqrshrntq_m_n_s, vqrshrntq_m_n_u]) -;; -(define_insn "mve_vqrshrntq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VQRSHRNTQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vqrshrntt.%# %q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - -;; -;; [vqshrnbq_m_n_u, vqshrnbq_m_n_s]) -;; -(define_insn "mve_vqshrnbq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VQSHRNBQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\n\tvqshrnbt.%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - -;; -;; [vqshrntq_m_n_s, vqshrntq_m_n_u]) +;; [vqrshrnbq_m_n_u, vqrshrnbq_m_n_s] +;; [vqrshrntq_m_n_s, vqrshrntq_m_n_u] +;; [vqshrnbq_m_n_u, vqshrnbq_m_n_s] +;; [vqshrntq_m_n_s, vqshrntq_m_n_u] +;; [vrshrnbq_m_n_u, vrshrnbq_m_n_s] +;; [vrshrntq_m_n_u, vrshrntq_m_n_s] +;; [vshrnbq_m_n_s, vshrnbq_m_n_u] +;; [vshrntq_m_n_s, vshrntq_m_n_u] ;; -(define_insn "mve_vqshrntq_m_n_" +(define_insn "@mve_q_m_n_" [ (set (match_operand: 0 "s_register_operand" "=w") (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VQSHRNTQ_M_N)) + (match_operand:MVE_5 2 "s_register_operand" "w") + (match_operand:SI 3 "" "") + (match_operand: 4 "vpr_register_operand" "Up")] + MVE_SHRN_M_N)) ] "TARGET_HAVE_MVE" - "vpst\;vqshrntt.%#\t%q0, %q2, %3" + "vpst\;t.%#\t%q0, %q2, %3" [(set_attr "type" "mve_move") (set_attr "length""8")]) @@ -5076,40 +4930,6 @@ (define_insn "mve_vrmlaldavhaq_p_sv4si" [(set_attr "type" "mve_move") (set_attr "length""8")]) -;; -;; [vrshrnbq_m_n_u, vrshrnbq_m_n_s]) -;; -(define_insn "mve_vrshrnbq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VRSHRNBQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vrshrnbt.i%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - -;; -;; [vrshrntq_m_n_u, vrshrntq_m_n_s]) -;; -(define_insn "mve_vrshrntq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VRSHRNTQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vrshrntt.i%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - ;; ;; [vshllbq_m_n_u, vshllbq_m_n_s]) ;; @@ -5144,40 +4964,6 @@ (define_insn "mve_vshlltq_m_n_" [(set_attr "type" "mve_move") (set_attr "length""8")]) -;; -;; [vshrnbq_m_n_s, vshrnbq_m_n_u]) -;; -(define_insn "mve_vshrnbq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VSHRNBQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vshrnbt.i%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - -;; -;; [vshrntq_m_n_s, vshrntq_m_n_u]) -;; -(define_insn "mve_vshrntq_m_n_" - [ - (set (match_operand: 0 "s_register_operand" "=w") - (unspec: [(match_operand: 1 "s_register_operand" "0") - (match_operand:MVE_5 2 "s_register_operand" "w") - (match_operand:SI 3 "" "") - (match_operand: 4 "vpr_register_operand" "Up")] - VSHRNTQ_M_N)) - ] - "TARGET_HAVE_MVE" - "vpst\;vshrntt.i%#\t%q0, %q2, %3" - [(set_attr "type" "mve_move") - (set_attr "length""8")]) - ;; ;; [vmlsldavaq_p_s]) ;;