From patchwork Wed Jun 8 09:38:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 54935 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 D30853857423 for ; Wed, 8 Jun 2022 09:39:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D30853857423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1654681168; bh=+POh9qbi6Nf5LtKlnKOV2LZr/9GLI63/xirLlSdhUCU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=FfnV90NhjXerpADBRiXYKMyJoClVG4eRuFPsyaDuIC9k3SDah+JnnF1dv8THSHh0Y 702lfGGV8bnIODPrHa8QftHyIOf28uFm4Ze04t+3rl06OJtPy3KmPe+tobJvl/jAXO T/9bI1dR3WWys8W/cRztzwrM7s2nXEolyotJyfm0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2058.outbound.protection.outlook.com [40.107.21.58]) by sourceware.org (Postfix) with ESMTPS id 4753B3857371 for ; Wed, 8 Jun 2022 09:38:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4753B3857371 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LKfuK6gYzuqkLA4j2dOFDxWAXp1OTd0I+y8NI8FHJQZjXQxz7f/XEWG2kFw3viw/vwYM+w5udocHDKChLt9V7snldbPi6xQTtreBSV2bT9EcJmXHaNwChvytXgV+qN5NthM3wHbf/E9J+cXIULPERcqQM5hlG9lC+EjopGiWGadqQBcItCZTAmM//9DnPvhibnue390bcSzx4kNq94r3ztJ4388lWu5UVnVYDxq+SXZPsT8gqVRH4F0402gSydEAvX9qLfsCKcpU2BVmrZEYwyap1VX3SzdxpXr5r39DDnF65egrRjIc6kptAX+QfCqNksSOa5lhamjsiQlEtLD2+w== ARC-Message-Signature: i=2; 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=+POh9qbi6Nf5LtKlnKOV2LZr/9GLI63/xirLlSdhUCU=; b=ID09Koj2eHiA9Ek/eraxeqsaTIUQ+V23RWaDHh6S2IrWxHfzSyMHHNRJKn7i3z4K1Nmj7akyiHBeeJt58DT1M5cAwgK55vv4CgFQcTCTgYeZmXFV23uV9aCckYSDpxTYxPW5RhYpiw3LVrAvDnk4iMadW/oAFQA77jHzg6qT5NV/sRy1vbDIuOOXOxFZqoqwDf+V9ec2CGwnH4GstFohYewUZFF87uzLwbwESFXYEKH0yYQzYDSs9rkPeddZZvZEq7SHBRNaGi2hgdIjp8DyjIUFw9VLsLZUx/2178kFrrpJ29rM30uvMy33f/sPajM9S21gwROTa5hRrxQsxVuZIA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from DU2PR04CA0061.eurprd04.prod.outlook.com (2603:10a6:10:232::6) by AS8PR08MB6104.eurprd08.prod.outlook.com (2603:10a6:20b:299::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12; Wed, 8 Jun 2022 09:38:46 +0000 Received: from DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:232:cafe::88) by DU2PR04CA0061.outlook.office365.com (2603:10a6:10:232::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12 via Frontend Transport; Wed, 8 Jun 2022 09:38:46 +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 DBAEUR03FT013.mail.protection.outlook.com (100.127.142.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12 via Frontend Transport; Wed, 8 Jun 2022 09:38:46 +0000 Received: ("Tessian outbound 1766a3bff204:v120"); Wed, 08 Jun 2022 09:38:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 89875b35746e7945 X-CR-MTA-TID: 64aa7808 Received: from db5a80d2c608.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3E7C5F13-8816-4B4A-9F50-B2E354AD6062.1; Wed, 08 Jun 2022 09:38:34 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id db5a80d2c608.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jun 2022 09:38:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XAwL4xIeKFAZxOMABhnmxU0VIarO6itE6n3OWYvffXaZyUswbgmPutJDipNsd/SoHlEjcwWAGYAggPgFLSuiIQumySsyXCPFFoU7xV6k7yP8QmB+A3qH09RK+EMgjzZimgMtMP0BeV9i8CLbR+/Q6mCQ2UribLHRuX8G0iAGMkgIQpcb5F3x7MKiTn4W0V5V3NmqgEv8FhvwBGhbmhfhjxBDnWcbmjj4ov1u0o5hRzrcN5crZtBJ7M5yuW9rVOhGwqXLdS1QfrOcUnifQoW6NOE4CjImIgwABxoK3ANhQ/acUKU5s8qJAOhinhKQbarPmUB0mUC7vcM6zoQc59n6zQ== 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=+POh9qbi6Nf5LtKlnKOV2LZr/9GLI63/xirLlSdhUCU=; b=Ysxvgs3/XCqgrF49HduVwo/2iwmYB37PlCUzP4iQYvat4mWy2RoBCf3XUk4OSfymio5giRAd1+0tHK3xzeWdEyQoC1/kNXAMao1t59xfdPS3rvNxJg7TSRNcC54DsiXNWNLoB+gzHWq/WV08EsSHPq0Xe7QD4bPx0vhdGPk5bHPYt0Z0wUHH5YCNBY2HRUXj3S2Y5ST8Nl5voBq+hjWMOpY5BzpvdGlxxEFjK4IemtcH97lIfWprgjUiJP1kvEpIl7kdBAjU7Z3Dxp7kqLvOmTGwMIedor3QDBr79+cZDreB5ulexPflQb/RvnSHRdQBICqN6HG74dX2unIyh2S9tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VE1PR08MB5024.eurprd08.prod.outlook.com (2603:10a6:803:106::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.15; Wed, 8 Jun 2022 09:38:22 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::54e5:594b:e5fd:a9b4]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::54e5:594b:e5fd:a9b4%7]) with mapi id 15.20.5314.019; Wed, 8 Jun 2022 09:38:22 +0000 Date: Wed, 8 Jun 2022 10:38:20 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH]AArch64 relax predicate on load structure load instructions Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0162.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::23) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 572be1c4-834d-4a18-f9d2-08da4932af2b X-MS-TrafficTypeDiagnostic: VE1PR08MB5024:EE_|DBAEUR03FT013:EE_|AS8PR08MB6104:EE_ X-Microsoft-Antispam-PRVS: 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: 1282JHsXwzWC0OwJyTXO1ymhLRCc8J7JgDdxoMtlQIu6pDTw1q8nh+5mD7QfW08tiLN5SoR2dffhWqes9ev4g4jxFLSLKzPTPM9ydyGelN4wQwnOV9RStMTsoqD8ldlb+c0UL+B4GEcITLfISl8jRN0NlwuMdrUnIrJR1s1fZvDOzIhNaMLgVJb9I3XM1aVmJv5FS2tzzF68rfszCcE1SMFgGdCTTMaXiFSdDuDc3oMUZtOTy+QGqlJwcs4p7i1sL2ihugUb7RafmpWaDQKwMWkhmPKJIjznNyVVUGhTi1GGIlH+VqlBNjxy79rZ1+YLqjaW8CLsXTVfQky3rIpMFFIo8faHHK+7gAiVp1gFtRhf3kGptmVv2N805SDn+tuHkny2CW+7scMS/xyF3crUTK/MJ/8ps8oUaD4v9FMna5dHwe5sxAmKNWccZykGmmOtms/6ajoHu4YrrxuWKKIMC7acqrjEtQBD9ibjUajBUBcOpGZyvwKdmeSHOEd3a3QEdprpcoo4YBggT7IrHRHoi6DRsT6q1GwYt40GUzDbB5HNzQ6zlq85gkF8zxEi+VV9uk2HwIX2RAByNpl28PYOYF18eUT7q+vCGEj1x+l+cEWyVgVtys7z7KYBGKYZsPBeQeZU1A9Es/+MBCfOf68xKsDFKG4niTgzLp2vMLapcBDGwDp+Bt3Qzx9UbhYHNjuhpaAj+xzgBrlSxVHwmKkRjz5VV6f7rJfyXWNkKlSjqBEJfVljP/MElLFjHI11pEmf1djM6HETeJoAtSzuPagObugNhB4sDXxg114fkjtOsyH8mbGg0nJZ8eDokhwOiGTqlcBnUWE5JToFJyxhD3k5KQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(235185007)(66946007)(66476007)(6506007)(8676002)(38100700002)(30864003)(33964004)(44144004)(6486002)(86362001)(66556008)(4326008)(6512007)(5660300002)(186003)(2906002)(44832011)(508600001)(2616005)(84970400001)(6916009)(316002)(26005)(8936002)(4743002)(4216001)(2700100001)(357404004); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5024 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 756edfdd-96bf-425b-5dbe-08da4932a0ef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zUmVNZaQdEqpxpaCe4vvdEDoM9FETDq9SScBEnodhMKm695kPZh29XMVM4urCHsn0B8uw8yJFZsYyFGa10wIXFeYYWPRcYt2BFvAevAP5P1lZ/w25/FtP079y3bgVA2UXFdjGzBoEboGnXO6/+hAru3i+ZfdExv5Wtvv9aq2AkXHkOwX9jySQgpUnBYHJMe1NHvpOzRxVmHYTo2nhifqM7oGJ87E0PWtfA4UX2WbsrV4CEkNGUX3x0mr5HgnF/V0ACIn97cM6qs4jcuLOUCm521rwHLN6sJZL6OEqgMXP7ustDz4al5axSk5m71/2iRttoRXz9N34uY8Ae07P5iaFlqH0ZhYvJLfIpCMHbPsFnONTQMwBPvPGyiqOAgUVl7vedsTWef9u3hbFja+fKr5oaXTGz8pdt4fOp62OznajdHmMDvRkvmVtjtrpAx6Ne6UWKpee03w3INInYDyb2eO+7y19cdYiBJhPdJM1A+mxuncYyivKUvKXME2Wtf3alzYDFUJB3eqOf6QNotkN7VZJZp4TO7KMzTvHi1tx3VhvfmHxWdd1t85ESli/S8tZ9BdnYK9xGYF+O35o7wohhUYw6WunIV3/TfGHl91ruSqZF31JynO2yimfY7T4HARMuDKxlSqMdYW5hvA57uSFvu25pAGPxN1zD7tv97GEle+DwajZKMPG+JpZOJN9p6Cb97fq4jolIDtGlSkuwEDRC6VYuzOpffFFHGcVwQoQzSJMcI6EVge/vfoR3xxYDmn6FoV67/nJ2Txt6tY3+iGu+A4SdRzPSr0Oo3c123uLAHWtGXRR+Ui7HWXzdBT+66RyI2LNCD8uVFGuznD2laDj+AKN2Gid/NrK5RVIHY3d1gjHRU= 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:(13230001)(4636009)(46966006)(40470700004)(36840700001)(86362001)(186003)(6916009)(336012)(47076005)(82310400005)(508600001)(33964004)(6512007)(26005)(6506007)(44144004)(4743002)(36860700001)(2616005)(84970400001)(5660300002)(6486002)(81166007)(235185007)(70206006)(70586007)(356005)(2906002)(316002)(36756003)(4326008)(8936002)(8676002)(44832011)(40460700003)(30864003)(4216001)(2700100001)(357404004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2022 09:38:46.2277 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 572be1c4-834d-4a18-f9d2-08da4932af2b 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: DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6104 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, KAM_LOTSOFHASH, KAM_SHORT, 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: Tamar Christina via Gcc-patches From: Tamar Christina Reply-To: Tamar Christina Cc: Richard.Earnshaw@arm.com, nd@arm.com, richard.sandiford@arm.com, Marcus.Shawcroft@arm.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, At some point in time we started lowering the ld1r instructions in gimple. That is: uint8x8_t f1(const uint8_t *in) { return vld1_dup_u8(&in[1]); } generates at gimple: _3 = MEM[(const uint8_t *)in_1(D) + 1B]; _4 = {_3, _3, _3, _3, _3, _3, _3, _3}; Which is good, but we then generate: f1: ldr b0, [x0, 1] dup v0.8b, v0.b[0] ret instead of ld1r. The reason for this is because the load instructions have a too restrictive predicate on them which causes combine not to be able to combine the instructions due to the predicate only accepting simple addressing modes. This patch relaxes the predicate to accept any memory operand and relies on LRA to legitimize the address when it needs to as the constraint still only allows the simple addressing mode. Reload is always able to legitimize to these. Secondly since we are now actually generating more ld1r it became clear that the lane instructions suffer from a similar issue. i.e. float32x4_t f2(const float32_t *in, float32x4_t a) { float32x4_t dup = vld1q_dup_f32(&in[1]); return vfmaq_laneq_f32 (a, a, dup, 1); } would generate ld1r + vector fmla instead of ldr + lane fmla. The reason for this is similar to the ld1r issue. The predicate is too restrictive in only acception register operands but not memory. This relaxes it to accept register and/or memory while leaving the constraint to only accept registers. This will have LRA generate a reload if needed forcing the memory to registers using the standard patterns. These two changes allow combine and reload to generate the right sequences. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd.md (mul_lane3, mul_laneq3, mul_n3, *aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt, *aarch64_mla_elt_, aarch64_mla_n, *aarch64_mls_elt, *aarch64_mls_elt_, aarch64_mls_n, *aarch64_fma4_elt, *aarch64_fma4_elt_, *aarch64_fma4_elt_from_dup, *aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt, *aarch64_fnma4_elt_, *aarch64_fnma4_elt_from_dup, *aarch64_fnma4_elt_to_64v2df, *aarch64_mulx_elt_, *aarch64_mulx_elt, *aarch64_mulx_elt_from_dup, *aarch64_vgetfmulx): Relax register_operand to nonimmediate_operand. (aarch64_simd_ld2, aarch64_simd_ld2r, aarch64_vec_load_lanes_lane, vec_load_lanes, aarch64_simd_st2, aarch64_vec_store_lanes_lane, vec_store_lanes, aarch64_simd_ld3, aarch64_simd_ld3r, aarch64_vec_load_lanes_lane, vec_load_lanes, aarch64_simd_st3, aarch64_vec_store_lanes_lane, vec_store_lanes, aarch64_simd_ld4, aarch64_simd_ld4r, aarch64_vec_load_lanes_lane, vec_load_lanes, aarch64_simd_st4, aarch64_vec_store_lanes_lane, vec_store_lanes, aarch64_ld1_x3_, aarch64_ld1_x4_, aarch64_st1_x2_, aarch64_st1_x3_, aarch64_st1_x4_, aarch64_be_ld1, aarch64_be_st1, aarch64_ld2_dreg, aarch64_ld2_dreg, aarch64_ld3_dreg, aarch64_ld3_dreg, aarch64_ld4_dreg, aarch64_ld4_dreg, aarch64_st2_dreg, aarch64_st2_dreg, aarch64_st3_dreg, aarch64_st3_dreg, aarch64_st4_dreg, aarch64_st4_dreg, *aarch64_simd_ld1r, aarch64_simd_ld1_x2): Relax aarch64_simd_struct_operand to memory_operand. * config/aarch64/predicates.md (aarch64_simd_struct_operand): Remove. gcc/testsuite/ChangeLog: * gcc.target/aarch64/vld1r.c: New test. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index be5c70bbb7520ae93d19c4a432ce34863e5b9a64..24e3274ddda2ea76c83571fada8ff4c953b752a1 100644 --- diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index be5c70bbb7520ae93d19c4a432ce34863e5b9a64..24e3274ddda2ea76c83571fada8ff4c953b752a1 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -712,7 +712,7 @@ (define_insn "mul_lane3" (mult:VMULD (vec_duplicate:VMULD (vec_select: - (match_operand: 2 "register_operand" "") + (match_operand: 2 "nonimmediate_operand" "") (parallel [(match_operand:SI 3 "immediate_operand" "i")]))) (match_operand:VMULD 1 "register_operand" "w")))] "TARGET_SIMD" @@ -728,7 +728,7 @@ (define_insn "mul_laneq3" (mult:VMUL (vec_duplicate:VMUL (vec_select: - (match_operand: 2 "register_operand" "") + (match_operand: 2 "nonimmediate_operand" "") (parallel [(match_operand:SI 3 "immediate_operand")]))) (match_operand:VMUL 1 "register_operand" "w")))] "TARGET_SIMD" @@ -743,7 +743,7 @@ (define_insn "mul_n3" [(set (match_operand:VMUL 0 "register_operand" "=w") (mult:VMUL (vec_duplicate:VMUL - (match_operand: 2 "register_operand" "")) + (match_operand: 2 "nonimmediate_operand" "")) (match_operand:VMUL 1 "register_operand" "w")))] "TARGET_SIMD" "mul\t%0., %1., %2.[0]"; @@ -789,7 +789,7 @@ (define_insn "*aarch64_mul3_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (mult:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (match_operand:DF 3 "register_operand" "w")))] "TARGET_SIMD" @@ -1406,7 +1406,7 @@ (define_insn "*aarch64_mla_elt" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand:VDQHS 1 "register_operand" "") + (match_operand:VDQHS 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] @@ -1424,7 +1424,7 @@ (define_insn "*aarch64_mla_elt_" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] @@ -1441,7 +1441,7 @@ (define_insn "aarch64_mla_n" (plus:VDQHS (mult:VDQHS (vec_duplicate:VDQHS - (match_operand: 3 "register_operand" "")) + (match_operand: 3 "nonimmediate_operand" "")) (match_operand:VDQHS 2 "register_operand" "w")) (match_operand:VDQHS 1 "register_operand" "0")))] "TARGET_SIMD" @@ -1466,7 +1466,7 @@ (define_insn "*aarch64_mls_elt" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand:VDQHS 1 "register_operand" "") + (match_operand:VDQHS 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" @@ -1484,7 +1484,7 @@ (define_insn "*aarch64_mls_elt_" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" @@ -1501,7 +1501,7 @@ (define_insn "aarch64_mls_n" (match_operand:VDQHS 1 "register_operand" "0") (mult:VDQHS (vec_duplicate:VDQHS - (match_operand: 3 "register_operand" "")) + (match_operand: 3 "nonimmediate_operand" "")) (match_operand:VDQHS 2 "register_operand" "w"))))] "TARGET_SIMD" "mls\t%0., %2., %3.[0]" @@ -2882,7 +2882,7 @@ (define_insn "*aarch64_fma4_elt" (fma:VDQF (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 1 "register_operand" "") + (match_operand:VDQF 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQF 3 "register_operand" "w") (match_operand:VDQF 4 "register_operand" "0")))] @@ -2899,7 +2899,7 @@ (define_insn "*aarch64_fma4_elt_" (fma:VDQSF (vec_duplicate:VDQSF (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQSF 3 "register_operand" "w") (match_operand:VDQSF 4 "register_operand" "0")))] @@ -2915,7 +2915,7 @@ (define_insn "*aarch64_fma4_elt_from_dup" [(set (match_operand:VMUL 0 "register_operand" "=w") (fma:VMUL (vec_duplicate:VMUL - (match_operand: 1 "register_operand" "")) + (match_operand: 1 "nonimmediate_operand" "")) (match_operand:VMUL 2 "register_operand" "w") (match_operand:VMUL 3 "register_operand" "0")))] "TARGET_SIMD" @@ -2927,7 +2927,7 @@ (define_insn "*aarch64_fma4_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (fma:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (match_operand:DF 3 "register_operand" "w") (match_operand:DF 4 "register_operand" "0")))] @@ -2957,7 +2957,7 @@ (define_insn "*aarch64_fnma4_elt" (match_operand:VDQF 3 "register_operand" "w")) (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 1 "register_operand" "") + (match_operand:VDQF 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQF 4 "register_operand" "0")))] "TARGET_SIMD" @@ -2975,7 +2975,7 @@ (define_insn "*aarch64_fnma4_elt_" (match_operand:VDQSF 3 "register_operand" "w")) (vec_duplicate:VDQSF (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQSF 4 "register_operand" "0")))] "TARGET_SIMD" @@ -2992,7 +2992,7 @@ (define_insn "*aarch64_fnma4_elt_from_dup" (neg:VMUL (match_operand:VMUL 2 "register_operand" "w")) (vec_duplicate:VMUL - (match_operand: 1 "register_operand" "")) + (match_operand: 1 "nonimmediate_operand" "")) (match_operand:VMUL 3 "register_operand" "0")))] "TARGET_SIMD" "fmls\t%0., %2., %1.[0]" @@ -3003,7 +3003,7 @@ (define_insn "*aarch64_fnma4_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (fma:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (neg:DF (match_operand:DF 3 "register_operand" "w")) @@ -4934,7 +4934,7 @@ (define_insn "*aarch64_mulx_elt_" [(match_operand:VDQSF 1 "register_operand" "w") (vec_duplicate:VDQSF (vec_select: - (match_operand: 2 "register_operand" "w") + (match_operand: 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")])))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -4953,7 +4953,7 @@ (define_insn "*aarch64_mulx_elt" [(match_operand:VDQF 1 "register_operand" "w") (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 2 "register_operand" "w") + (match_operand:VDQF 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")])))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -4971,7 +4971,7 @@ (define_insn "*aarch64_mulx_elt_from_dup" (unspec:VHSDF [(match_operand:VHSDF 1 "register_operand" "w") (vec_duplicate:VHSDF - (match_operand: 2 "register_operand" ""))] + (match_operand: 2 "nonimmediate_operand" ""))] UNSPEC_FMULX))] "TARGET_SIMD" "fmulx\t%0., %1., %2.[0]"; @@ -4987,7 +4987,7 @@ (define_insn "*aarch64_vgetfmulx" (unspec: [(match_operand: 1 "register_operand" "w") (vec_select: - (match_operand:VDQF 2 "register_operand" "w") + (match_operand:VDQF 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")]))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -6768,7 +6768,7 @@ (define_insn "*sqrt2" (define_insn "aarch64_simd_ld2" [(set (match_operand:VSTRUCT_2Q 0 "register_operand" "=w") (unspec:VSTRUCT_2Q [ - (match_operand:VSTRUCT_2Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2Q 1 "memory_operand" "Utv")] UNSPEC_LD2))] "TARGET_SIMD" "ld2\\t{%S0. - %T0.}, %1" @@ -6778,7 +6778,7 @@ (define_insn "aarch64_simd_ld2" (define_insn "aarch64_simd_ld2r" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD2_DUP))] "TARGET_SIMD" "ld2r\\t{%S0. - %T0.}, %1" @@ -6788,7 +6788,7 @@ (define_insn "aarch64_simd_ld2r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_2QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD2_LANE))] @@ -6804,7 +6804,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_2Q 0 "register_operand") (unspec:VSTRUCT_2Q [ - (match_operand:VSTRUCT_2Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_2Q 1 "memory_operand")] UNSPEC_LD2))] "TARGET_SIMD" { @@ -6822,7 +6822,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st2" - [(set (match_operand:VSTRUCT_2Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2Q [ (match_operand:VSTRUCT_2Q 1 "register_operand" "w")] UNSPEC_ST2))] @@ -6833,7 +6833,7 @@ (define_insn "aarch64_simd_st2" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_2QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST2_LANE))] @@ -6847,7 +6847,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_2Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_2Q 0 "memory_operand") (unspec:VSTRUCT_2Q [(match_operand:VSTRUCT_2Q 1 "register_operand")] UNSPEC_ST2))] "TARGET_SIMD" @@ -6868,7 +6868,7 @@ (define_expand "vec_store_lanes" (define_insn "aarch64_simd_ld3" [(set (match_operand:VSTRUCT_3Q 0 "register_operand" "=w") (unspec:VSTRUCT_3Q [ - (match_operand:VSTRUCT_3Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3Q 1 "memory_operand" "Utv")] UNSPEC_LD3))] "TARGET_SIMD" "ld3\\t{%S0. - %U0.}, %1" @@ -6878,7 +6878,7 @@ (define_insn "aarch64_simd_ld3" (define_insn "aarch64_simd_ld3r" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD3_DUP))] "TARGET_SIMD" "ld3r\\t{%S0. - %U0.}, %1" @@ -6888,7 +6888,7 @@ (define_insn "aarch64_simd_ld3r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_3QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD3_LANE))] @@ -6904,7 +6904,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_3Q 0 "register_operand") (unspec:VSTRUCT_3Q [ - (match_operand:VSTRUCT_3Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_3Q 1 "memory_operand")] UNSPEC_LD3))] "TARGET_SIMD" { @@ -6922,7 +6922,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st3" - [(set (match_operand:VSTRUCT_3Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3Q [(match_operand:VSTRUCT_3Q 1 "register_operand" "w")] UNSPEC_ST3))] "TARGET_SIMD" @@ -6932,7 +6932,7 @@ (define_insn "aarch64_simd_st3" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_3QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST3_LANE))] @@ -6946,7 +6946,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_3Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_3Q 0 "memory_operand") (unspec:VSTRUCT_3Q [ (match_operand:VSTRUCT_3Q 1 "register_operand")] UNSPEC_ST3))] @@ -6968,7 +6968,7 @@ (define_expand "vec_store_lanes" (define_insn "aarch64_simd_ld4" [(set (match_operand:VSTRUCT_4Q 0 "register_operand" "=w") (unspec:VSTRUCT_4Q [ - (match_operand:VSTRUCT_4Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4Q 1 "memory_operand" "Utv")] UNSPEC_LD4))] "TARGET_SIMD" "ld4\\t{%S0. - %V0.}, %1" @@ -6978,7 +6978,7 @@ (define_insn "aarch64_simd_ld4" (define_insn "aarch64_simd_ld4r" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD4_DUP))] "TARGET_SIMD" "ld4r\\t{%S0. - %V0.}, %1" @@ -6988,7 +6988,7 @@ (define_insn "aarch64_simd_ld4r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_4QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD4_LANE))] @@ -7004,7 +7004,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_4Q 0 "register_operand") (unspec:VSTRUCT_4Q [ - (match_operand:VSTRUCT_4Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_4Q 1 "memory_operand")] UNSPEC_LD4))] "TARGET_SIMD" { @@ -7022,7 +7022,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st4" - [(set (match_operand:VSTRUCT_4Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4Q [ (match_operand:VSTRUCT_4Q 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7033,7 +7033,7 @@ (define_insn "aarch64_simd_st4" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_4QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST4_LANE))] @@ -7047,7 +7047,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_4Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_4Q 0 "memory_operand") (unspec:VSTRUCT_4Q [(match_operand:VSTRUCT_4Q 1 "register_operand")] UNSPEC_ST4))] "TARGET_SIMD" @@ -7138,7 +7138,7 @@ (define_expand "aarch64_ld1x3" (define_insn "aarch64_ld1_x3_" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD - [(match_operand:VSTRUCT_3QD 1 "aarch64_simd_struct_operand" "Utv")] + [(match_operand:VSTRUCT_3QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %U0.}, %1" @@ -7158,7 +7158,7 @@ (define_expand "aarch64_ld1x4" (define_insn "aarch64_ld1_x4_" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD - [(match_operand:VSTRUCT_4QD 1 "aarch64_simd_struct_operand" "Utv")] + [(match_operand:VSTRUCT_4QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %V0.}, %1" @@ -7176,7 +7176,7 @@ (define_expand "aarch64_st1x2" }) (define_insn "aarch64_st1_x2_" - [(set (match_operand:VSTRUCT_2QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2QD [(match_operand:VSTRUCT_2QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7196,7 +7196,7 @@ (define_expand "aarch64_st1x3" }) (define_insn "aarch64_st1_x3_" - [(set (match_operand:VSTRUCT_3QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3QD [(match_operand:VSTRUCT_3QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7216,7 +7216,7 @@ (define_expand "aarch64_st1x4" }) (define_insn "aarch64_st1_x4_" - [(set (match_operand:VSTRUCT_4QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4QD [(match_operand:VSTRUCT_4QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7268,7 +7268,7 @@ (define_insn "*aarch64_movv8di" (define_insn "aarch64_be_ld1" [(set (match_operand:VALLDI_F16 0 "register_operand" "=w") (unspec:VALLDI_F16 [(match_operand:VALLDI_F16 1 - "aarch64_simd_struct_operand" "Utv")] + "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%0}, %1" @@ -7276,7 +7276,7 @@ (define_insn "aarch64_be_ld1" ) (define_insn "aarch64_be_st1" - [(set (match_operand:VALLDI_F16 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VALLDI_F16 0 "memory_operand" "=Utv") (unspec:VALLDI_F16 [(match_operand:VALLDI_F16 1 "register_operand" "w")] UNSPEC_ST1))] "TARGET_SIMD" @@ -7551,7 +7551,7 @@ (define_expand "aarch64_ldr" (define_insn "aarch64_ld2_dreg" [(set (match_operand:VSTRUCT_2DNX 0 "register_operand" "=w") (unspec:VSTRUCT_2DNX [ - (match_operand:VSTRUCT_2DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2DNX 1 "memory_operand" "Utv")] UNSPEC_LD2_DREG))] "TARGET_SIMD" "ld2\\t{%S0. - %T0.}, %1" @@ -7561,7 +7561,7 @@ (define_insn "aarch64_ld2_dreg" (define_insn "aarch64_ld2_dreg" [(set (match_operand:VSTRUCT_2DX 0 "register_operand" "=w") (unspec:VSTRUCT_2DX [ - (match_operand:VSTRUCT_2DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2DX 1 "memory_operand" "Utv")] UNSPEC_LD2_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %T0.1d}, %1" @@ -7571,7 +7571,7 @@ (define_insn "aarch64_ld2_dreg" (define_insn "aarch64_ld3_dreg" [(set (match_operand:VSTRUCT_3DNX 0 "register_operand" "=w") (unspec:VSTRUCT_3DNX [ - (match_operand:VSTRUCT_3DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3DNX 1 "memory_operand" "Utv")] UNSPEC_LD3_DREG))] "TARGET_SIMD" "ld3\\t{%S0. - %U0.}, %1" @@ -7581,7 +7581,7 @@ (define_insn "aarch64_ld3_dreg" (define_insn "aarch64_ld3_dreg" [(set (match_operand:VSTRUCT_3DX 0 "register_operand" "=w") (unspec:VSTRUCT_3DX [ - (match_operand:VSTRUCT_3DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3DX 1 "memory_operand" "Utv")] UNSPEC_LD3_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %U0.1d}, %1" @@ -7591,7 +7591,7 @@ (define_insn "aarch64_ld3_dreg" (define_insn "aarch64_ld4_dreg" [(set (match_operand:VSTRUCT_4DNX 0 "register_operand" "=w") (unspec:VSTRUCT_4DNX [ - (match_operand:VSTRUCT_4DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4DNX 1 "memory_operand" "Utv")] UNSPEC_LD4_DREG))] "TARGET_SIMD" "ld4\\t{%S0. - %V0.}, %1" @@ -7601,7 +7601,7 @@ (define_insn "aarch64_ld4_dreg" (define_insn "aarch64_ld4_dreg" [(set (match_operand:VSTRUCT_4DX 0 "register_operand" "=w") (unspec:VSTRUCT_4DX [ - (match_operand:VSTRUCT_4DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4DX 1 "memory_operand" "Utv")] UNSPEC_LD4_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %V0.1d}, %1" @@ -7841,7 +7841,7 @@ (define_insn "aarch64_rev" ) (define_insn "aarch64_st2_dreg" - [(set (match_operand:VSTRUCT_2DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2DNX [ (match_operand:VSTRUCT_2DNX 1 "register_operand" "w")] UNSPEC_ST2))] @@ -7851,7 +7851,7 @@ (define_insn "aarch64_st2_dreg" ) (define_insn "aarch64_st2_dreg" - [(set (match_operand:VSTRUCT_2DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2DX [ (match_operand:VSTRUCT_2DX 1 "register_operand" "w")] UNSPEC_ST2))] @@ -7861,7 +7861,7 @@ (define_insn "aarch64_st2_dreg" ) (define_insn "aarch64_st3_dreg" - [(set (match_operand:VSTRUCT_3DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3DNX [ (match_operand:VSTRUCT_3DNX 1 "register_operand" "w")] UNSPEC_ST3))] @@ -7871,7 +7871,7 @@ (define_insn "aarch64_st3_dreg" ) (define_insn "aarch64_st3_dreg" - [(set (match_operand:VSTRUCT_3DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3DX [ (match_operand:VSTRUCT_3DX 1 "register_operand" "w")] UNSPEC_ST3))] @@ -7881,7 +7881,7 @@ (define_insn "aarch64_st3_dreg" ) (define_insn "aarch64_st4_dreg" - [(set (match_operand:VSTRUCT_4DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4DNX [ (match_operand:VSTRUCT_4DNX 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7891,7 +7891,7 @@ (define_insn "aarch64_st4_dreg" ) (define_insn "aarch64_st4_dreg" - [(set (match_operand:VSTRUCT_4DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4DX [ (match_operand:VSTRUCT_4DX 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7974,7 +7974,7 @@ (define_expand "vec_init" (define_insn "*aarch64_simd_ld1r" [(set (match_operand:VALL_F16 0 "register_operand" "=w") (vec_duplicate:VALL_F16 - (match_operand: 1 "aarch64_simd_struct_operand" "Utv")))] + (match_operand: 1 "memory_operand" "Utv")))] "TARGET_SIMD" "ld1r\\t{%0.}, %1" [(set_attr "type" "neon_load1_all_lanes")] @@ -7983,7 +7983,7 @@ (define_insn "*aarch64_simd_ld1r" (define_insn "aarch64_simd_ld1_x2" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:VSTRUCT_2QD 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %T0.}, %1" diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index c308015ac2c13d24cd6bcec71247ec45df8cf5e6..6b70a364530c8108457091bfec12fe549f722149 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -494,10 +494,6 @@ (define_predicate "aarch64_simd_reg_or_minus_one" (ior (match_operand 0 "register_operand") (match_operand 0 "aarch64_simd_imm_minus_one"))) -(define_predicate "aarch64_simd_struct_operand" - (and (match_code "mem") - (match_test "TARGET_SIMD && aarch64_simd_mem_operand_p (op)"))) - ;; Like general_operand but allow only valid SIMD addressing modes. (define_predicate "aarch64_simd_general_operand" (and (match_operand 0 "general_operand") diff --git a/gcc/testsuite/gcc.target/aarch64/vld1r.c b/gcc/testsuite/gcc.target/aarch64/vld1r.c new file mode 100644 index 0000000000000000000000000000000000000000..72c505c403e9e239771379b7cadd8a9473f06113 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vld1r.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O" } */ +/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ + +#include + +/* +** f1: +** add x0, x0, 1 +** ld1r {v0.8b}, \[x0\] +** ret +*/ +uint8x8_t f1(const uint8_t *in) { + return vld1_dup_u8(&in[1]); +} + +/* +** f2: +** ldr s1, \[x0, 4\] +** fmla v0.4s, v0.4s, v1.s\[0\] +** ret +*/ +float32x4_t f2(const float32_t *in, float32x4_t a) { + float32x4_t dup = vld1q_dup_f32(&in[1]); + return vfmaq_laneq_f32 (a, a, dup, 1); +} --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -712,7 +712,7 @@ (define_insn "mul_lane3" (mult:VMULD (vec_duplicate:VMULD (vec_select: - (match_operand: 2 "register_operand" "") + (match_operand: 2 "nonimmediate_operand" "") (parallel [(match_operand:SI 3 "immediate_operand" "i")]))) (match_operand:VMULD 1 "register_operand" "w")))] "TARGET_SIMD" @@ -728,7 +728,7 @@ (define_insn "mul_laneq3" (mult:VMUL (vec_duplicate:VMUL (vec_select: - (match_operand: 2 "register_operand" "") + (match_operand: 2 "nonimmediate_operand" "") (parallel [(match_operand:SI 3 "immediate_operand")]))) (match_operand:VMUL 1 "register_operand" "w")))] "TARGET_SIMD" @@ -743,7 +743,7 @@ (define_insn "mul_n3" [(set (match_operand:VMUL 0 "register_operand" "=w") (mult:VMUL (vec_duplicate:VMUL - (match_operand: 2 "register_operand" "")) + (match_operand: 2 "nonimmediate_operand" "")) (match_operand:VMUL 1 "register_operand" "w")))] "TARGET_SIMD" "mul\t%0., %1., %2.[0]"; @@ -789,7 +789,7 @@ (define_insn "*aarch64_mul3_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (mult:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (match_operand:DF 3 "register_operand" "w")))] "TARGET_SIMD" @@ -1406,7 +1406,7 @@ (define_insn "*aarch64_mla_elt" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand:VDQHS 1 "register_operand" "") + (match_operand:VDQHS 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] @@ -1424,7 +1424,7 @@ (define_insn "*aarch64_mla_elt_" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] @@ -1441,7 +1441,7 @@ (define_insn "aarch64_mla_n" (plus:VDQHS (mult:VDQHS (vec_duplicate:VDQHS - (match_operand: 3 "register_operand" "")) + (match_operand: 3 "nonimmediate_operand" "")) (match_operand:VDQHS 2 "register_operand" "w")) (match_operand:VDQHS 1 "register_operand" "0")))] "TARGET_SIMD" @@ -1466,7 +1466,7 @@ (define_insn "*aarch64_mls_elt" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand:VDQHS 1 "register_operand" "") + (match_operand:VDQHS 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" @@ -1484,7 +1484,7 @@ (define_insn "*aarch64_mls_elt_" (mult:VDQHS (vec_duplicate:VDQHS (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" @@ -1501,7 +1501,7 @@ (define_insn "aarch64_mls_n" (match_operand:VDQHS 1 "register_operand" "0") (mult:VDQHS (vec_duplicate:VDQHS - (match_operand: 3 "register_operand" "")) + (match_operand: 3 "nonimmediate_operand" "")) (match_operand:VDQHS 2 "register_operand" "w"))))] "TARGET_SIMD" "mls\t%0., %2., %3.[0]" @@ -2882,7 +2882,7 @@ (define_insn "*aarch64_fma4_elt" (fma:VDQF (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 1 "register_operand" "") + (match_operand:VDQF 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQF 3 "register_operand" "w") (match_operand:VDQF 4 "register_operand" "0")))] @@ -2899,7 +2899,7 @@ (define_insn "*aarch64_fma4_elt_" (fma:VDQSF (vec_duplicate:VDQSF (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQSF 3 "register_operand" "w") (match_operand:VDQSF 4 "register_operand" "0")))] @@ -2915,7 +2915,7 @@ (define_insn "*aarch64_fma4_elt_from_dup" [(set (match_operand:VMUL 0 "register_operand" "=w") (fma:VMUL (vec_duplicate:VMUL - (match_operand: 1 "register_operand" "")) + (match_operand: 1 "nonimmediate_operand" "")) (match_operand:VMUL 2 "register_operand" "w") (match_operand:VMUL 3 "register_operand" "0")))] "TARGET_SIMD" @@ -2927,7 +2927,7 @@ (define_insn "*aarch64_fma4_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (fma:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (match_operand:DF 3 "register_operand" "w") (match_operand:DF 4 "register_operand" "0")))] @@ -2957,7 +2957,7 @@ (define_insn "*aarch64_fnma4_elt" (match_operand:VDQF 3 "register_operand" "w")) (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 1 "register_operand" "") + (match_operand:VDQF 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQF 4 "register_operand" "0")))] "TARGET_SIMD" @@ -2975,7 +2975,7 @@ (define_insn "*aarch64_fnma4_elt_" (match_operand:VDQSF 3 "register_operand" "w")) (vec_duplicate:VDQSF (vec_select: - (match_operand: 1 "register_operand" "") + (match_operand: 1 "nonimmediate_operand" "") (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQSF 4 "register_operand" "0")))] "TARGET_SIMD" @@ -2992,7 +2992,7 @@ (define_insn "*aarch64_fnma4_elt_from_dup" (neg:VMUL (match_operand:VMUL 2 "register_operand" "w")) (vec_duplicate:VMUL - (match_operand: 1 "register_operand" "")) + (match_operand: 1 "nonimmediate_operand" "")) (match_operand:VMUL 3 "register_operand" "0")))] "TARGET_SIMD" "fmls\t%0., %2., %1.[0]" @@ -3003,7 +3003,7 @@ (define_insn "*aarch64_fnma4_elt_to_64v2df" [(set (match_operand:DF 0 "register_operand" "=w") (fma:DF (vec_select:DF - (match_operand:V2DF 1 "register_operand" "w") + (match_operand:V2DF 1 "nonimmediate_operand" "w") (parallel [(match_operand:SI 2 "immediate_operand")])) (neg:DF (match_operand:DF 3 "register_operand" "w")) @@ -4934,7 +4934,7 @@ (define_insn "*aarch64_mulx_elt_" [(match_operand:VDQSF 1 "register_operand" "w") (vec_duplicate:VDQSF (vec_select: - (match_operand: 2 "register_operand" "w") + (match_operand: 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")])))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -4953,7 +4953,7 @@ (define_insn "*aarch64_mulx_elt" [(match_operand:VDQF 1 "register_operand" "w") (vec_duplicate:VDQF (vec_select: - (match_operand:VDQF 2 "register_operand" "w") + (match_operand:VDQF 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")])))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -4971,7 +4971,7 @@ (define_insn "*aarch64_mulx_elt_from_dup" (unspec:VHSDF [(match_operand:VHSDF 1 "register_operand" "w") (vec_duplicate:VHSDF - (match_operand: 2 "register_operand" ""))] + (match_operand: 2 "nonimmediate_operand" ""))] UNSPEC_FMULX))] "TARGET_SIMD" "fmulx\t%0., %1., %2.[0]"; @@ -4987,7 +4987,7 @@ (define_insn "*aarch64_vgetfmulx" (unspec: [(match_operand: 1 "register_operand" "w") (vec_select: - (match_operand:VDQF 2 "register_operand" "w") + (match_operand:VDQF 2 "nonimmediate_operand" "w") (parallel [(match_operand:SI 3 "immediate_operand" "i")]))] UNSPEC_FMULX))] "TARGET_SIMD" @@ -6768,7 +6768,7 @@ (define_insn "*sqrt2" (define_insn "aarch64_simd_ld2" [(set (match_operand:VSTRUCT_2Q 0 "register_operand" "=w") (unspec:VSTRUCT_2Q [ - (match_operand:VSTRUCT_2Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2Q 1 "memory_operand" "Utv")] UNSPEC_LD2))] "TARGET_SIMD" "ld2\\t{%S0. - %T0.}, %1" @@ -6778,7 +6778,7 @@ (define_insn "aarch64_simd_ld2" (define_insn "aarch64_simd_ld2r" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD2_DUP))] "TARGET_SIMD" "ld2r\\t{%S0. - %T0.}, %1" @@ -6788,7 +6788,7 @@ (define_insn "aarch64_simd_ld2r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_2QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD2_LANE))] @@ -6804,7 +6804,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_2Q 0 "register_operand") (unspec:VSTRUCT_2Q [ - (match_operand:VSTRUCT_2Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_2Q 1 "memory_operand")] UNSPEC_LD2))] "TARGET_SIMD" { @@ -6822,7 +6822,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st2" - [(set (match_operand:VSTRUCT_2Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2Q [ (match_operand:VSTRUCT_2Q 1 "register_operand" "w")] UNSPEC_ST2))] @@ -6833,7 +6833,7 @@ (define_insn "aarch64_simd_st2" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_2QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST2_LANE))] @@ -6847,7 +6847,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_2Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_2Q 0 "memory_operand") (unspec:VSTRUCT_2Q [(match_operand:VSTRUCT_2Q 1 "register_operand")] UNSPEC_ST2))] "TARGET_SIMD" @@ -6868,7 +6868,7 @@ (define_expand "vec_store_lanes" (define_insn "aarch64_simd_ld3" [(set (match_operand:VSTRUCT_3Q 0 "register_operand" "=w") (unspec:VSTRUCT_3Q [ - (match_operand:VSTRUCT_3Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3Q 1 "memory_operand" "Utv")] UNSPEC_LD3))] "TARGET_SIMD" "ld3\\t{%S0. - %U0.}, %1" @@ -6878,7 +6878,7 @@ (define_insn "aarch64_simd_ld3" (define_insn "aarch64_simd_ld3r" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD3_DUP))] "TARGET_SIMD" "ld3r\\t{%S0. - %U0.}, %1" @@ -6888,7 +6888,7 @@ (define_insn "aarch64_simd_ld3r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_3QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD3_LANE))] @@ -6904,7 +6904,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_3Q 0 "register_operand") (unspec:VSTRUCT_3Q [ - (match_operand:VSTRUCT_3Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_3Q 1 "memory_operand")] UNSPEC_LD3))] "TARGET_SIMD" { @@ -6922,7 +6922,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st3" - [(set (match_operand:VSTRUCT_3Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3Q [(match_operand:VSTRUCT_3Q 1 "register_operand" "w")] UNSPEC_ST3))] "TARGET_SIMD" @@ -6932,7 +6932,7 @@ (define_insn "aarch64_simd_st3" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_3QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST3_LANE))] @@ -6946,7 +6946,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_3Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_3Q 0 "memory_operand") (unspec:VSTRUCT_3Q [ (match_operand:VSTRUCT_3Q 1 "register_operand")] UNSPEC_ST3))] @@ -6968,7 +6968,7 @@ (define_expand "vec_store_lanes" (define_insn "aarch64_simd_ld4" [(set (match_operand:VSTRUCT_4Q 0 "register_operand" "=w") (unspec:VSTRUCT_4Q [ - (match_operand:VSTRUCT_4Q 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4Q 1 "memory_operand" "Utv")] UNSPEC_LD4))] "TARGET_SIMD" "ld4\\t{%S0. - %V0.}, %1" @@ -6978,7 +6978,7 @@ (define_insn "aarch64_simd_ld4" (define_insn "aarch64_simd_ld4r" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:BLK 1 "memory_operand" "Utv")] UNSPEC_LD4_DUP))] "TARGET_SIMD" "ld4r\\t{%S0. - %V0.}, %1" @@ -6988,7 +6988,7 @@ (define_insn "aarch64_simd_ld4r" (define_insn "aarch64_vec_load_lanes_lane" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD [ - (match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv") + (match_operand:BLK 1 "memory_operand" "Utv") (match_operand:VSTRUCT_4QD 2 "register_operand" "0") (match_operand:SI 3 "immediate_operand" "i")] UNSPEC_LD4_LANE))] @@ -7004,7 +7004,7 @@ (define_insn "aarch64_vec_load_lanes_lane" (define_expand "vec_load_lanes" [(set (match_operand:VSTRUCT_4Q 0 "register_operand") (unspec:VSTRUCT_4Q [ - (match_operand:VSTRUCT_4Q 1 "aarch64_simd_struct_operand")] + (match_operand:VSTRUCT_4Q 1 "memory_operand")] UNSPEC_LD4))] "TARGET_SIMD" { @@ -7022,7 +7022,7 @@ (define_expand "vec_load_lanes" }) (define_insn "aarch64_simd_st4" - [(set (match_operand:VSTRUCT_4Q 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4Q 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4Q [ (match_operand:VSTRUCT_4Q 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7033,7 +7033,7 @@ (define_insn "aarch64_simd_st4" ;; RTL uses GCC vector extension indices, so flip only for assembly. (define_insn "aarch64_vec_store_lanes_lane" - [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:BLK 0 "memory_operand" "=Utv") (unspec:BLK [(match_operand:VSTRUCT_4QD 1 "register_operand" "w") (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_ST4_LANE))] @@ -7047,7 +7047,7 @@ (define_insn "aarch64_vec_store_lanes_lane" ) (define_expand "vec_store_lanes" - [(set (match_operand:VSTRUCT_4Q 0 "aarch64_simd_struct_operand") + [(set (match_operand:VSTRUCT_4Q 0 "memory_operand") (unspec:VSTRUCT_4Q [(match_operand:VSTRUCT_4Q 1 "register_operand")] UNSPEC_ST4))] "TARGET_SIMD" @@ -7138,7 +7138,7 @@ (define_expand "aarch64_ld1x3" (define_insn "aarch64_ld1_x3_" [(set (match_operand:VSTRUCT_3QD 0 "register_operand" "=w") (unspec:VSTRUCT_3QD - [(match_operand:VSTRUCT_3QD 1 "aarch64_simd_struct_operand" "Utv")] + [(match_operand:VSTRUCT_3QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %U0.}, %1" @@ -7158,7 +7158,7 @@ (define_expand "aarch64_ld1x4" (define_insn "aarch64_ld1_x4_" [(set (match_operand:VSTRUCT_4QD 0 "register_operand" "=w") (unspec:VSTRUCT_4QD - [(match_operand:VSTRUCT_4QD 1 "aarch64_simd_struct_operand" "Utv")] + [(match_operand:VSTRUCT_4QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %V0.}, %1" @@ -7176,7 +7176,7 @@ (define_expand "aarch64_st1x2" }) (define_insn "aarch64_st1_x2_" - [(set (match_operand:VSTRUCT_2QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2QD [(match_operand:VSTRUCT_2QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7196,7 +7196,7 @@ (define_expand "aarch64_st1x3" }) (define_insn "aarch64_st1_x3_" - [(set (match_operand:VSTRUCT_3QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3QD [(match_operand:VSTRUCT_3QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7216,7 +7216,7 @@ (define_expand "aarch64_st1x4" }) (define_insn "aarch64_st1_x4_" - [(set (match_operand:VSTRUCT_4QD 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4QD 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4QD [(match_operand:VSTRUCT_4QD 1 "register_operand" "w")] UNSPEC_ST1))] @@ -7268,7 +7268,7 @@ (define_insn "*aarch64_movv8di" (define_insn "aarch64_be_ld1" [(set (match_operand:VALLDI_F16 0 "register_operand" "=w") (unspec:VALLDI_F16 [(match_operand:VALLDI_F16 1 - "aarch64_simd_struct_operand" "Utv")] + "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%0}, %1" @@ -7276,7 +7276,7 @@ (define_insn "aarch64_be_ld1" ) (define_insn "aarch64_be_st1" - [(set (match_operand:VALLDI_F16 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VALLDI_F16 0 "memory_operand" "=Utv") (unspec:VALLDI_F16 [(match_operand:VALLDI_F16 1 "register_operand" "w")] UNSPEC_ST1))] "TARGET_SIMD" @@ -7551,7 +7551,7 @@ (define_expand "aarch64_ldr" (define_insn "aarch64_ld2_dreg" [(set (match_operand:VSTRUCT_2DNX 0 "register_operand" "=w") (unspec:VSTRUCT_2DNX [ - (match_operand:VSTRUCT_2DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2DNX 1 "memory_operand" "Utv")] UNSPEC_LD2_DREG))] "TARGET_SIMD" "ld2\\t{%S0. - %T0.}, %1" @@ -7561,7 +7561,7 @@ (define_insn "aarch64_ld2_dreg" (define_insn "aarch64_ld2_dreg" [(set (match_operand:VSTRUCT_2DX 0 "register_operand" "=w") (unspec:VSTRUCT_2DX [ - (match_operand:VSTRUCT_2DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2DX 1 "memory_operand" "Utv")] UNSPEC_LD2_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %T0.1d}, %1" @@ -7571,7 +7571,7 @@ (define_insn "aarch64_ld2_dreg" (define_insn "aarch64_ld3_dreg" [(set (match_operand:VSTRUCT_3DNX 0 "register_operand" "=w") (unspec:VSTRUCT_3DNX [ - (match_operand:VSTRUCT_3DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3DNX 1 "memory_operand" "Utv")] UNSPEC_LD3_DREG))] "TARGET_SIMD" "ld3\\t{%S0. - %U0.}, %1" @@ -7581,7 +7581,7 @@ (define_insn "aarch64_ld3_dreg" (define_insn "aarch64_ld3_dreg" [(set (match_operand:VSTRUCT_3DX 0 "register_operand" "=w") (unspec:VSTRUCT_3DX [ - (match_operand:VSTRUCT_3DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_3DX 1 "memory_operand" "Utv")] UNSPEC_LD3_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %U0.1d}, %1" @@ -7591,7 +7591,7 @@ (define_insn "aarch64_ld3_dreg" (define_insn "aarch64_ld4_dreg" [(set (match_operand:VSTRUCT_4DNX 0 "register_operand" "=w") (unspec:VSTRUCT_4DNX [ - (match_operand:VSTRUCT_4DNX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4DNX 1 "memory_operand" "Utv")] UNSPEC_LD4_DREG))] "TARGET_SIMD" "ld4\\t{%S0. - %V0.}, %1" @@ -7601,7 +7601,7 @@ (define_insn "aarch64_ld4_dreg" (define_insn "aarch64_ld4_dreg" [(set (match_operand:VSTRUCT_4DX 0 "register_operand" "=w") (unspec:VSTRUCT_4DX [ - (match_operand:VSTRUCT_4DX 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_4DX 1 "memory_operand" "Utv")] UNSPEC_LD4_DREG))] "TARGET_SIMD" "ld1\\t{%S0.1d - %V0.1d}, %1" @@ -7841,7 +7841,7 @@ (define_insn "aarch64_rev" ) (define_insn "aarch64_st2_dreg" - [(set (match_operand:VSTRUCT_2DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2DNX [ (match_operand:VSTRUCT_2DNX 1 "register_operand" "w")] UNSPEC_ST2))] @@ -7851,7 +7851,7 @@ (define_insn "aarch64_st2_dreg" ) (define_insn "aarch64_st2_dreg" - [(set (match_operand:VSTRUCT_2DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_2DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_2DX [ (match_operand:VSTRUCT_2DX 1 "register_operand" "w")] UNSPEC_ST2))] @@ -7861,7 +7861,7 @@ (define_insn "aarch64_st2_dreg" ) (define_insn "aarch64_st3_dreg" - [(set (match_operand:VSTRUCT_3DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3DNX [ (match_operand:VSTRUCT_3DNX 1 "register_operand" "w")] UNSPEC_ST3))] @@ -7871,7 +7871,7 @@ (define_insn "aarch64_st3_dreg" ) (define_insn "aarch64_st3_dreg" - [(set (match_operand:VSTRUCT_3DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_3DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_3DX [ (match_operand:VSTRUCT_3DX 1 "register_operand" "w")] UNSPEC_ST3))] @@ -7881,7 +7881,7 @@ (define_insn "aarch64_st3_dreg" ) (define_insn "aarch64_st4_dreg" - [(set (match_operand:VSTRUCT_4DNX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4DNX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4DNX [ (match_operand:VSTRUCT_4DNX 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7891,7 +7891,7 @@ (define_insn "aarch64_st4_dreg" ) (define_insn "aarch64_st4_dreg" - [(set (match_operand:VSTRUCT_4DX 0 "aarch64_simd_struct_operand" "=Utv") + [(set (match_operand:VSTRUCT_4DX 0 "memory_operand" "=Utv") (unspec:VSTRUCT_4DX [ (match_operand:VSTRUCT_4DX 1 "register_operand" "w")] UNSPEC_ST4))] @@ -7974,7 +7974,7 @@ (define_expand "vec_init" (define_insn "*aarch64_simd_ld1r" [(set (match_operand:VALL_F16 0 "register_operand" "=w") (vec_duplicate:VALL_F16 - (match_operand: 1 "aarch64_simd_struct_operand" "Utv")))] + (match_operand: 1 "memory_operand" "Utv")))] "TARGET_SIMD" "ld1r\\t{%0.}, %1" [(set_attr "type" "neon_load1_all_lanes")] @@ -7983,7 +7983,7 @@ (define_insn "*aarch64_simd_ld1r" (define_insn "aarch64_simd_ld1_x2" [(set (match_operand:VSTRUCT_2QD 0 "register_operand" "=w") (unspec:VSTRUCT_2QD [ - (match_operand:VSTRUCT_2QD 1 "aarch64_simd_struct_operand" "Utv")] + (match_operand:VSTRUCT_2QD 1 "memory_operand" "Utv")] UNSPEC_LD1))] "TARGET_SIMD" "ld1\\t{%S0. - %T0.}, %1" diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index c308015ac2c13d24cd6bcec71247ec45df8cf5e6..6b70a364530c8108457091bfec12fe549f722149 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -494,10 +494,6 @@ (define_predicate "aarch64_simd_reg_or_minus_one" (ior (match_operand 0 "register_operand") (match_operand 0 "aarch64_simd_imm_minus_one"))) -(define_predicate "aarch64_simd_struct_operand" - (and (match_code "mem") - (match_test "TARGET_SIMD && aarch64_simd_mem_operand_p (op)"))) - ;; Like general_operand but allow only valid SIMD addressing modes. (define_predicate "aarch64_simd_general_operand" (and (match_operand 0 "general_operand") diff --git a/gcc/testsuite/gcc.target/aarch64/vld1r.c b/gcc/testsuite/gcc.target/aarch64/vld1r.c new file mode 100644 index 0000000000000000000000000000000000000000..72c505c403e9e239771379b7cadd8a9473f06113 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vld1r.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O" } */ +/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ + +#include + +/* +** f1: +** add x0, x0, 1 +** ld1r {v0.8b}, \[x0\] +** ret +*/ +uint8x8_t f1(const uint8_t *in) { + return vld1_dup_u8(&in[1]); +} + +/* +** f2: +** ldr s1, \[x0, 4\] +** fmla v0.4s, v0.4s, v1.s\[0\] +** ret +*/ +float32x4_t f2(const float32_t *in, float32x4_t a) { + float32x4_t dup = vld1q_dup_f32(&in[1]); + return vfmaq_laneq_f32 (a, a, dup, 1); +}