From patchwork Mon Sep 16 09:38:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1986062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=g6ou0LCi; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=g6ou0LCi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X6fyM28sZz1y1C for ; Mon, 16 Sep 2024 19:39:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82F98385B50C for ; Mon, 16 Sep 2024 09:39:37 +0000 (GMT) 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-am6eur05on20624.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::624]) by sourceware.org (Postfix) with ESMTPS id 5696C3858C32 for ; Mon, 16 Sep 2024 09:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5696C3858C32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5696C3858C32 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::624 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726479539; cv=pass; b=xiOZITaja6YtVp7PpnMapiQHMsNyTpLZ22sV10tEluUrutJBUEJIQd9JbQIso9c5uGDRF4nylGLwXZ/wmD5kuX8FbPHl+8e1RzziceTSEX7+gN8uOC5JCYNW0Am4BPVMQGddCihydskAUO+4KQy7PAKH32L2/ZABLQPgfr/qbM4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726479539; c=relaxed/simple; bh=aIrgidziA2dr4a1f7qCEslV0pCXgGnnSL14/x+GLC0k=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=Y0dpegMbT0qcraZIhVjdC5OsGe+6ym8eAcJyEQXvkTQYzzSkOan0D+fut7h/7x/Z91W49Ks8L88DTZb41WTjkecB/Y2RErFj9ezsHWBAGw8EX/qNwatC5UGnOcPhe0cyjY6x4U8n9xtoAl8s1spBYhOpHpjogknTCnfDOWEfLLI= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=wTZw55kI7DK6mKGLl0Y6/tjiEvcRVHClkUbKwcgj3RJgDjpEnW8YFzzAcyFg0yeonTFXkMYawOSG+4mt/XGMjpylzNZraWznQvDc8fEBE+gaPEvVs5Q7SLyedUdQ2Vwdw1sOdh2Iy93iESDOaJc7JHd9mJYWLfMs1OCB9KPXFUI1V9ywEVlURqUDiybl8ekF2ZdJCiSffZwcF1xeshus/dICZjqwN4s5E2slmainNTRqYrjB8hHO8ByZVCvzSyqM2seo3/1yUExRhXRoNk2DCM5QCPWxCjg6r5rrbmmxU/oZT6sdd5vS4ZBo0vucx1GNtWsgjhgAzwv018jAlWM3ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IIvzou7dlyvdb092YjDdiZoZcGY5UGZ/jDxxn/tAkYc=; b=Zi4U/ZOsksjH+HNH8SH4G+zyU6OWMPe5ruam/+IZ60QQOOcampuD5Roajgsa0iAnLxlC4ofPzbN3Im6pIJezdeaRbqhQNM7JZDGYVWX000YsQbWQzkeq8C9J6cONHDeo6ASCTEsnLnir6/wFcK8RxSkDkoGOD+KHMHCChMjSM4g409hekPPlioJPtQeCqAhTSfLKYPWT836y4KK7xC1lO/84WCPkXGCooyOKmXl8geEbQpzQ9NgnEEExIGdy0OsZEI9FrUXk8SiJWWSG95DXhLwQwg1b2ZZIhhrUGERTbRGkfHp9SqfJ0BIFLI6qy+rQskBiK3gKCioniMOgWqoPkQ== 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=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IIvzou7dlyvdb092YjDdiZoZcGY5UGZ/jDxxn/tAkYc=; b=g6ou0LCim9MNc/GW6P1lQbdVePoDzh0yR0WY0x9tl+nkK1nH9g29MtdyIKW301JDj2Ft37buOxndFDuv0Djjd5LN1y+Tm6Rw928mA3133FBm5s0EdybMGLx23kRcDbftcWuJxWX2xYCQBoXHOZKK9Qj3uss6w6xF2VOp1x9c3eM= Received: from DUZPR01CA0107.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::25) by AS8PR08MB9018.eurprd08.prod.outlook.com (2603:10a6:20b:5b0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.14; Mon, 16 Sep 2024 09:38:48 +0000 Received: from DB1PEPF000509EF.eurprd03.prod.outlook.com (2603:10a6:10:4bb:cafe::2c) by DUZPR01CA0107.outlook.office365.com (2603:10a6:10:4bb::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Mon, 16 Sep 2024 09:38:48 +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=arm.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 DB1PEPF000509EF.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Mon, 16 Sep 2024 09:38:48 +0000 Received: ("Tessian outbound e4724f7f9992:v441"); Mon, 16 Sep 2024 09:38:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: acc3990ef296f34d X-CR-MTA-TID: 64aa7808 Received: from Lb54627e62930.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D6A2510D-9D4A-47A8-B36B-D0D726CEC022.1; Mon, 16 Sep 2024 09:38:40 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb54627e62930.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 16 Sep 2024 09:38:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bXzIK64Kysat9QgZ7r/spTM3SSp1u9KxkrIgrybV3IWuHUPc5lpkWHVGfToC7+3tCR6qvm1TGCLN1I4Oba6HqhFaiGUhiPuQuYmkNSad+by2UT/qC6+BCFKZ3fJz18jmkiQ0FKDyWWmL45xe1oFsADImrymJBd7nRVYTNgCxdmgxggYryWllVxXUdnSEb5q0kSmZkUMBQml2T3peuUu0vVyTP7n2ddZLCSzDf4nSCYpgJeFURnStyC2oIu3Mgb7aJtiPw7+c5GPsOqFPAqYtcM/xBHYyacaR49KGQV6JXHflqpOohpSsjtbxPLMjS1TKCfDSvDJeVUHEdHqMR8fpyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IIvzou7dlyvdb092YjDdiZoZcGY5UGZ/jDxxn/tAkYc=; b=cJ8KmHP0LZbKkn1vg41Pq1PskdkFs7HY6v+vTWIu/pQEOQE2kyHuicmET4fFwVkNPwGbxSOaanNe5yNVlc3qIepSWsc4lf1vslT1O+FeJPZvoeBhQXJcjN+z6nwNnegnJyIbQV5ZFIV4xKfoCVc2WueHYRkG2MEWQYIimjsStiamahr7FBfeop5q00c3hKXILRl/+T29L9LUJ5u+f6sF6ZxmK9nIYqRxIKFfzFh2ZCM7q1iB8/MxUv9rao3MRzIzJbNxHivr2+52I6Qc94Y3/i//hKz+vyyZTAlKGwEtjU2yMMYFAXdEocs9I0DhKhIRhUamfaWnKzI/11Npb7w7gw== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IIvzou7dlyvdb092YjDdiZoZcGY5UGZ/jDxxn/tAkYc=; b=g6ou0LCim9MNc/GW6P1lQbdVePoDzh0yR0WY0x9tl+nkK1nH9g29MtdyIKW301JDj2Ft37buOxndFDuv0Djjd5LN1y+Tm6Rw928mA3133FBm5s0EdybMGLx23kRcDbftcWuJxWX2xYCQBoXHOZKK9Qj3uss6w6xF2VOp1x9c3eM= Received: from AS9PR04CA0084.eurprd04.prod.outlook.com (2603:10a6:20b:48b::26) by DBAPR08MB5735.eurprd08.prod.outlook.com (2603:10a6:10:1a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Mon, 16 Sep 2024 09:38:33 +0000 Received: from AMS0EPF0000019F.eurprd05.prod.outlook.com (2603:10a6:20b:48b:cafe::3e) by AS9PR04CA0084.outlook.office365.com (2603:10a6:20b:48b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Mon, 16 Sep 2024 09:38:32 +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 AMS0EPF0000019F.mail.protection.outlook.com (10.167.16.251) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Mon, 16 Sep 2024 09:38:32 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.39; Mon, 16 Sep 2024 09:38:31 +0000 Received: from e129018.arm.com (10.57.52.20) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 16 Sep 2024 09:38:30 +0000 From: Christophe Lyon To: , , CC: Alfie Richards Subject: [PATCH 3/5] arm: [MVE intrinsics] Add load_extending and store_truncating function bases Date: Mon, 16 Sep 2024 11:38:17 +0200 Message-ID: <20240916093819.12740-4-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240916093819.12740-1-christophe.lyon@arm.com> References: <20240916093819.12740-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF0000019F:EE_|DBAPR08MB5735:EE_|DB1PEPF000509EF:EE_|AS8PR08MB9018:EE_ X-MS-Office365-Filtering-Correlation-Id: 533716c9-0238-459f-c2c5-08dcd6335dc4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info-Original: VXtW+AuPXtMiirRuNHdJuQLI72CssELzb127NRlQSg0L4kYNbjnYTkmQLkL/OOf8Waq/+s8th5NaoAc3Lgog4QMOfLsWyI+MezHoQawO3C/eYvkDm52au66ct5wzT38NSxgZGzSLS95V1+pe8Xn8tvTjYwLGVt22tZ0tIvG6bDb1hyGLS5tvRA/CnZsGARsCMETnafmPNukZLqpdReUtkeLAYcBDRMMqPj4zPupy41UjExaCoIA23AIV/yB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zrOJcRy4BNG/U/RA6kYiSyUC1Uv9qMEAMOlClTBdgoEV0OzpNr6HA71BTIlITVb9HO54RdFoIDtTi4KtbfFLGCCor7QxHdfEMz44xwXGJL1xBdD2M5yaJal2UVkD27LKDPmJItXxQLr84168n5K3H 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:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5735 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:48b::26]; domain=AS9PR04CA0084.eurprd04.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509EF.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cd58e1f5-6e16-4e00-9712-08dcd633546c X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|35042699022|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: /Jhn/aBC0LBokDMv97R3/eEEnA/+DzbIARoJzAKuS55xN1XH6C67b6oPAmMXXvMx1RZENa6nzMWRj7PSx9M3/E91ZGMdbBjn6PD5Adhl/+VkOi84nbkgoOKX908PG8TLTmb6AvUpvTDXSOKOUJ+GTvyXaSD7WAGuDx9Jk+fYXWn1WHXINp26ZuQ+zWTJPFqKkUXTegXgQ6qm9rZW1PHsE8i7BWYv3yXZhAHaFXtrmTjYITrsEGgja4X07U2SsMSn939XhUBvBS1X9p/tl+grXZDitveM5nKbDiY77b+QHsIjMWyYRaORHqCUziGXhiSxJqkG0IffWU0DAhcJJxeVilOPpTvesY+tH8bn9/6TCLbuMNf7QRPwmmrWyA9ou304xZtFrEnqAVGVunlmvpyaytksSroV+Evkf6RdFW/jv/MwpBkIKrFhbVTiFJOxs0mmh40gzkyelq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M; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(82310400026)(35042699022)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2024 09:38:48.4151 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 533716c9-0238-459f-c2c5-08dcd6335dc4 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: DB1PEPF000509EF.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9018 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Alfie Richards This patch adds the load_extending and store_truncating function bases for MVE intrinsics. The constructors have parameters describing the memory element type/width which is part of the function base name (e.g. "h" in vldrhq). 2024-09-11 Alfie Richards gcc/ * config/arm/arm-mve-builtins-functions.h (load_extending): New class. (store_truncating): New class. * config/arm/arm-protos.h (arm_mve_data_mode): New helper function. * config/arm/arm.cc (arm_mve_data_mode): New helper function. --- gcc/config/arm/arm-mve-builtins-functions.h | 106 ++++++++++++++++++++ gcc/config/arm/arm-protos.h | 3 + gcc/config/arm/arm.cc | 15 +++ 3 files changed, 124 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-functions.h b/gcc/config/arm/arm-mve-builtins-functions.h index ac2a731bff4..e47bc69936e 100644 --- a/gcc/config/arm/arm-mve-builtins-functions.h +++ b/gcc/config/arm/arm-mve-builtins-functions.h @@ -20,6 +20,8 @@ #ifndef GCC_ARM_MVE_BUILTINS_FUNCTIONS_H #define GCC_ARM_MVE_BUILTINS_FUNCTIONS_H +#include "arm-protos.h" + namespace arm_mve { /* Wrap T, which is derived from function_base, and indicate that the @@ -1024,6 +1026,110 @@ public: } }; +/* A function_base that loads elements from memory and extends them + to a wider element. The memory element type is a fixed part of + the function base name. */ +class load_extending : public function_base +{ +public: + CONSTEXPR load_extending (type_suffix_index signed_memory_type, + type_suffix_index unsigned_memory_type, + type_suffix_index float_memory_type) + : m_signed_memory_type (signed_memory_type), + m_unsigned_memory_type (unsigned_memory_type), + m_float_memory_type (float_memory_type) + {} + CONSTEXPR load_extending (type_suffix_index signed_memory_type, + type_suffix_index unsigned_memory_type) + : m_signed_memory_type (signed_memory_type), + m_unsigned_memory_type (unsigned_memory_type), + m_float_memory_type (NUM_TYPE_SUFFIXES) + {} + + unsigned int call_properties (const function_instance &) const override + { + return CP_READ_MEMORY; + } + + tree memory_scalar_type (const function_instance &fi) const override + { + type_suffix_index memory_type_suffix + = (fi.type_suffix (0).integer_p + ? (fi.type_suffix (0).unsigned_p + ? m_unsigned_memory_type + : m_signed_memory_type) + : m_float_memory_type); + return scalar_types[type_suffixes[memory_type_suffix].vector_type]; + } + + machine_mode memory_vector_mode (const function_instance &fi) const override + { + type_suffix_index memory_type_suffix + = (fi.type_suffix (0).integer_p + ? (fi.type_suffix (0).unsigned_p + ? m_unsigned_memory_type + : m_signed_memory_type) + : m_float_memory_type); + machine_mode mem_mode = type_suffixes[memory_type_suffix].vector_mode; + machine_mode reg_mode = fi.vector_mode (0); + + return arm_mve_data_mode (GET_MODE_INNER (mem_mode), + GET_MODE_NUNITS (reg_mode)) + .require (); + } + + /* The type of the memory elements. This is part of the function base + name rather than a true type suffix. */ + type_suffix_index m_signed_memory_type; + type_suffix_index m_unsigned_memory_type; + type_suffix_index m_float_memory_type; +}; + +/* A function_base that truncates vector elements and stores them to memory. + The memory element width is a fixed part of the function base name. */ +class store_truncating : public function_base +{ +public: + CONSTEXPR store_truncating (scalar_mode to_int_mode, + opt_scalar_mode to_float_mode) + : m_to_int_mode (to_int_mode), m_to_float_mode (to_float_mode) + {} + + unsigned int call_properties (const function_instance &) const override + { + return CP_WRITE_MEMORY; + } + + tree memory_scalar_type (const function_instance &fi) const override + { + /* In truncating stores, the signedness of the memory element is defined + to be the same as the signedness of the vector element. The signedness + doesn't make any difference to the behavior of the function. */ + type_class_index tclass = fi.type_suffix (0).tclass; + unsigned int element_bits = GET_MODE_BITSIZE ( + (fi.type_suffix (0).integer_p + ? m_to_int_mode + : m_to_float_mode.require ())); + type_suffix_index suffix = find_type_suffix (tclass, element_bits); + return scalar_types[type_suffixes[suffix].vector_type]; + } + + machine_mode memory_vector_mode (const function_instance &fi) const override + { + poly_uint64 nunits = GET_MODE_NUNITS (fi.vector_mode (0)); + return arm_mve_data_mode ( + (fi.type_suffix (0).integer_p + ? m_to_int_mode + : m_to_float_mode.require ()), + nunits) + .require (); + } + + /* The mode of a single memory element. */ + scalar_mode m_to_int_mode; + opt_scalar_mode m_to_float_mode; +}; + } /* end namespace arm_mve */ /* Declare the global function base NAME, creating it from an instance diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 50cae2b513a..2327f2cfe4e 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -615,4 +615,7 @@ void arm_initialize_isa (sbitmap, const enum isa_feature *); const char * arm_gen_far_branch (rtx *, int, const char * , const char *); bool arm_mve_immediate_check(rtx, machine_mode, bool); + +opt_machine_mode arm_mve_data_mode (scalar_mode, poly_uint64); + #endif /* ! GCC_ARM_PROTOS_H */ diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index de34e9867e6..41c4a525613 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -76,6 +76,7 @@ #include "opts.h" #include "aarch-common.h" #include "aarch-common-protos.h" +#include "machmode.h" /* This file should be included last. */ #include "target-def.h" @@ -36104,4 +36105,18 @@ arm_output_load_tpidr (rtx dst, bool pred_p) return ""; } +/* Return the MVE vector mode that has NUNITS elements of mode INNER_MODE. */ +opt_machine_mode +arm_mve_data_mode (scalar_mode inner_mode, poly_uint64 nunits) +{ + enum mode_class mclass + = (SCALAR_FLOAT_MODE_P (inner_mode) ? MODE_VECTOR_FLOAT : MODE_VECTOR_INT); + machine_mode mode; + FOR_EACH_MODE_IN_CLASS (mode, mclass) + if (inner_mode == GET_MODE_INNER (mode) + && known_eq (nunits, GET_MODE_NUNITS (mode))) + return mode; + return opt_machine_mode (); +} + #include "gt-arm.h"