From patchwork Mon Feb 3 13:04:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alfie Richards X-Patchwork-Id: 105918 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 50A233858408 for ; Mon, 3 Feb 2025 13:14:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50A233858408 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=T9F7c2YB; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=T9F7c2YB 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-am6eur05on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::62f]) by sourceware.org (Postfix) with ESMTPS id EF6DB385828B for ; Mon, 3 Feb 2025 13:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF6DB385828B 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 EF6DB385828B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::62f ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587916; cv=pass; b=Apd+nQRxWzDO6gMpaS+XfHC7Xo+5gFC3tu+JpA3G7PB6jt07HAjYHN2jaK/3ymawHJRjTyOpBg1033L6Td3Rf7+4ph+5DRe+xBIz4L9rP32b7iNjlaMkXkWxs+kpXZv2wq8IYzX7XxjRSyiko/Uqhsu2Sa3WnbrxoL9Txhba0z4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587916; c=relaxed/simple; bh=Uq0G11bnwB2SOizB5LkuF/kzKe3J3wXgvZ61BtSPmEg=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=fje49rlcOe5oJ7pMgKayLMvjGxkIdeNBIfClViI2Go3UxoW830vA3yfmgRQOLJIdhF1OLxaofkmWODvCljfWN1e19bh/g7Xa3vfVJK+ztd4LtE429gVXj7M+w0BO0neY/0A0V6rjWe4QeBQ8cJWCRBUZI6UA1Vbxcngqv+UhJ1E= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=vj6kqcYi3LKdpSuGw8sdFDh7P2owZr77SC2Xczuet636uSe8h8DosdC1gDDq37AgHDmggWnp69yIbtXjmnoSsQyst1KrRoPHWRic/5EHELA0N9J9ROyE0asPA2uMuqhGK8dii6tto/bC3mjnbwls2a/j6M/v8Ie4PyTCZJFX3nZhl8nK5O9K9JKDud2fh2sNuIxiBLp1M3KslJT6cH131lV61qOtMVN2Ne3AU3CxULbNa/mI/hZPC1DNXfKKfC1CFORbperfEep0KskpuwKKV41dHQdNqjym1FI3M/Pv6ydHcVnGxA779ehzuPfiMTWIcovr1ZHSlxei0rSR/zkyPA== 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=3K/EfSYBBr1GUChEWfI7YmYyM8ynjpUxX+MYcaaJKNU=; b=aLC2kNsxu2QhM6ParqkUi4/XwYAM2UvGXmRspDMg50zEvpEbhueB65K92SEppZwprI7duOPR4oLUJAtRstdj/qI6x33rziBgj/SFUUb3rcV3SCFPAc3uFj4vKT4Yv81n+4KL8pSeOeEPklHJ0U8HBNBYLetvkx5C/Z36jZhaCJlVfwT5iY01q807OCMIvQT+E8fY9eSLjiHlEHND8LyHQry1dmuAqpbn2ZFwNfJMKg807HB+N2X4kvUg2jKKLb0v5r0yLRpnimdURqQAAwEaYCTxnBAHmHun3bboKhkhsAlBN8u/vHResuwCI0emLSsPr0qZihevqEJlOjNCCQcE8g== 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=0 ltdi=1) 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=3K/EfSYBBr1GUChEWfI7YmYyM8ynjpUxX+MYcaaJKNU=; b=T9F7c2YB+mBsQ/kKsGrRyTs++dp9eGiAoZmWq+FgqmSGzmUprm1e8OdGQix8+b3rMCOERl2oqCQXkjWHXSGIB70CKBh2MxiT0aZE218rhzRjQ0d6dfS7KiSIZHn1JyZ1J6viu3I7RN05TSSvnKaFk4PRnEFuUjvbYKNGkCeDJTY= Received: from PA7P264CA0256.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:375::10) by GV2PR08MB8656.eurprd08.prod.outlook.com (2603:10a6:150:b2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.24; Mon, 3 Feb 2025 13:05:05 +0000 Received: from AM4PEPF00027A5D.eurprd04.prod.outlook.com (2603:10a6:102:375:cafe::c7) by PA7P264CA0256.outlook.office365.com (2603:10a6:102:375::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.24 via Frontend Transport; Mon, 3 Feb 2025 13:05:05 +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 AM4PEPF00027A5D.mail.protection.outlook.com (10.167.16.69) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.14 via Frontend Transport; Mon, 3 Feb 2025 13:05:05 +0000 Received: ("Tessian outbound ca1ab514ff10:v560"); Mon, 03 Feb 2025 13:05:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c800d2bf86c0d6ce X-TessianGatewayMetadata: i6ZxDSUIeNIZ4FfExT+blYHk39aSTuYPSUH/05ghuqkGF4W2aQGy8GhFT8pmnehI4Y2pQ12Buf8z6tqQqFwkY1GfXfXvODvxyvB1JHl135ny10pG5efI8DfcaBL4ptXONBG7MzCneq5HEXQ+DdGefj7j34ruMEHgbP/QUaZ62aY= X-CR-MTA-TID: 64aa7808 Received: from Le387ab55eda7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9C34CC1C-66B5-4D1E-9E54-BBDC1372229D.1; Mon, 03 Feb 2025 13:04:57 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Le387ab55eda7.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 03 Feb 2025 13:04:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RfB5xbhGwgmg0hC4JmE2l6U9CyybXjqryopZIkDbYVy8lsM2H3XEgjDUKr3HojhE/5cfPGzm1Hgu2jkDs1rBimIvavtZx0H4QFCYdI/VGovQdCtxd4VWimbYRD1jsIv/CUhmtrpaff+UZwnhUhaJAp3fO8eiKNrgjmk/Dn7QT2jHhEatvbNfsjziy1VLYumntApZkleQoOFm5by3/tlVw2hYsvR9+KXAzTOSD7ytoX1C/wjKbJSQzBV/MuVejuN65gRHW/yDU89u5RHkGw6LLOOVpMQxZ2qrFSnw6BYFuXuHVlrtBreqW62JOeNqRIOGl9+ScJ6ccaByZzuYQ8RWTg== 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=3K/EfSYBBr1GUChEWfI7YmYyM8ynjpUxX+MYcaaJKNU=; b=j0aSOzhmxWkMyI2Tz5XhwUQFkVDzQFD3W+ZfEao4MqH4ObLENzxSUm3Ql9CwGSP7uAZlcai5kPafBDT+0JZBUtmkxyBxE0CMBdMAEEi5+bioHDN0ElF3vuu07RoLPiaYJ/98dWrYKRHxkloiGz7rw4A9E6Gser6pVUA7oAEhuJMClWxVFcY3orC1IfGmc6tBmmFwlFYIDlJ3ti6jh6azjTPSymQ9xa0EdXae9sdHuvmyx0CLLI2dkvB/AT+Sc6JSjZyNFRSdst3QhkXq1JClpRnjBNpPoA6bSUR2OF3oKpD6UMPL/Qz9GCgcI/ZaTKMKUbsO7cZ3MVH9zhn6Be0Akg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 172.205.89.229) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=fail (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=3K/EfSYBBr1GUChEWfI7YmYyM8ynjpUxX+MYcaaJKNU=; b=T9F7c2YB+mBsQ/kKsGrRyTs++dp9eGiAoZmWq+FgqmSGzmUprm1e8OdGQix8+b3rMCOERl2oqCQXkjWHXSGIB70CKBh2MxiT0aZE218rhzRjQ0d6dfS7KiSIZHn1JyZ1J6viu3I7RN05TSSvnKaFk4PRnEFuUjvbYKNGkCeDJTY= Received: from DU2PR04CA0302.eurprd04.prod.outlook.com (2603:10a6:10:2b5::7) by AM8PR08MB6625.eurprd08.prod.outlook.com (2603:10a6:20b:357::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.24; Mon, 3 Feb 2025 13:04:53 +0000 Received: from DU2PEPF00028D00.eurprd03.prod.outlook.com (2603:10a6:10:2b5:cafe::2a) by DU2PR04CA0302.outlook.office365.com (2603:10a6:10:2b5::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.25 via Frontend Transport; Mon, 3 Feb 2025 13:04:53 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; Received: from nebula.arm.com (172.205.89.229) by DU2PEPF00028D00.mail.protection.outlook.com (10.167.242.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Mon, 3 Feb 2025 13:04:53 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) by AZ-NEU-EX05.Arm.com (10.240.25.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 3 Feb 2025 13:04:33 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EXJ01.Arm.com (10.240.25.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 3 Feb 2025 13:04:32 +0000 Received: from ip-10-248-139-135.eu-west-1.compute.internal (10.252.78.54) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 3 Feb 2025 13:04:32 +0000 From: Alfie Richards To: CC: , , , , , , , Alfie Richards Subject: [PATCH v1 15/16] Support mixing of target_clones and target_version for aarch64. Date: Mon, 3 Feb 2025 13:04:20 +0000 Message-ID: <20250203130421.2192732-17-alfie.richards@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203130421.2192732-1-alfie.richards@arm.com> References: <20250203130421.2192732-1-alfie.richards@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF00028D00:EE_|AM8PR08MB6625:EE_|AM4PEPF00027A5D:EE_|GV2PR08MB8656:EE_ X-MS-Office365-Filtering-Correlation-Id: bccf41a3-c4af-4a75-feb6-08dd445360a1 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info-Original: Nbesd2j8qEWmQFeDmc+RmKUQJcOkOC7KTy74V5bsM3E939ZxAStEsp94We7M9mDF+bFH0uI4lK08NmZbxSWb8TbZZ9Ac/IxrL79pkGK0oB7aytOVNSDwmf9SB6mxovHtbcjHc4SCBsrwvPozuizgXtKUXpckeRPLmEaGB6Va3Rkjn3sLac1Zpsh6bQOx14666fLFkLeuyDx3+GxgIE28/9zm/yh3AlYBB6mLYpM07YoOoIctQcR+GgV+jeRVRNwIUOwr7ufjmva085Po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QXVwShXdkLvHNy82k6arK4WKWHtNY4V47GPftid86hf1Hovd5D7gzCaThjDQdxFcuLGODV8CCis3c6tYCyew8xNfYd9+59JhuqnE3ZbDH2IKJbHHVe+zY9Tn4V1L0loj6u7CO4s9PtZ6nPOgxcqifT+5djzmM= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6625 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:2b5::7]; domain=DU2PR04CA0302.eurprd04.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A5D.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 95d7d194-9abe-44e8-b6a6-08dd445359d2 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|14060799003|376014|36860700013|35042699022|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?9inBUAyThjcPWSYk7dF3lwocdb/XxGO?= =?utf-8?q?gVP5HP9xd8spy+N+R27Q5f/nIiJWS1SUFhyIe1kBn0JxvvCxQEpmE/apXY/XC1c1w?= =?utf-8?q?bLoC+vEMmuwqdomsyCOsurtjivEjeaQ2qwdotw0eBFnZ0spHp89u8GIJgozunMYeK?= =?utf-8?q?LIjwoVhDb7gF3h+5uNT8Abc1DDzFOGe1K6Zre9ox2cwt5LJrbAOQ7XxEMjwgAyTus?= =?utf-8?q?/+1VaCoFoZ2TYhNzNmCI4Cl+ZRFyMD9fQhnekDuO6dc/3KqtNYaO4YtStYDhK3uR1?= =?utf-8?q?hDd+sSXoYBuInWffHKtRa8kE/LMBn1OR6fWtAmCv3CDunmboo78CzZbcywRcr10lj?= =?utf-8?q?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= =?utf-8?q?gA9zCDTX5d0KfPy/8VDU7Ls26OUhXhNEAIA8Ee9bNtHwNb0lsD6snG5JTMwXig0tA?= =?utf-8?q?HCEcINWe805Pr5/x/KDBwHaveCdPfjcT3VDSMwVcnX8HpH1iAsEY3OuFCX8BunIKW?= =?utf-8?q?1ct9uDMf75hckvFprwXxShN8yGY0gCshZftujGPFm4jBzNehxWGtvH0ammXOs9dQC?= =?utf-8?q?rvH9/Gju1QanNmx1ZjmqKClsBjI7mtL4Ni+kjlDXyjJ6H8PHsWFDzo=3D?= 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(1800799024)(14060799003)(376014)(36860700013)(35042699022)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2025 13:05:05.0057 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bccf41a3-c4af-4a75-feb6-08dd445360a1 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: AM4PEPF00027A5D.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8656 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, PROLO_LEO1, 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~patchwork=sourceware.org@gcc.gnu.org This patch adds support for the combination of target_clones and target_version in the definition of a versioned function. This patch changes is_function_default_version to consider a function declaration annotated with target_clones containing default to be a default version. It also changes the common_function_version hook to consider two functions annotated with target_clones and/or target_versions to be common if their specified versions don't overlap. This takes advantage of refactoring done in previous patches changing how target_clones are expanded. gcc/ChangeLog: * attribs.cc (is_function_default_version): Add logic for target_clones defining the default version. * config/aarch64/aarch64.cc (aarch64_common_function_versions): Add logic for a target_clones and target_version, or two target_clones coexisting in a version set. gcc/c-family/ChangeLog: * c-attribs.cc: Add support for target_version and target_clones coexisting. gcc/testsuite/ChangeLog: * g++.target/aarch64/mv-and-mvc1.C: New test. * g++.target/aarch64/mv-and-mvc2.C: New test. * g++.target/aarch64/mv-and-mvc3.C: New test. * g++.target/aarch64/mv-and-mvc4.C: New test. --- gcc/attribs.cc | 7 +++ gcc/c-family/c-attribs.cc | 2 - gcc/config/aarch64/aarch64.cc | 46 ++++++++++++++++++- .../g++.target/aarch64/mv-and-mvc1.C | 38 +++++++++++++++ .../g++.target/aarch64/mv-and-mvc2.C | 29 ++++++++++++ .../g++.target/aarch64/mv-and-mvc3.C | 41 +++++++++++++++++ .../g++.target/aarch64/mv-and-mvc4.C | 38 +++++++++++++++ gcc/testsuite/g++.target/aarch64/mv-error1.C | 13 ++++++ gcc/testsuite/g++.target/aarch64/mv-error13.C | 13 ++++++ gcc/testsuite/g++.target/aarch64/mv-error2.C | 10 ++++ gcc/testsuite/g++.target/aarch64/mv-error3.C | 13 ++++++ gcc/testsuite/g++.target/aarch64/mv-error7.C | 9 ++++ gcc/testsuite/g++.target/aarch64/mv-error8.C | 21 +++++++++ gcc/testsuite/g++.target/aarch64/mv-error9.C | 12 +++++ 14 files changed, 289 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.target/aarch64/mv-and-mvc1.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-and-mvc2.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-and-mvc3.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-and-mvc4.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error1.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error13.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error2.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error3.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error7.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error8.C create mode 100644 gcc/testsuite/g++.target/aarch64/mv-error9.C diff --git a/gcc/attribs.cc b/gcc/attribs.cc index 687e6d4143a..f877dc4f6e3 100644 --- a/gcc/attribs.cc +++ b/gcc/attribs.cc @@ -1327,6 +1327,13 @@ is_function_default_version (const tree decl) } else { + if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl))) + { + int num_def = 0; + auto_vec versions = get_clone_versions (decl, &num_def); + return num_def > 0; + } + attr = lookup_attribute ("target_version", DECL_ATTRIBUTES (decl)); if (!attr) return true; diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index 642d724f6c6..f2cc43ad641 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -249,13 +249,11 @@ static const struct attribute_spec::exclusions attr_target_clones_exclusions[] = ATTR_EXCL ("always_inline", true, true, true), ATTR_EXCL ("target", TARGET_HAS_FMV_TARGET_ATTRIBUTE, TARGET_HAS_FMV_TARGET_ATTRIBUTE, TARGET_HAS_FMV_TARGET_ATTRIBUTE), - ATTR_EXCL ("target_version", true, true, true), ATTR_EXCL (NULL, false, false, false), }; static const struct attribute_spec::exclusions attr_target_version_exclusions[] = { - ATTR_EXCL ("target_clones", true, true, true), ATTR_EXCL (NULL, false, false, false), }; diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 420bbba9be2..f6cb7903d88 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -20671,7 +20671,51 @@ aarch64_common_function_versions (tree fn1, tree fn2) || TREE_CODE (fn2) != FUNCTION_DECL) return false; - return (aarch64_compare_version_priority (fn1, fn2) != 0); + if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (fn2))) + { + tree temp = fn1; + fn1 = fn2; + fn2 = temp; + } + + if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (fn1))) + { + auto_vec fn1_versions = get_clone_versions (fn1); + // fn1 is target_clone + if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (fn2))) + { + auto_vec fn2_versions = get_clone_versions (fn2); + for (string_slice v1 : fn1_versions) + { + aarch64_fmv_feature_mask v1_mask; + aarch64_parse_fmv_features (v1, NULL, &v1_mask, NULL); + for (string_slice v2 : fn2_versions) + { + aarch64_fmv_feature_mask v2_mask; + aarch64_parse_fmv_features (v2, NULL, &v2_mask, NULL); + if (v1_mask == v2_mask) + return false; + } + } + return true; + } + else + { + aarch64_fmv_feature_mask v2_mask = get_feature_mask_for_version (fn2); + for (string_slice v1 : fn1_versions) + { + aarch64_fmv_feature_mask v1_mask; + aarch64_parse_fmv_features (v1, NULL, &v1_mask, NULL); + if (v1_mask == v2_mask) + return false; + } + return true; + } + } + // Can assume both are target_version + else + // Both are target_version + return (aarch64_compare_version_priority (fn1, fn2) != 0); } /* Implement TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P. Use an opt-out diff --git a/gcc/testsuite/g++.target/aarch64/mv-and-mvc1.C b/gcc/testsuite/g++.target/aarch64/mv-and-mvc1.C new file mode 100644 index 00000000000..0e2e746f20e --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-and-mvc1.C @@ -0,0 +1,38 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__((target_version("default"))) +int foo () +{ + return 0; +} + +__attribute__((target_clones("dotprod", "sve+sve2"))) +int foo () +{ + return 1; +} + +__attribute__((target_clones("sme", "sme2"))) +int foo () +{ + return 2; +} + +int bar() +{ + return foo (); +} + + +/* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-and-mvc2.C b/gcc/testsuite/g++.target/aarch64/mv-and-mvc2.C new file mode 100644 index 00000000000..6929b153c47 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-and-mvc2.C @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__((target_version("default"))) +int foo (); + +__attribute__((target_clones("dotprod", "sve+sve2"))) +int foo () +{ + return 1; +} + +__attribute__((target_clones("sme", "sme2"))) +int foo () +{ + return 2; +} + +/* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov:\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 0 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-and-mvc3.C b/gcc/testsuite/g++.target/aarch64/mv-and-mvc3.C new file mode 100644 index 00000000000..b25b6214f4c --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-and-mvc3.C @@ -0,0 +1,41 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__((target_clones("dotprod", "sve+sve2"))) +int foo (); + +__attribute__((target_version("default"))) +int foo () +{ + return 0; +} + +__attribute__((target_clones("sme", "sme2"))) +int foo () +{ + return 2; +} + +int bar() +{ + return foo (); +} + + +/* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ +// { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, _Z3foov\.default\n" 1 } } +/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, _Z3foov\._Mdotprod\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, _Z3foov\._MsveMsve2\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, _Z3foov\._Msme\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, _Z3foov\._Msme2\n" 1 } } */ + diff --git a/gcc/testsuite/g++.target/aarch64/mv-and-mvc4.C b/gcc/testsuite/g++.target/aarch64/mv-and-mvc4.C new file mode 100644 index 00000000000..c122c9fe3ab --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-and-mvc4.C @@ -0,0 +1,38 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__((target_version("dotprod"))) +int foo () +{ + return 0; +} + +__attribute__((target_clones("default", "sve+sve2"))) +int foo () +{ + return 1; +} + +__attribute__((target_clones("sme", "sme2"))) +int foo () +{ + return 2; +} + +int bar() +{ + return foo (); +} + + +/* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\._Msme2:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error1.C b/gcc/testsuite/g++.target/aarch64/mv-error1.C new file mode 100644 index 00000000000..2a659c02dfc --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error1.C @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("default"))) int +foo (); + +__attribute__ ((target_version ("default"))) int +foo () { return 1; } /* { dg-message "old declaration" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo () { return 3; } /* { dg-error "ambiguating new declaration of" } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error13.C b/gcc/testsuite/g++.target/aarch64/mv-error13.C new file mode 100644 index 00000000000..0b6b38ce100 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error13.C @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("dotprod"))) int +foo (); + +int +bar () +{ + return foo (); /* { dg-error "no default version in scope" } */ +} diff --git a/gcc/testsuite/g++.target/aarch64/mv-error2.C b/gcc/testsuite/g++.target/aarch64/mv-error2.C new file mode 100644 index 00000000000..167af4ad380 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error2.C @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo () { return 3; } /* { dg-message "previously defined here" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo () { return 3; } /* { dg-error "redefinition of" } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error3.C b/gcc/testsuite/g++.target/aarch64/mv-error3.C new file mode 100644 index 00000000000..cc641488263 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error3.C @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("dotprod"))) float +foo () { return 3; } + +__attribute__ ((target_version ("default"))) float +foo () { return 3; } /* { dg-message "previously defined here" } */ + +__attribute__ ((target_version ("default"))) float +foo () { return 3; } /* { dg-error "redefinition of" } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error7.C b/gcc/testsuite/g++.target/aarch64/mv-error7.C new file mode 100644 index 00000000000..3d2c73446be --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error7.C @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("sve+sve2"))) int +foo(); + +int bar () { return foo (); } /* { dg-error "no default version in scope" } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error8.C b/gcc/testsuite/g++.target/aarch64/mv-error8.C new file mode 100644 index 00000000000..8ea26750480 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error8.C @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("sve+sve2"))) int +foo () { + return 1; +} + +__attribute__ ((target_version ("sve"))) int +foo () { + return 1; +} + +int bar () { return foo (); } /* { dg-error "no matching function for call to" } */ + +__attribute__ ((target_version ("sve+sve2"))) int +foo2(); + +int bar2 () { return foo2 (); } /* { dg-error "no default version in scope" } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-error9.C b/gcc/testsuite/g++.target/aarch64/mv-error9.C new file mode 100644 index 00000000000..c1b58edca11 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/mv-error9.C @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O0" } */ +/* { dg-additional-options "-Wno-experimental-fmv-target" } */ + +__attribute__ ((target_version ("dotprod"))) int +foo (); + +__attribute__ ((target_version ("sve+sve2"))) int +foo (); + +int bar () { return foo (); } /* { dg-error "no matching function for call to" } */