From patchwork Tue Nov 5 00:17:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Do Nascimento X-Patchwork-Id: 2006585 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=Eyz35lqv; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Eyz35lqv; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Xj88r3T5Wz1xxb for ; Tue, 5 Nov 2024 11:19:20 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03A2B3857820 for ; Tue, 5 Nov 2024 00:19:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2061a.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::61a]) by sourceware.org (Postfix) with ESMTPS id 5F41D385840B for ; Tue, 5 Nov 2024 00:17:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F41D385840B 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 5F41D385840B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::61a ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730765905; cv=pass; b=tV3c4QzJmnH6uGTB+bvaM+XKrPHR9Rgay9WVCF6vcqXVYu6eZ/j4++bjFn2niAiOKRhUgK4PQQ64hr2g1QaouYhX0TYYDsw8xDCbRegFVrqZDiFE7rRVIFT5g/1gp92N/JZ8M1Iy7AJ8UZn1nKt1rNllA3mcba1PCIQZ1SZahY4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730765905; c=relaxed/simple; bh=qXy7cHgl+C+AEatkK1m7vQ5AbMK5TtTBY0LOuYgMPfY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Message-ID:Date: MIME-Version; b=tMjTBwHjzzp0mSEcBgWvuTJgRaS9NfLEPAIeHf5XfZSi1oPoy0QVmcWw2tqO/EbBZB8y2kiTKOpiEXATLjVOkycOODF0slULx3h1vY+J3l7tZwbR11U7oshvnJsxWHk8wTAAvXgSPagf+G28UVzk0Me5BnptpklEEj2DgfKojfQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=BtIZ4pAgl1P5UN9i/diqq286xsA8g8Hy7veiFozlHpkLwAdBMJhcfzd6vA1s2SwgKTdRqOKhvP/FZFe0Oj2i0gADgBV6/7benot8gMt3wSGZvo2rvSZiS97xvye4OLYcWlah5ShyQfCTzEY/XNPIw7dtREXVPX6x/uQbqvjIXDvfpb9LQnmiGU/uTz1bIVc8fWS16GSYIguIAq938oz8U8rIFfken4XqYVqDG3XBgIARX2laxMAgueIdul2OoE9HzDw70sg/erOJlzNpYRl1GXDy7ivDG+AC4aIqhHd6nmBPKWqBVIe0ttS9sT7o+73zVhJxzoS+NaPsgC8ufMScig== 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=9kEBCWt8+tDgJ+xkCx64Fz+chheEtwbPBgXplSZguzw=; b=eV2sA8nBMVUbbR0BpFqoy2gGRHMC2rKt/QVpb0jQ9Vsqgwg2MzoqVibKvKlL+cbqwUqgkVerg8uOTgnrM7OWEPOLQxrTb1eYIzC6l+CQ9SgsHiozPULmu9NIhzf0KXboqrAzMKD1vQvRuLogPpWQ248RbW4IldMIpp3bDNM0iICgqLdpFFHfxYVX2uO1wtSAmYV3YGkI3nPYQAsMn3j1T/tjo/5abalgczoo5ApQ/SHnDWjWMhGtmL4CoVvMMoEVGoJQ9A2pUrQJLEyBHxDoTfVjTLI8MUaFKeoDmSw60a0AP6C2awD2zNQTrX+J63g51wkebBGvt2Xm+m0a2llA5g== 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=9kEBCWt8+tDgJ+xkCx64Fz+chheEtwbPBgXplSZguzw=; b=Eyz35lqvAj9Z9MgruZl37j3KDxXL7qOysrO6Zhc5Yq1l9V2mX7PUn4ACEPwQAiTm00FBjexAvhKw1AZSJf4VO2pioKMhM871aS3cC+S4lF5KDotU53r2aGe/vcBMkpqQt7EZomFr30+IK72sZPul+D1fk07W0BNH/DpnQT8ZG7A= Received: from DUZPR01CA0047.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::16) by DU0PR08MB8729.eurprd08.prod.outlook.com (2603:10a6:10:403::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:17:34 +0000 Received: from DB1PEPF000509E8.eurprd03.prod.outlook.com (2603:10a6:10:469:cafe::c0) by DUZPR01CA0047.outlook.office365.com (2603:10a6:10:469::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:17:34 +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 DB1PEPF000509E8.mail.protection.outlook.com (10.167.242.58) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:17:34 +0000 Received: ("Tessian outbound 8223600b7a9c:v490"); Tue, 05 Nov 2024 00:17:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5e7620ab577803aa X-TessianGatewayMetadata: axjsqZa2gLCjHkPJ79qZEQHI9CRAT+JajInhjgIDNB2J47Kpha5D6IO8Y8Ybln7+TpLsO/4ezFCndwpuDaetSopAkWsAFyVOBFzpxsLI6cV6qe2ko1xjWab8ClpcjZ4yzrrsm4EUhbCEA471RMuKTg== X-CR-MTA-TID: 64aa7808 Received: from La119df1e9ac2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7EE09F6C-6AA5-4B75-9168-60B45038A67C.1; Tue, 05 Nov 2024 00:17:27 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id La119df1e9ac2.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 05 Nov 2024 00:17:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lnmsRYLVY7V6yKTLC27MxcR++G1WZdhAVwE+IQpcpZn4/bcK/uX2YHY0ksdpxCiEuLQh9fGNAfNHEcCXR5qzwhzp0IajDyfohVxU/dwA/eA0QctwuIOcInqU3s82NvMngFlnEWZIHnbRiYhtOckaP5HtrVX0M5kq93BMVxsz0naTnYY9lRosDaOjxrSTTIHeIdGHSTsSMZDEWfbW+nTVJZ553fm8f/AP1uBkKY7sXbpWa3nBZKd2DzF/zxyWKwDaqW6yB/ZcK1Bv4PI7fvfcXO1bLeFSUbMs0mdFLRsttkXW9HCHKQDAa1Df6ZvPjBhvf67LVPsGoc0zzlsULMx67w== 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=9kEBCWt8+tDgJ+xkCx64Fz+chheEtwbPBgXplSZguzw=; b=fZEQcE4jqTxl85MMG7JwVnhUaPIXGn2r7AMTKm3nDzjIsAiAqQfYp4mlXWwUrilwwbBmbCjjHn9f0SziexfMiYuwj90rI6pddp6HaCD107yeTFflEzYD5tx22zNykp9N9dfhcF3TshKxtxXejZZI2/09G9b/vqATHzbkf/L8TlIFzD0/qE8NTi6BP0XjMvAn31LBDdpksKF4EqorP6QZNnNTGKmxQuvJRlYhmhRoSucDMUo59dmTN6Nggvwti7D4b+7bQbJGEZf2zaHGR+Aw1xkbPXWj60yxuKggGuUTGwxTJHqV96MUOtQ8fNuq+BmMPMYROW1/1Yu3olMrQHgwaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=suse.de 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=9kEBCWt8+tDgJ+xkCx64Fz+chheEtwbPBgXplSZguzw=; b=Eyz35lqvAj9Z9MgruZl37j3KDxXL7qOysrO6Zhc5Yq1l9V2mX7PUn4ACEPwQAiTm00FBjexAvhKw1AZSJf4VO2pioKMhM871aS3cC+S4lF5KDotU53r2aGe/vcBMkpqQt7EZomFr30+IK72sZPul+D1fk07W0BNH/DpnQT8ZG7A= Received: from DUZP191CA0013.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::10) by AS8PR08MB9744.eurprd08.prod.outlook.com (2603:10a6:20b:614::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.29; Tue, 5 Nov 2024 00:17:23 +0000 Received: from DB1PEPF00039233.eurprd03.prod.outlook.com (2603:10a6:10:4f9:cafe::a6) by DUZP191CA0013.outlook.office365.com (2603:10a6:10:4f9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:17:23 +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 DB1PEPF00039233.mail.protection.outlook.com (10.167.8.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:17:23 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 00:17:22 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Tue, 5 Nov 2024 00:17:21 +0000 Received: from e133397 (10.57.66.241) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 5 Nov 2024 00:17:21 +0000 From: Victor Do Nascimento To: CC: , , Subject: [PATCH v2 1/4] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE In-Reply-To: (Victor Do Nascimento's message of "Tue, 5 Nov 2024 00:05:44 +0000") Message-ID: References: Date: Tue, 5 Nov 2024 00:17:20 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF00039233:EE_|AS8PR08MB9744:EE_|DB1PEPF000509E8:EE_|DU0PR08MB8729:EE_ X-MS-Office365-Filtering-Correlation-Id: c9c2dac3-4f49-43fc-7cef-08dcfd2f3f26 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|1800799024|82310400026; X-Microsoft-Antispam-Message-Info-Original: SVgY1aLrDHNzLWDtWNo0sP5ZyxnY5CqoN3vEiKtRi+hb5s0/PEMwm0+8C6BgPe6aX6UVNU51qtVG0C3veuRIscSsivqWHX3hs/Hx7GNIRL6bsBjmNiyuStLgr3P7tLJC20yDiyIddGuRgTu/qyMpb/y6uCcUPNY7UKNxzSIR6HO7PeEutQc6W1uPNITVE6K+xPcmJTW7pTiKQuhvqJ2/+690tEsUwrTHD57TVxV86d1fjG4w4GE3ulQ478Ny+xB31uysiWsD08ZN7whFEzfg7Lk2Gguk94BswI7oLW+3FNf4WRRqq6S2OtI0zaXawz4Gge1PEoIN79F4lH+PLtOaApZzByg0yLDJYMRmwHlgrknaXRRFB/Kd5Uu3DOVfTQ5faMIWu9LYjtsUXhOZnnvdF8rMJBna10taNsHF+7Jih9louNbFbHwHVtQkA2qw4BA3TNK5eSAEWhoDBHWTYgraiZPS4DuAkFDm57gmuky62IPVJC7l/cZi26scWQ2FPTszcZeCmIb4c6XG00FEb+VSugv/kdQipq0uSW3/+4pL67f2L9hSbH3rhb/5csqdXO879PkkHbzNDs+eD1KRJHAwjSvcn6vbDxIQJwm2I8sv8vhMGOocqkasmh6bwiApxTlQ62o36roFQAd0ickQulT6/tj/Vsag3R/yQfo1iUYNDUZYh65TkYzWXkfhDr7UfaAtXUxyni7vqsmjJpYmxxD57wGpdUHQrTcERmk8Y0KHOnG5eGO/RQVYYsziBB/saLTsAS8xWze3i/dsOG5LJnWDeHlWEYTIiBIQ5koZp6cFQoeMEm9WTbGU+Gs4UP/dZypvhVVfl8gCG5uuAbhE/hdmjmHBnG77rQhKF6SvDAeQkDHwQCwsQZuLUBWz46s6q4I3fTOemZjQJuswud5IIAcbkYl8n6F9Kehx1WM+AdCF3rxH/7nlFlVaZPvZJ+4j+MEr/c7t+tcYCs0JJjbwOpLG+mby0pmL7zp1BgTFGUuUgo6szBquh5iHlBw1S7u9xGNBy1e5TsOm14hmzBRYsGeTCNE1iF5dOCMy4vJ+80LLsDYoxyH0gCOacP+Kh0NUPsLkcKU+x8roFB/tBeg/1wBUHvIMR0dzU7LqAE8/Ud1oMYK6mOCHNGCrJ74EU+F/r3EKy+oVa99kt2jlUuACdVrkAQzZfvBRAgjmVso6jV49nVDZmLV2fbHyquVpJPd2T6wqHBzFqvm586ihBWK9tlPM5yC1nMa6QtCkH6SI/3Ns15jxp7L08X4oBB/62So3GfYEAQgocLwgvMHk7jcI0cl3vNglTy2kiQDOMytOUtHEhruVeUi3Jyb/YetW3WN2q6uv84NP42Th25laZllubMk/PdEVqEQidn5lCrOln+s7XzFgnLR55EtQw5l1QGEi0w9ZjFII97h/vemnl32/RAHAXg== 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)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9744 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4f9::10]; domain=DUZP191CA0013.EURP191.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509E8.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bb0d4f75-fb49-40cb-0670-08dcfd2f3863 X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|376014|1800799024|14060799003|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: IjNyez0bi0q0BN/NfMsC5HbucZ+fKEsbmF4cL5bStP5PwRDsa1Lge6TBWwZDCOFbiCOMnQicZWZeM0NQBsVk3D9/1DexDY4yeUva1KC3qtLclBM3R86hYpYFf9BK22jDLePZLzORWzpm/OTZ0hNuEPBhXateXzSZIOB8HHl/XGJjyMAYfZh/yHdsf/9/TDgboQ9S5rg2CGWVmrvkLdlpsaGQudX9zPGj0Li+WgiNa/1uV2yrSJoRXJp9LCCjRNhtEnYEG4ZfEEygbA93tzOyfGE2lHZzAbofrS4i9rsuUAp1SDVzq8vSz1JknX1cuLz21J/2aCM1KwPDGPXBZv5QD2Q9AnMd3+p2GCv95twlk/6VCdvxux6xWqKwF6v9S2kedcgtQaOqsOVDOZXt1idi1EQPcsXG39CTUgRjO2XUYySlHHu6sBNesIQcNY5+Z8TBcyNMxpkV0MX8R7WLx7ulv/Xs4Yx3MyAYk4ps81iWlVYVxYVbafAn03KMXJS+sSXy4fHuX04+BX90+ySCfTIF14z2S/0lRSBIpUlHlmTOwFYawfKn1F0dovEL37GFzkltU6/JplzqKk8Y2rXzp/U0gsMp8mzcuHxKE67Td7LQ4E3663Ae0iEnAynMah1gwvvSJvSBeos8PaedpSk17iTuRLKXxx1GxzmNs4tuRhe7KUjePjUoxrBqRylqTusd2cILvkydrUggA4oWyP+RETFmj/fpsm353eZexlp+TsemRqg7RjYrwm2h8oKjEKh1DamJc0j/TYD7Ax7FRKhnYz5AstoHCYtr1isRy1+D2O/js9J8MO9kyHPnJLTq/+6bHPvsNeo4sVy4pmVRpeRQ67dV+6LiC17spD8QBILQDmLGtYEfKEN5364Ab5CldijJOrGomTr2kQax8I+suHfSuOafscs6kZ9t96zmjg4tmVqeTDHgqP6h3Ie6Zc0vkZicaxYTGdJ6qxb1VpB1+tR0QahmAv+eJrvZF3ifE/CIpKm3r9n0ienRaY4PnrxrF8XPahXfBuhSPUd/Ijiw55yl1mGz6ewM+ZJPO+DTNlIpUfksjfJi0VBewl7sbVy4LD6fHZ0JS04Nz+dHZtTqUgRsthUt+NSeNmDcP1xz7jYVPH6m/o8p22ufBZXfkp2FuEu64W+VARLojj9jgOArPt5nEuZh44fRtv44t68bPLY1EeKkqNfvVKAfnq7ca/d1WrDElFYjSG9SnMDPoNpQXe+Och+X1r3jan66uO54nqj+J+IRWxfMX8qXM4nkDJjWJi0xJeb1m5XPlqYWCr5sRdGxZNR7GXwhbUxy3wAFJcouQPmMjZ3LkBIKIxMODkTEILkuKK8Z3sZUKV1757YlXPFG9aoRPAXRcFPyToy1Vhlk6LJ9ABkv5YYSupQzJ8xFxzxYEqXR/o2NdR8R1xzSq0wH7JrjpA== 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:(13230040)(35042699022)(376014)(1800799024)(14060799003)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 00:17:34.4545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9c2dac3-4f49-43fc-7cef-08dcfd2f3f26 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: DB1PEPF000509E8.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8729 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 This patch adds stmt_vec_info to TARGET_SIMD_CLONE_USABLE to make sure the target can reject a simd_clone based on the vector mode it is using. This is needed because for VLS SVE vectorization the vectorizer accepts Advanced SIMD simd clones when vectorizing using SVE types because the simdlens might match. This will cause type errors later on. Other targets do not currently need to use this argument. gcc/ChangeLog: * target.def (TARGET_SIMD_CLONE_USABLE): Add argument. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Pass stmt_info to call TARGET_SIMD_CLONE_USABLE. * config/aarch64/aarch64.cc (aarch64_simd_clone_usable): Add argument and use it to reject the use of SVE simd clones with Advanced SIMD modes. * config/gcn/gcn.cc (gcn_simd_clone_usable): Add unused argument. * config/i386/i386.cc (ix86_simd_clone_usable): Likewise. --- gcc/config/aarch64/aarch64.cc | 4 ++-- gcc/config/gcn/gcn.cc | 3 ++- gcc/config/i386/i386.cc | 3 ++- gcc/doc/tm.texi | 8 ++++---- gcc/target.def | 8 ++++---- gcc/tree-vect-stmts.cc | 9 ++++++++- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index a6cc00e74ab..1e51d0e3604 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -29189,12 +29189,12 @@ aarch64_simd_clone_adjust (struct cgraph_node *node) /* Implement TARGET_SIMD_CLONE_USABLE. */ static int -aarch64_simd_clone_usable (struct cgraph_node *node) +aarch64_simd_clone_usable (struct cgraph_node *node, machine_mode vector_mode) { switch (node->simdclone->vecsize_mangle) { case 'n': - if (!TARGET_SIMD) + if (!TARGET_SIMD || aarch64_sve_mode_p (vector_mode)) return -1; return 0; default: diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc index d078392eeaf..04cbc770509 100644 --- a/gcc/config/gcn/gcn.cc +++ b/gcc/config/gcn/gcn.cc @@ -5653,7 +5653,8 @@ gcn_simd_clone_adjust (struct cgraph_node *ARG_UNUSED (node)) /* Implement TARGET_SIMD_CLONE_USABLE. */ static int -gcn_simd_clone_usable (struct cgraph_node *ARG_UNUSED (node)) +gcn_simd_clone_usable (struct cgraph_node *ARG_UNUSED (node), + machine_mode ARG_UNUSED (vector_mode)) { /* We don't need to do anything here because gcn_simd_clone_compute_vecsize_and_simdlen currently only returns one diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 473e4cbf10e..eef12f8c9f0 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -25555,7 +25555,8 @@ ix86_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, slightly less desirable, etc.). */ static int -ix86_simd_clone_usable (struct cgraph_node *node) +ix86_simd_clone_usable (struct cgraph_node *node, + machine_mode) { switch (node->simdclone->vecsize_mangle) { diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 4deb3d2c283..e3a85882b83 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6523,11 +6523,11 @@ This hook should add implicit @code{attribute(target("..."))} attribute to SIMD clone @var{node} if needed. @end deftypefn -@deftypefn {Target Hook} int TARGET_SIMD_CLONE_USABLE (struct cgraph_node *@var{}) +@deftypefn {Target Hook} int TARGET_SIMD_CLONE_USABLE (struct cgraph_node *@var{}, @var{machine_mode}) This hook should return -1 if SIMD clone @var{node} shouldn't be used -in vectorized loops in current function, or non-negative number if it is -usable. In that case, the smaller the number is, the more desirable it is -to use it. +in vectorized loops in current function with @var{vector_mode}, or +non-negative number if it is usable. In that case, the smaller the number +is, the more desirable it is to use it. @end deftypefn @deftypefn {Target Hook} int TARGET_SIMT_VF (void) diff --git a/gcc/target.def b/gcc/target.def index 523ae7ec9aa..ad8a713c14a 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -1645,10 +1645,10 @@ void, (struct cgraph_node *), NULL) DEFHOOK (usable, "This hook should return -1 if SIMD clone @var{node} shouldn't be used\n\ -in vectorized loops in current function, or non-negative number if it is\n\ -usable. In that case, the smaller the number is, the more desirable it is\n\ -to use it.", -int, (struct cgraph_node *), NULL) +in vectorized loops in current function with @var{vector_mode}, or\n\ +non-negative number if it is usable. In that case, the smaller the number\n\ +is, the more desirable it is to use it.", +int, (struct cgraph_node *, machine_mode), NULL) HOOK_VECTOR_END (simd_clone) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 4a824d16955..2d0da6f0a0e 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4155,7 +4155,14 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, this_badness += floor_log2 (num_calls) * 4096; if (n->simdclone->inbranch) this_badness += 8192; - int target_badness = targetm.simd_clone.usable (n); + + /* If STMT_VINFO_VECTYPE has not been set yet pass the general vector + mode, which for targets that use it will determine what ISA we can + vectorize this code with. */ + machine_mode vector_mode = vinfo->vector_mode; + if (vectype) + vector_mode = TYPE_MODE (vectype); + int target_badness = targetm.simd_clone.usable (n, vector_mode); if (target_badness < 0) continue; this_badness += target_badness * 512; From patchwork Tue Nov 5 00:27:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Do Nascimento X-Patchwork-Id: 2006586 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=XX/UT7HU; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=XX/UT7HU; 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 4Xj8MD5NPNz1xyM for ; Tue, 5 Nov 2024 11:28:24 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EABB93857346 for ; Tue, 5 Nov 2024 00:28:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::62c]) by sourceware.org (Postfix) with ESMTPS id 6C88C385840B for ; Tue, 5 Nov 2024 00:27:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C88C385840B 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 6C88C385840B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::62c ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766475; cv=pass; b=PdRd13XGRw6JGwXpMq8U1RNg15QuU6IWMulo4xJC7Lo7W8gnQvGviKKBD8wDXepvcUGjcGe8gazQKfw10p8NRdKzarp1J6LR2qam9G36ZAXcvWKa9QxtctgueDukvmmo+3idSDjUnTANh4KWfhTSyzOr+WeMhPFJZIHPbqs7Cy4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766475; c=relaxed/simple; bh=ziE8vX4eZABb/14wkBgvzZqgYvQ30d7rkWtYlrV064Q=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Message-ID:Date: MIME-Version; b=i9NkU8lwWO4Mm6C9zWPAn2PVf/qziaPcdYb16Kby4NXzQIYBd6AxRIff/A8rp15a85EziKcPffzpSUl+zJsslkN4VjwwuL2ittItGjayey4FPwBFPd4EvJHejN9EXN5XbQ1n5iGYf1K/Y6/9RKVXal8FBOh5YmmILVrK6pJBkjI= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=uRloXtAnrLV2Qn0Ahi55rxSlW/CrV5X/10lGAoqR/OndXn+LXL0kp9na1m/99pDurHywiGx/FMywjJi1z1U3itm2kHZ6kOf2SHRAsX+qu+7WyWC9MkR5/rsOXJ2feHT8p6QZDJLh+X42/VUKvVnfF/3dIKzMKpck8nQvpxDAAslyGQaO/z1cE6Qai9GwFs+F3PfeFOegClXicrCmq/sETwZgZLl7uiOC5am+HLvkoeiDWgK74hOurrSX+A5Ie7g5lxp5oxOXVoz2yhxPvG5NXyJNYo8GqHeBJAsPTP4JjNZxw7NVWRi9fZ+VgHMjT7vyCOCHBocrkbXXKZxCBCjRPw== 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=hwz42FlL8Cs6thzazFRciWu8fwf4z/qstu/v1InI8I8=; b=O8+vVcVmeochz2m4gfsUyekYPvWcixuk5mpWLhXhv8vzCI+PKszCq+KQq5Jx6RCg5OTmh+oc2R6tts2jbTX7qBcnGyNQr/l0ph+fsmXlVfiVv0CuukRkj3ZMQOTtX775ZYNnZvRkY7sMo4CaMlHdfuSRto6Ah7lWYl25WZAxFNLL/xJgcvM6ywLwERBDA0X5zahfCJioZwp1D8JinJ/9UG5yY9iY2n2KdF0jcnjW8GtJsb8YC70D7IRf1btdEGSGz5AZcdv4bF8tg2PMEeLT4qrdvX3J+nz3uvEejkcNNQmsDpKpkBUOXq64czh8vVRmmrpJyGkRp767RV4eKqgeEg== 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=hwz42FlL8Cs6thzazFRciWu8fwf4z/qstu/v1InI8I8=; b=XX/UT7HUOh2S994yP/ynAB9CeAnQsSguhpvujxD7VECNDHheYrlB66TRP2UbDX9k9tsAEs/cex7CQeaLkLEmpz0Zrv7nai0PABku+/HKeQDoLcAK7ulbQJM7Xhug9+g3u7IrLWhbziG+EcQkoIyIwq8ze6olZXPLMjoAsAD8oBo= Received: from DB9PR02CA0028.eurprd02.prod.outlook.com (2603:10a6:10:1d9::33) by GVXPR08MB7776.eurprd08.prod.outlook.com (2603:10a6:150:5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:27:46 +0000 Received: from DB1PEPF00039232.eurprd03.prod.outlook.com (2603:10a6:10:1d9:cafe::74) by DB9PR02CA0028.outlook.office365.com (2603:10a6:10:1d9::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31 via Frontend Transport; Tue, 5 Nov 2024 00:27:45 +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 DB1PEPF00039232.mail.protection.outlook.com (10.167.8.105) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:27:45 +0000 Received: ("Tessian outbound 99870d44e01c:v490"); Tue, 05 Nov 2024 00:27:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e5ee9386f870d223 X-TessianGatewayMetadata: zAAbklNLOa3UEROKFJhJaGWJGUS+L9+Qvv+NgfUKgalhCl//+zt6qBo3BrD4I20D0kAhH8y6i12u7ZMQoWJ0VRFZBq6Gfme59MDwaQXoTjExqEuiAa0F/SoUe0yPsooNBwtDyPPqp8hxAK8XTUrW7g== X-CR-MTA-TID: 64aa7808 Received: from Ld3a1f740917c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 62375BBE-D8DE-4C71-9E44-CD8BE74DB623.1; Tue, 05 Nov 2024 00:27:39 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld3a1f740917c.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 05 Nov 2024 00:27:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Uv8H+iq3+WqBpIlIh8jpTIL8w1CwyaAaYu+/xz6EEGo3EAFiNOI6e+Ph3mMAoqWqZQ6kX+NotRYYyGRZnNeBwGm/93NBVr8P9msBFA8RkUcLsXjEeXCERQme7jFq8Yt025GsWUhJYQxd9ncmZh0gF9JbGBf3C/tMDl2BxXQxl5iPqGlqDgpef2jqJerTOqFaOJk615kcvDNEOn1UcwzNYS5LtVGfCLKQSxdUgc76ZzUpeWLa2MfO0hAzgwCgkLyX53nrurgj7c59P3xnPCEDM11LJQB0xpWS/emqBDVsCplDHUgTWei9EproGMEGq9gbwr/6z5aRn4aRXxlpzXOqqQ== 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=hwz42FlL8Cs6thzazFRciWu8fwf4z/qstu/v1InI8I8=; b=Xd5vgx2pdN93Ad7L9ECFuje8i9VRJh73g2CgoEEnsI6j/R9JCJkw6akyiQZ5qdFA8jb7k0UQslgrlIa7fcQyoEkAozxb4bwJa/Sxb4C0QJ5IqBzn/r1E9O57cuTc2dkH89kytCsBVsGrniId19KICF9ip3T/sHu3Sae9qb6mhyCaFrI5yZ8zP0gaTTOsMCkAuxQ5EJUwYAAX5oaRYZ7hxxGpn/Zxnas9YQzFm3AalYTnm/qnXaiFvnsXr7dFLlIiXh2gARpnoolTxRpU3iSKRlZZrBbSX55vt5wRRDVgfSsa+RVFiyE0Z+qy4T3EvAiURXTMH1y9XcdWGVV4fnLM5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=suse.de 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=hwz42FlL8Cs6thzazFRciWu8fwf4z/qstu/v1InI8I8=; b=XX/UT7HUOh2S994yP/ynAB9CeAnQsSguhpvujxD7VECNDHheYrlB66TRP2UbDX9k9tsAEs/cex7CQeaLkLEmpz0Zrv7nai0PABku+/HKeQDoLcAK7ulbQJM7Xhug9+g3u7IrLWhbziG+EcQkoIyIwq8ze6olZXPLMjoAsAD8oBo= Received: from AM9P193CA0017.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::22) by AS1PR08MB7660.eurprd08.prod.outlook.com (2603:10a6:20b:47b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:27:36 +0000 Received: from AM4PEPF00025F96.EURPRD83.prod.outlook.com (2603:10a6:20b:21e:cafe::1e) by AM9P193CA0017.outlook.office365.com (2603:10a6:20b:21e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:27:36 +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 AM4PEPF00025F96.mail.protection.outlook.com (10.167.16.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8158.0 via Frontend Transport; Tue, 5 Nov 2024 00:27:36 +0000 Received: from AZ-NEU-EX05.Arm.com (10.240.25.133) 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; Tue, 5 Nov 2024 00:27:35 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Tue, 5 Nov 2024 00:27:34 +0000 Received: from e133397 (10.57.66.241) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 5 Nov 2024 00:27:34 +0000 From: Victor Do Nascimento To: CC: , , Subject: [PATCH v2 2/4] vect: disable multiple calls of poly simdclones In-Reply-To: (Victor Do Nascimento's message of "Tue, 5 Nov 2024 00:05:44 +0000") Message-ID: References: Date: Tue, 5 Nov 2024 00:27:32 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00025F96:EE_|AS1PR08MB7660:EE_|DB1PEPF00039232:EE_|GVXPR08MB7776:EE_ X-MS-Office365-Filtering-Correlation-Id: 7262207c-9215-458a-bb78-08dcfd30ab4b 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|1800799024|82310400026; X-Microsoft-Antispam-Message-Info-Original: DwkT5j49KWfY24F2ngsptOQg4UouOPl9dk0vFKeC5mF9KfOA9hW59mFQ3Uwa2EQW9xmbNJxZ8cv1dhUbtRWMB1Gzmootj0kmKilWmQietVkphqc7KHP3wjTkqO7cvepgxQOJBEQ7PN5ASTjfog6TQc65lfoNGUA9WzDMY4rs+B3yCQQElaADVaJevMCj4QtGa9QB/2dYsPYzFcPc9XQzF54Bk5BGGXGz6V5djbeglxlH8iQeOMqzjhdUZfVvG4io/cKdIpCbI0Cf5urJPIyj539fd05is6vUzeYIXh1JEV9HATO+73Z3uCinuUTE5oCgTgT+PYMoppOyyjRKbmFTenU1wONjRk9rejxS5fljpE1aPpQYQ7AsaUIoFRhWml7jrB2TmFWRljj5rLWE3xmTiFSdhhqjQYBkoAcJbJZuJPqczxxzuAYuI+oUMr2g0Aj54FW2DjPl4OhfsC70XM+Y2E8duMKtGBAT6cRbY3cINOPuQOkVrrgFeyCFzBiiYpUYCr4N8nQmI8nTE99NXvoZSgPx3JvY/JFp3hsx4MdTXbAx1CScHu4OSd5EHghX8YSb/WjTCTxftkNPMgU0jLggx7/317+aQFrOvWRtJKaOxB+wVPVypVbeBWob85F6pN464S7MYLOKQiZ6mgb5DVegAEugjdfGPLSKjtaG0FS3DVHsTIxLMcEszIsovj/4nHG5VWrOzMM4vHG7kiCnQ7Cr5Jp03oVCzzOpPIVk/0Yso/WNh9PlEfksGZG5VrJ5Si2U6Oji04AsH+qB4cxInF1q42bSv9lzFPhTvvC8tlQsScfIdHZd/4Z61pOTb+KhXyroim9RvF7JGdczVTYQLEcKJxeguIMOcXX46Gf2/PuNvMspnr5Pd+PCPYL6JvZuXe0jWmj+Kn6+cgfcFjvtUal+C2z1EoxBYpawtkk3aNbmPs+suu3+PBjXfV6I/2a0/FC9aqaZ6WjpwhuJNia+sT0FZ01Xk311fTqGX1T+XF3iAZNlRkQooHmRgSVCZHV5HM7nWd8DAh2LATxupN6FkwrPEfuePLaiTB/BmWfK3YwErEWFdx9pWg5RED3Q84HP/wRNfyyhkhdtKUGVu4rWIRdYLiZBiJdrwK46VUvaVPTx+DpMvrkh8vZNUqCgIznCMSp6UBvQ42kW6Ubz4mKyyatO/YiG+73PcG8pw51RlUrOOA+3/IkkuEj1FYm0iekMBaI+LoAgkVZkYPOoFtaKPTEZGKoagCzU0iZ3WnCNztxf7h15Cvcx+vROmzq1+uh5Of6uzU8ifZmLOmFbJ4AtsfV4zP7gmywCa+9qasoD/666+T9IS6eR45AKbjN6diJpFdr1yVNf44EydAQZZfs/8NvBm3hfFR+2ndmZ9oKFJpieQ6oQtLINvcqSCxb9U8sYATFZmUz5SmAyhp28Oqh2FeS5fA== 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)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7660 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:21e::22]; domain=AM9P193CA0017.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF00039232.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0bbaa7a8-9bea-4abc-991f-08dcfd30a610 X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|376014|1800799024|14060799003|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: BX129V4sySA4E45hFDTG26/e08i3wFSbwuE1h5JUid67Hw0vp0osd0blvah5U7SIazm2qAYS3j3YBedaoRtFGRMFDIVHGpEyXbEeFwoq9/0JMbEsQPsc3GVtuZHg8+0ho6akRodLcVP3KI//2DIhq/WuPMKGV+rVQPbb0OWKBq70iPjtzoXmo3mE4u3GqB3yzz+rsWYl6Br0sz+xl2MRmWVJVvS0NyjQRKM00qPxRMhVJ78myMsMfQILUPnUVNd5Wr4z4F5Q1TVOLlh4EmzWrR9g7HWwC6W7TVzgm9TAQYR874Ogvd2EjkltdFUGMw+T7U6sKlSZo2q0pUtBMveQWw8Yev6JmKHmNHXTgutX4XWKdONbfVecT1h2FH6K4Eay9BIR6L7A2REPnp7cs17Iohv2rWCyjEa7MDarBnXiFmpJRkKRWD71SfLlHTdjILv5Ig5+5Vwtkkx68CXx/3v/xyXntef2dBZblxzI9/Y9/AG0oxY5ih3aRGqgWiFfSfiJBkJuDWW7PN2hD+S1nPEPg7pdYgrUtbCC3ePWgWqQrSY5Pqaf14yFqFar8lPmjKJRN5bKX2Jz47+/AGeY+zMGrzNFBGp/GCbfkpHz9j3oHWwPpomhmoCT1DB0gv9vTv9t8d6QO8iNHwdSfEbVGExD8szUQY+56lP3fkv6DrTtZlQcf07XMs2aWduYF5rxj2yd+xf/5RKY1UHMm12KM0LaU6jmngowqY2ttcpFrqXEcJIekRckovdvI27q5O1az2SWShqZUm6ZzQKMb0azxtHAE00Z9vHF+S0t4mEwIWRhMExegXHDNzz24B4PB3YTlQJTL2PzXJGkPp8Esm9hEVRXFDIl/9UXvlR681T7AWU75bWeDwD67M32wi9+x7HxzBi8ykvX/bDpkbPnYWwyWzbIVBfaKuCRWp2KpRjrS7GwD/vSyp+rZJSPONsIqA1otGEpHYESPpAAXfzxYUS/aDmS72LB21xt3aLOirEm3fOdO0hu6bDvLU+RDxD4c+XCY6pUyq9mYNnseqz9X8fe5C0kBREC/eE46yyGc8R7P3nhSqLkZGnTyrxWy+cHLa7G4774bM0MBx5auD4uKiSBTB2LDDI+6cuukJ9BdE39R7sO6lhW4PsgPDQJSqNHPBB6UPr93XXFQ2+P7uZAW4CABkju07q2pZR0MWvs7FeTqtKgyssvlsRtdScWSrqgBuL7OfUw4OOQEASSTSMUaqMqscXJPkVLtvS5CRzZ5XxTpscTXnKHo5DgO1QPYahPh1yoOxbIMlH0uRvK511Myp3reor7Ntsxb8A4Y/PZjxACBQldleE6lNYZ6yXJtl1TiJ+TKmgvccNc7+1i/Vwd+OfJ57ZAadXZjPTLpTO2GtxCbo0tyCAjJOMQPyJO7ffoRhzYZDaMjuG97reDQx7sG/Xo1DGBTA== 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:(13230040)(35042699022)(376014)(1800799024)(14060799003)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 00:27:45.3892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7262207c-9215-458a-bb78-08dcfd30ab4b 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: DB1PEPF00039232.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7776 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 The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we should disable using such clones when the VF is a multiple of the non-constant simdlen until we change the codegen to support those. gcc/ChangeLog: * tree-vect-stmts.cc (vectorizable_simd_clone_call): Reject simdclones with non-constant simdlen when VF is not exactly the same. --- gcc/tree-vect-stmts.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 2d0da6f0a0e..961421fee25 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4149,7 +4149,10 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, if (!constant_multiple_p (vf * group_size, n->simdclone->simdlen, &num_calls) || (!n->simdclone->inbranch && (masked_call_offset > 0)) - || (nargs != simd_nargs)) + || (nargs != simd_nargs) + /* Currently we do not support multiple calls of non-constant + simdlen as poly vectors can not be accessed by BIT_FIELD_REF. */ + || (!n->simdclone->simdlen.is_constant () && num_calls != 1)) continue; if (num_calls != 1) this_badness += floor_log2 (num_calls) * 4096; From patchwork Tue Nov 5 00:29:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Do Nascimento X-Patchwork-Id: 2006587 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=LcTbWz/O; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LcTbWz/O; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Xj8Pw30L9z1xxb for ; Tue, 5 Nov 2024 11:30:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BFEC385783B for ; Tue, 5 Nov 2024 00:30:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on20604.outbound.protection.outlook.com [IPv6:2a01:111:f403:2608::604]) by sourceware.org (Postfix) with ESMTPS id E28D33857B91 for ; Tue, 5 Nov 2024 00:30:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E28D33857B91 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 E28D33857B91 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2608::604 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766609; cv=pass; b=SGoPbWMSUxFBkAZjaiJCC7hMBfULM6cD9aH8JwtAs/wh9jfIIIjNpy/SKtOBLDE+qKjrinU3N82PRaDPYOkJ/X4kTevuRPCjsqoTCfQtDMjB8oGHlrjcl33vkNTferNxXJQF5KPjyZUhmbCIDXBI2fH7sfYpnTQPYnrsxTF/4+U= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766609; c=relaxed/simple; bh=NQlANE9M3bnLlLyG7Z0fh9Ke4HvBewyLy1QY9EvPO68=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Message-ID:Date: MIME-Version; b=RbEfoZHH3Etqd45QDISgM9O6oAbBmm/zzsUImqLNKy1gQGQCuGMdpXlT57tTn8Ut2BO2z0+gxqbo/JyfrxVJv8CV3J0uHWTMP88WMYFwLb+stGjLHeJuDWile2qCAr1VJ7lwzYkrKHhdgDlDWWcga29ScoUag8dL+PByrN6XCnY= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=fAePuhniL02iBG2Tdi3tNx7mRkWznyTBSNtdHDtqUTysvlWX8Rf8RZojKn3DEUl8X6jChs1cviIGCEQi/N0ZXuQxGocwmns7zGTsAw9BNxhwMYD5ukJV1W6MfOYnCwbw88ptk0HjRWHA08fXuK3BJDsoXppHWrOEBbjSRb1Kay0cwyWtQv3WkJtrPYYVDN/5lTt+XHQKfoFXgcA2C2XiuZJ25B6xvZ3VYvNi1BswhGTDnQsEo9BV0OcvhuIP5dbk9POvB2LdXXX7FFTNWsSRORsL58cq15nb2scIuKzZxWpsc6W4vDt+4UYSxNwbNUWS1+Oy8NO/+WExV5rcmMOM6A== 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=/k664C4iNjqn3v4TYCkEIEGzCy8+SoJnnqT5w99g9MQ=; b=s7A+2/hxPMEaU9089ESNWe64mEW+i1C1bHhDEHImhYdsa/66vkf/8m0YPFqrBMcId31CTO6T5pJwiGgOs/LuHastKC030KGF98dXie19B/cAfYngqKIb2rH9WuGyFuAPKC3y/CMmZJTAEIFr5dUrQPoXNRwXRamXLNqz3M3KSLMo3KQaJxhzbOmCY+VGKAIilwxLH+0OMeR/Sq93mB3VSIDM39mJYLLNsYORlANRMj7qXH1VAJmvgfBgCdKKSgbmM3TG6VCqhasLeZS8sH0CvwmW18FgeOGAOM+/+o73+blnq/umZbV9Zj5+Lycn9uIytuuEG5F8yITr/wePvaBhUA== 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=/k664C4iNjqn3v4TYCkEIEGzCy8+SoJnnqT5w99g9MQ=; b=LcTbWz/Od3XfAprVnYeELLNZY1/xB8uaFO589QrDFi84qpyMRewo/07C4EglxQlR3TevTOhnaOuXIMSp5E05RgJbJyAGWxQiPAuEVR00Fieq/d4ScRTQxwk7o+FdKl2xs+LoGMYD6lYscxjiXRRs8v+pY4BKYjgt38t4Qjyw0yQ= Received: from AS8PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:20b:310::10) by AS2PR08MB9497.eurprd08.prod.outlook.com (2603:10a6:20b:60f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:29:57 +0000 Received: from AMS0EPF000001B5.eurprd05.prod.outlook.com (2603:10a6:20b:310:cafe::4e) by AS8PR04CA0005.outlook.office365.com (2603:10a6:20b:310::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:29:57 +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 AMS0EPF000001B5.mail.protection.outlook.com (10.167.16.169) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:29:57 +0000 Received: ("Tessian outbound 4a86a9c66651:v490"); Tue, 05 Nov 2024 00:29:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9c69e9bfe857ee13 X-TessianGatewayMetadata: SMlqdioheEbaiz+R1gKHe7OGvQsNxPNDauY4ov9ImsyXaOSnHMvCKIu/TYCfOjgtni/k1C+LbnMXZuG3XgyVC3wGTEIU28S2+3+HVXspaPgcAtCVNO9PEZr79JFX5aV/6AgJWyc7kdnidiL6wHAsjg== X-CR-MTA-TID: 64aa7808 Received: from L384b1a50cc55.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EA776316-184E-48D8-B5D9-0EFAE14E5EBF.1; Tue, 05 Nov 2024 00:29:50 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L384b1a50cc55.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 05 Nov 2024 00:29:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FHh0slSNevJP0mtiI1jpNBkt00i5B8MaOhGYXBnBHLEkbI0xRd+nsiOUg1i/zbMjZbtaJik89RA94l2TWpDhxHhIRrpm/4lA9Lwg5SV7hMEnk9N/Q32xnkBqk1zSGU3HyYBMi760OfupyOHZ3IAmHgPd2DUXUVh8ihXtvjRkj+BKm+4ettw63b0nSotdUz9X4tGhNLuhaNkIq6j/R5GqKTqalnVSCPPKb1EKG+L5pG9EdEo41I6rfB2YG74hMFTUY5kY19IlfXEivqs8zm/4RQZrz/sRYRHacQDOgNVdd4B+B6Nlzkbl+Ji0HWdeij+N27VG4dGiPfUHF9r1IbCIbQ== 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=/k664C4iNjqn3v4TYCkEIEGzCy8+SoJnnqT5w99g9MQ=; b=UBLnDVfH0ERIWkELm9lxzTskCESHiHrAfAYkn/Ek3IJS4Fq7QUPxrlT7pFScOgFW38pZJ1QsDGMsUG2cW71vIuik6eu51uIDQVFZu08v1e5lAsL/zda5VDOiAMzUEzaYeSslI2gn5uWmyaTHKhcX3u7qUXDLuY9k1riSEbNX7fLkuqJhD0qjljcjyNoCMlOQb7FnrYan1d9uEHK4TQy9awesktBTXuMQPz8J7NXh5mK17+R1YNfvm0uPg4tnmCQk7uxiy8ZC2re6b+cgexThMece0kgrsfpEvF3Vw7UwwJ5XINp6ekIcuUbPircvmLy1tRR6eEzRHW1O0vqgDtcGlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=suse.de 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=/k664C4iNjqn3v4TYCkEIEGzCy8+SoJnnqT5w99g9MQ=; b=LcTbWz/Od3XfAprVnYeELLNZY1/xB8uaFO589QrDFi84qpyMRewo/07C4EglxQlR3TevTOhnaOuXIMSp5E05RgJbJyAGWxQiPAuEVR00Fieq/d4ScRTQxwk7o+FdKl2xs+LoGMYD6lYscxjiXRRs8v+pY4BKYjgt38t4Qjyw0yQ= Received: from AS9PR05CA0007.eurprd05.prod.outlook.com (2603:10a6:20b:488::27) by AS8PR08MB6119.eurprd08.prod.outlook.com (2603:10a6:20b:290::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:29:47 +0000 Received: from AM4PEPF00025F96.EURPRD83.prod.outlook.com (2603:10a6:20b:488:cafe::c4) by AS9PR05CA0007.outlook.office365.com (2603:10a6:20b:488::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:29:47 +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 AM4PEPF00025F96.mail.protection.outlook.com (10.167.16.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8158.0 via Frontend Transport; Tue, 5 Nov 2024 00:29:47 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 00:29:45 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 00:29:45 +0000 Received: from e133397 (10.57.66.241) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 5 Nov 2024 00:29:45 +0000 From: Victor Do Nascimento To: CC: , , Subject: [PATCH v2 3/4] aarch64: Add SVE support for simd clones [PR 96342] In-Reply-To: (Victor Do Nascimento's message of "Tue, 5 Nov 2024 00:05:44 +0000") Message-ID: References: Date: Tue, 5 Nov 2024 00:29:43 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00025F96:EE_|AS8PR08MB6119:EE_|AMS0EPF000001B5:EE_|AS2PR08MB9497:EE_ X-MS-Office365-Filtering-Correlation-Id: ae860f90-3c71-4e5f-12ce-08dcfd30f9dc 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|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info-Original: I2PS6dUoVJWNsCiX9KJDIC2t3cBz22melcuoIFSjvMmlwpE7myL65H65AzYfAizCsMmzXM3MkPE56ciJqzJ4v+gWM3B0AHk/etKOwZeYgAQE4J7nhNrWb2ZrPcFxErpAlRA0zdzZn+ELX+h3J6Uhp5tLbtzbMwQ9oSwWeusHExWgueDSLwXd1Ct0IcSzp37NOsDxf6OsUt+rfGiy9aXvjIKtz74KeJCj3K8Fm2Enwq82Yc+zhgixDI2Zq4qfcmQ78Te5VFMmTnNnYr9FlKWQUQO2v5RP5ScOml446YOZ4EshQ16GIohJaMsnV+aYleL39G0aKkxHe5VF9Viq2CzhLPcoLK8/BwAZ0vbx6SZ3adBDrTimebgataiIvIyn/XGlSjC788cWU/fRE/p+HEUmrHabbtmL9DFa4suyaLPwjV7JG6dL9uUeIl8kgrxqDiqK+lqwiW1Ca/msyvRPFQCJeJOpsDwsxrFFojvyuC/Hw8Dmay1DStTz/0LTkxFNkupqEJNzNV9jOC97tjiQGN3ZfZwE4m5xgfaPJ/jk9YZ+kOV1Oi72XjO6awlDfFM3OLClMTGc1km+KnYYfmJkCf3AUSKAhwz/gcAf55ANNpVzuNNbisTgRoE7GMp+Hf349/5OLWnP59XdMdd0MWpBf511cbjJJvWfYUs1nMxbHlWjKCngMqjwcsDjAjoCIBTwJjSn5NOBpWqQx7/dAD/2B2pbL+rfkppMWwZwkN/xV9uKV9YDFHFO+PF+yALbiEubgrr6UXHy0jf4vNRFljo2d/vr5ZJoD+Tp8lbv7nyKzAy5LTyW+3nxix84a5za6LwWOxLCIyOw+ULrSTmJDtRT5cxRkwVftpqDcMxIysQbcDauAaI5RcjW51bZiTyW1zzaeBbSUb3WqVF65otHjsiJNPOVaa5YtxntNu0KXysBSL6dRirU9o6l/V+hhw9+rC5UHsCqCdkHOTtBLfX1gIpDY+QhsEtCWnBk//cYefrBamkf0yrXKH8duygMot5ot0+cSUg7n82gFtbmSc1G9Xos/9uC+3n0kNAtG6m7Bjx5fX27J6jc0tvwY9Yny/WQSo08GalIU6+SXBEo74JcRecZP475annqfBpfG7ilrv467dDtx/BlSrBUuJ224MKWM/vHgY2se7mVq5zAWtdHSXA3yyA6Q2XRTRjWt+8LLHJc3WSImsaMtwtGgwY/2CAyI4PsVRsRjvDDcKH789Mqg8KDsoCQ7QpkF6uNfPMVhb/5tlKWaGPaxP3lmJ3KO6JT74xzgezikTx48NDNtyzliWsg0A2oY0Ls3lxWXasdaluw0DV4ptc2HMOr4086WnQpQj3d9dWUvvpNG509swhH9ltxV8Sj1IS0JLwhieB8fXI38PSp2M0= 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)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6119 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:488::27]; domain=AS9PR05CA0007.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001B5.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3e1c230c-6682-46c9-595e-08dcfd30f41e X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|35042699022|14060799003|82310400026; X-Microsoft-Antispam-Message-Info: LtcQHUugKml/rUSC/91m9hhtb13gRnqI2kQlEiOXD1J7xYAhY5IM8wt2atfMoKI/cLgM3vIhW1qktUflGq20qTN/Vsm3mfmEOAexI1pQCX93WuIOh9XHSv44estxw+jCBaTYjaOQHdtsQruwUv4qnoE70cbaXgce4Z6WV7uL7yhCmln31JtMnTk3PNuxVl8D+ohR0JtU9HOO8DI5L2M9vobPQPMbo4kSNiXBhI5ZQHP1Nzx+Qbjl7hJwickiMX6czhcF/Yusnaxzy4YgyrJSGLQaKqlDz1/ttayYTl4Ufafi6UhHRipJUFG3/YWn2NACyq0V9mswIwBHyNKgXhEfVm5u839P33BVsNUTiZnIKxD1duL7aFGPVgDOyZBCHmnpis/QtOiYHDMsUb1E4k98UCo6NjGZzs3Ph7cIvglK9N+2appJ/CRcyNy9FOWyjgaclGAV7MNhTOfW97W55nEWjRW29vxN9beb4QmcoAychLwkBIOElzNC5fFI66oawUrsLKTKv+IynpuPLe5qNoW/7F5rEjsaYnawFCr12fXKd0E38wEFj80jHAfNXkCcba/Tb0M+z4knknxgTXEAFasctNnFM0rn4tK+ZN4NL7xTsvg3ny8JupbIUs8rHuCE0ybaMe+ft8C5WvNQKZ5krua8rze9Tw+c9BIRXNhRKEDVsdKQONTplTi2Za2TRG/7AwwnoJjaogJZMlQzcsE55TqaWvAooA24WGqeFeIel4Fz4ADkLbQWuiez6P0Y8phbnUSwQdgTc/jifpiKC7zmnEvhnnCuzfZkbfczDJcr5+zL9LfQOyXtQWtS4LPwPxSy3NyOeXwxmFm6PqJzzvuPnuW/1FQLjPwacHCrPtkI0RrCbpSc3VWFcUTogP7tQsTTMSZRv6ehbNJAH2+Bp5sRNh6bYYUwPyknktXrCTZiQgdo0H0XNNPe63u5xXniPLXET52odv8AVQwvqpMYZbMcsnFr8QJYwxAf20SWiiKIVzaJiuvK6LAcWSLCcxNiAyRn+LEw0evl//48WrmZgixm5QWcwEfTFiIS+0jf8RbtysKdvslF17E7tejBNKvcs+eKat01BY0F9dR48KoEgRyEQEme8UkyOzdPXXv/TuKF6vdddt9kunRZ7A7EPblkp8LBuYT3oohOHAoiXDSRXTnyhE1EJM/erGuNnNNFh/MoTfKMjM/6+BIGAVcc+MFcS3bMq6VYkJlbuMdxy3iceON6Fke/SnREKHVHkX0D6kU7iZ+PobsNtFCpaHfiFkCYS/50VEKbTae5GDAAwJj/ZE4TkzNe3fQDG4Ol6GjWeKIHD85UTF+xgrjHefDxoiennulvU06XPre8/LzEB4iXJdSjeQ599WUVPtt0aVzWL6rlKuin2Rc= 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:(13230040)(1800799024)(36860700013)(376014)(35042699022)(14060799003)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 00:29:57.1349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae860f90-3c71-4e5f-12ce-08dcfd30f9dc 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: AMS0EPF000001B5.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9497 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 This patch finalizes adding support for the generation of SVE simd clones when no simdlen is provided, following the ABI rules where the widest data type determines the minimum amount of elements in a length agnostic vector. gcc/ChangeLog: * config/aarch64/aarch64-protos.h (add_sve_type_attribute): Declare. * config/aarch64/aarch64-sve-builtins.cc (add_sve_type_attribute): Make visibility global and support use for non_acle types. * config/aarch64/aarch64.cc (aarch64_simd_clone_compute_vecsize_and_simdlen): Create VLA simd clone when no simdlen is provided, according to ABI rules. (simd_clone_adjust_sve_vector_type): New helper function. (aarch64_simd_clone_adjust): Add '+sve' attribute to SVE simd clones and modify types to use SVE types. * omp-simd-clone.cc (simd_clone_mangle): Print 'x' for VLA simdlen. (simd_clone_adjust): Adapt safelen check to be compatible with VLA simdlen. gcc/testsuite/ChangeLog: * gcc.target/aarch64/declare-simd-2.c: Add SVE clone scan. * gcc.target/aarch64/vect-simd-clone-1.c: New test. --- gcc/config/aarch64/aarch64-protos.h | 2 + gcc/config/aarch64/aarch64-sve-builtins.cc | 6 +- gcc/config/aarch64/aarch64.cc | 181 +++++++++++++++--- gcc/omp-simd-clone.cc | 13 +- .../gcc.target/aarch64/declare-simd-2.c | 1 + .../gcc.target/aarch64/vect-simd-clone-1.c | 137 +++++++++++++ 6 files changed, 306 insertions(+), 34 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/vect-simd-clone-1.c diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 9be64913091..9b97b5cad40 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -1039,6 +1039,8 @@ namespace aarch64_sve { #ifdef GCC_TARGET_H bool verify_type_context (location_t, type_context_kind, const_tree, bool); #endif + void add_sve_type_attribute (tree, unsigned int, unsigned int, + const char *, const char *); } extern void aarch64_split_combinev16qi (rtx operands[3]); diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index ef14f8cd39d..bd6e61c028c 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -951,14 +951,16 @@ static GTY(()) hash_map *overload_names[2]; /* Record that TYPE is an ABI-defined SVE type that contains NUM_ZR SVE vectors and NUM_PR SVE predicates. MANGLED_NAME, if nonnull, is the ABI-defined mangling of the type. ACLE_NAME is the name of the type. */ -static void +void add_sve_type_attribute (tree type, unsigned int num_zr, unsigned int num_pr, const char *mangled_name, const char *acle_name) { tree mangled_name_tree = (mangled_name ? get_identifier (mangled_name) : NULL_TREE); + tree acle_name_tree + = (acle_name ? get_identifier (acle_name) : NULL_TREE); - tree value = tree_cons (NULL_TREE, get_identifier (acle_name), NULL_TREE); + tree value = tree_cons (NULL_TREE, acle_name_tree, NULL_TREE); value = tree_cons (NULL_TREE, mangled_name_tree, value); value = tree_cons (NULL_TREE, size_int (num_pr), value); value = tree_cons (NULL_TREE, size_int (num_zr), value); diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 1e51d0e3604..324e7825b00 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -29022,7 +29022,7 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, int num, bool explicit_p) { tree t, ret_type; - unsigned int nds_elt_bits; + unsigned int nds_elt_bits, wds_elt_bits; unsigned HOST_WIDE_INT const_simdlen; if (!TARGET_SIMD) @@ -29067,10 +29067,14 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, if (TREE_CODE (ret_type) != VOID_TYPE) { nds_elt_bits = lane_size (SIMD_CLONE_ARG_TYPE_VECTOR, ret_type); + wds_elt_bits = nds_elt_bits; vec_elts.safe_push (std::make_pair (ret_type, nds_elt_bits)); } else - nds_elt_bits = POINTER_SIZE; + { + nds_elt_bits = POINTER_SIZE; + wds_elt_bits = 0; + } int i; tree type_arg_types = TYPE_ARG_TYPES (TREE_TYPE (node->decl)); @@ -29078,44 +29082,65 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, for (t = (decl_arg_p ? DECL_ARGUMENTS (node->decl) : type_arg_types), i = 0; t && t != void_list_node; t = TREE_CHAIN (t), i++) { - tree arg_type = decl_arg_p ? TREE_TYPE (t) : TREE_VALUE (t); + tree type = decl_arg_p ? TREE_TYPE (t) : TREE_VALUE (t); if (clonei->args[i].arg_type != SIMD_CLONE_ARG_TYPE_UNIFORM - && !supported_simd_type (arg_type)) + && !supported_simd_type (type)) { if (!explicit_p) ; - else if (COMPLEX_FLOAT_TYPE_P (ret_type)) + else if (COMPLEX_FLOAT_TYPE_P (type)) warning_at (DECL_SOURCE_LOCATION (node->decl), 0, "GCC does not currently support argument type %qT " - "for simd", arg_type); + "for simd", type); else warning_at (DECL_SOURCE_LOCATION (node->decl), 0, "unsupported argument type %qT for simd", - arg_type); + type); return 0; } - unsigned lane_bits = lane_size (clonei->args[i].arg_type, arg_type); + unsigned lane_bits = lane_size (clonei->args[i].arg_type, type); if (clonei->args[i].arg_type == SIMD_CLONE_ARG_TYPE_VECTOR) - vec_elts.safe_push (std::make_pair (arg_type, lane_bits)); + vec_elts.safe_push (std::make_pair (type, lane_bits)); if (nds_elt_bits > lane_bits) nds_elt_bits = lane_bits; + if (wds_elt_bits < lane_bits) + wds_elt_bits = lane_bits; } - clonei->vecsize_mangle = 'n'; + /* If we could not determine the WDS type from available parameters/return, + then fallback to using uintptr_t. */ + if (wds_elt_bits == 0) + wds_elt_bits = POINTER_SIZE; + clonei->mask_mode = VOIDmode; poly_uint64 simdlen; - auto_vec simdlens (2); + typedef struct + { + poly_uint64 len; + char mangle; + } aarch64_clone_info; + auto_vec clones (3); + /* Keep track of the possible simdlens the clones of this function can have, and check them later to see if we support them. */ if (known_eq (clonei->simdlen, 0U)) { simdlen = exact_div (poly_uint64 (64), nds_elt_bits); if (maybe_ne (simdlen, 1U)) - simdlens.safe_push (simdlen); - simdlens.safe_push (simdlen * 2); + clones.safe_push ({simdlen, 'n'}); + clones.safe_push ({simdlen * 2, 'n'}); + /* Only create a SVE simd clone if we aren't dealing with an unprototyped + function. + We have also disabled support for creating SVE simdclones for functions + with function bodies and any simdclones when -msve-vector-bits is used. + TODO: add support for these. */ + if (prototype_p (TREE_TYPE (node->decl)) + && !node->definition + && !aarch64_sve_vg.is_constant ()) + clones.safe_push ({exact_div (BITS_PER_SVE_VECTOR, wds_elt_bits), 's'}); } else - simdlens.safe_push (clonei->simdlen); + clones.safe_push ({clonei->simdlen, 'n'}); clonei->vecsize_int = 0; clonei->vecsize_float = 0; @@ -29129,11 +29154,12 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, simdclone would cause a vector type to be larger than 128-bits, and reject such a clone. */ unsigned j = 0; - while (j < simdlens.length ()) + while (j < clones.length ()) { bool remove_simdlen = false; for (auto elt : vec_elts) - if (known_gt (simdlens[j] * elt.second, 128U)) + if (clones[j].mangle == 'n' + && known_gt (clones[j].len * elt.second, 128U)) { /* Don't issue a warning for every simdclone when there is no specific simdlen clause. */ @@ -29141,18 +29167,17 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, warning_at (DECL_SOURCE_LOCATION (node->decl), 0, "GCC does not currently support simdlen %wd for " "type %qT", - constant_lower_bound (simdlens[j]), elt.first); + constant_lower_bound (clones[j].len), elt.first); remove_simdlen = true; break; } if (remove_simdlen) - simdlens.ordered_remove (j); + clones.ordered_remove (j); else j++; } - - int count = simdlens.length (); + int count = clones.length (); if (count == 0) { if (explicit_p && known_eq (clonei->simdlen, 0U)) @@ -29169,21 +29194,118 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, } gcc_assert (num < count); - clonei->simdlen = simdlens[num]; + clonei->simdlen = clones[num].len; + clonei->vecsize_mangle = clones[num].mangle; + /* SVE simdclones always have a Mask, so set inbranch to 1. */ + if (clonei->vecsize_mangle == 's') + clonei->inbranch = 1; return count; } -/* Implement TARGET_SIMD_CLONE_ADJUST. */ +/* Helper function to adjust a SVE vector type of a SVE simd clone. Returns a + SVE vector type based on the element type of the vector TYPE, with SIMDLEN + number of elements. If IS_MASK, returns a SVE mask type appropriate for use + with the SVE type it would otherwise return. */ + +static tree +simd_clone_adjust_sve_vector_type (tree type, bool is_mask, poly_uint64 simdlen) +{ + unsigned int num_zr = 0; + unsigned int num_pr = 0; + machine_mode vector_mode; + type = TREE_TYPE (type); + scalar_mode scalar_m = SCALAR_TYPE_MODE (type); + vector_mode = aarch64_sve_data_mode (scalar_m, simdlen).require (); + type = build_vector_type_for_mode (type, vector_mode); + if (is_mask) + { + type = truth_type_for (type); + num_pr = 1; + } + else + num_zr = 1; + /* We create new types here with the SVE type attribute instead of using ACLE + types as we need to support unpacked vectors which aren't available as + ACLE SVE types. */ + type = build_distinct_type_copy (type); + aarch64_sve::add_sve_type_attribute (type, num_zr, num_pr, NULL, NULL); + return type; +} + +/* Implement TARGET_SIMD_CLONE_ADJUST. */ static void aarch64_simd_clone_adjust (struct cgraph_node *node) { - /* Add aarch64_vector_pcs target attribute to SIMD clones so they - use the correct ABI. */ - tree t = TREE_TYPE (node->decl); - TYPE_ATTRIBUTES (t) = make_attribute ("aarch64_vector_pcs", "default", - TYPE_ATTRIBUTES (t)); + cl_target_option cur_target; + bool m_old_have_regs_of_mode[MAX_MACHINE_MODE]; + + if (node->simdclone->vecsize_mangle == 's') + { + /* This is additive and has no effect if SVE, or a superset thereof, is + already enabled. */ + tree target = build_string (strlen ("+sve") + 1, "+sve"); + if (!aarch64_option_valid_attribute_p (node->decl, NULL_TREE, target, 0)) + gcc_unreachable (); + cl_target_option_save (&cur_target, &global_options, &global_options_set); + tree new_target = DECL_FUNCTION_SPECIFIC_TARGET (node->decl); + cl_target_option_restore (&global_options, &global_options_set, + TREE_TARGET_OPTION (new_target)); + aarch64_override_options_internal (&global_options); + memcpy (m_old_have_regs_of_mode, have_regs_of_mode, + sizeof (have_regs_of_mode)); + for (int i = 0; i < NUM_MACHINE_MODES; ++i) + if (aarch64_sve_mode_p ((machine_mode) i)) + have_regs_of_mode[i] = true; + } + else + { + /* Add aarch64_vector_pcs target attribute to SIMD clones so they + use the correct ABI. */ + TYPE_ATTRIBUTES (t) = make_attribute ("aarch64_vector_pcs", "default", + TYPE_ATTRIBUTES (t)); + } + cgraph_simd_clone *sc = node->simdclone; + + for (unsigned i = 0; i < sc->nargs; ++i) + { + bool is_mask = false; + tree type; + switch (sc->args[i].arg_type) + { + case SIMD_CLONE_ARG_TYPE_MASK: + is_mask = true; + gcc_fallthrough (); + case SIMD_CLONE_ARG_TYPE_VECTOR: + case SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP: + case SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP: + type = sc->args[i].vector_type; + gcc_assert (VECTOR_TYPE_P (type)); + if (node->simdclone->vecsize_mangle == 's') + type = simd_clone_adjust_sve_vector_type (type, is_mask, + sc->simdlen); + else if (is_mask) + type = truth_type_for (type); + sc->args[i].vector_type = type; + break; + default: + continue; + } + } + if (node->simdclone->vecsize_mangle == 's') + { + tree ret_type = TREE_TYPE (t); + if (VECTOR_TYPE_P (ret_type)) + TREE_TYPE (t) + = simd_clone_adjust_sve_vector_type (ret_type, false, + node->simdclone->simdlen); + /* Restore current options. */ + cl_target_option_restore (&global_options, &global_options_set, &cur_target); + aarch64_override_options_internal (&global_options); + memcpy (have_regs_of_mode, m_old_have_regs_of_mode, + sizeof (have_regs_of_mode)); + } } /* Implement TARGET_SIMD_CLONE_USABLE. */ @@ -29197,6 +29319,11 @@ aarch64_simd_clone_usable (struct cgraph_node *node, machine_mode vector_mode) if (!TARGET_SIMD || aarch64_sve_mode_p (vector_mode)) return -1; return 0; + case 's': + if (!TARGET_SVE + || !aarch64_sve_mode_p (vector_mode)) + return -1; + return 0; default: gcc_unreachable (); } diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc index 14a37f70948..294a10e87ac 100644 --- a/gcc/omp-simd-clone.cc +++ b/gcc/omp-simd-clone.cc @@ -542,9 +542,12 @@ simd_clone_mangle (struct cgraph_node *node, pp_string (&pp, "_ZGV"); pp_character (&pp, vecsize_mangle); pp_character (&pp, mask); - /* For now, simdlen is always constant, while variable simdlen pp 'n'. */ - unsigned int len = simdlen.to_constant (); - pp_decimal_int (&pp, (len)); + + unsigned HOST_WIDE_INT len; + if (simdlen.is_constant (&len)) + pp_decimal_int (&pp, (int) (len)); + else + pp_character (&pp, 'x'); for (n = 0; n < clone_info->nargs; ++n) { @@ -1534,8 +1537,8 @@ simd_clone_adjust (struct cgraph_node *node) below). */ loop = alloc_loop (); cfun->has_force_vectorize_loops = true; - /* For now, simlen is always constant. */ - loop->safelen = node->simdclone->simdlen.to_constant (); + /* We can assert that safelen is the 'minimum' simdlen. */ + loop->safelen = constant_lower_bound (node->simdclone->simdlen); loop->force_vectorize = true; loop->header = body_bb; } diff --git a/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c b/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c index e2e80f0c663..2f4d3a866e5 100644 --- a/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c +++ b/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c @@ -43,6 +43,7 @@ float f04 (double a) } /* { dg-final { scan-assembler {_ZGVnN2v_f04:} } } */ /* { dg-final { scan-assembler {_ZGVnM2v_f04:} } } */ +/* { dg-final { scan-assembler-not {_ZGVs[0-9a-z]*_f04:} } } */ #pragma omp declare simd uniform(a) linear (b) void f05 (short a, short *b, short c) diff --git a/gcc/testsuite/gcc.target/aarch64/vect-simd-clone-1.c b/gcc/testsuite/gcc.target/aarch64/vect-simd-clone-1.c new file mode 100644 index 00000000000..b33541cc329 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-simd-clone-1.c @@ -0,0 +1,137 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c99" } */ +/* { dg-additional-options "-O3 -march=armv8-a" } */ +/* { dg-final { check-function-bodies "**" "" "" } } */ + +/* Ensure correct creation of SVE Vector-length agnostic (VLA SVE) vector + function calls from scalar versions in accordance with the Vector Function + Application Binary Interface Specification for AArch64 (AAVPCS). + + We check for correctness in: + - Vector function name mangling, with the grammar: + + vector name := prefix "_" name + prefix := "_ZGV" isa mask + + Whereby: + - := "s" for SVE + - := "M" for Mask + - := "x" for VLA SVE + + resulting in: + := "_ZGVsMx" + + with each vector parameter contributing a "v" to the prefix. + + - Parameter and return value mapping: + - Unless marked with uniform or linear OpenMP clauses, parameters and + return values are expected to map to vectors. + - Where the lane-size of a parameter is less than the widest data size + for a given function, the resulting vector should be unpacked and + populated via use extending loads. + + - Finally, we also make sure we can correctly generate calls to the same + function, differing only in the target architecture (i.e. SVE vs SIMD), + ensuring that each call points to the correctly-mangled vector function + and employs the correct ABI. For example, for `fn' we may expect: + + for #pragma GCC target("+sve"): _ZGVsMxvv_fn + for #pragma GCC target("+simd): _ZGVnN4vv_fn */ + +#pragma GCC target ("+sve") +/* scan-assembler {_ZGVsMxv_fn0} } } */ +extern int __attribute__ ((simd, const)) fn0 (int); +void test_fn0 (int *a, int *b, int n) +{ + for (int i = 0; i < n; ++i) + a[i] += fn0 (b[i]); +} + +/* +** test_fn1: +** ... +** ld1w z1\.s, p7/z, \[x22, x19, lsl 2\] +** ld1h z0\.s, p7/z, \[x23, x19, lsl 1\] +** mov p0\.b, p7\.b +** bl _ZGVsMxvv_fn1 +** st1w z0\.s, p7, \[x21, x19, lsl 2\] +** ... +*/ +extern int __attribute__ ((simd, const)) fn1 (short, int); +void test_fn1 (int *a, int *b, short *c, int n) +{ + for (int i = 0; i < n; ++i) + a[i] = fn1 (c[i], b[i]); +} + +/* +** test_fn2: +** ... +** ld1w z1\.s, p7/z, \[x23, x19, lsl 2\] +** ld1h z0\.s, p7/z, \[x22, x19, lsl 1\] +** mov p0\.b, p7.b +** bl _ZGVsMxvv_fn2 +** st1h z0\.s, p7, \[x21, x19, lsl 1\] +** ... +*/ +extern short __attribute__ ((simd, const)) fn2 (short, int); +void test_fn2 (short *a, int *b, short *c, int n) +{ + for (int i = 0; i < n; ++i) + a[i] = fn2 (c[i], b[i]); +} + +/* +** test_fn3: +** ... +** ld1b z23\.s, p7/z, \[x22, x19\] +** ld1w z0\.s, p7/z, \[x23, x19, lsl 2\] +** ptrue p6\.b, all +** mov p0\.b, p7\.b +** mov z1\.d, z23\.d +** uxtb z23\.h, p6/m, z23\.h +** bl _ZGVsMxvv_fn3 +** uxtb z0\.h, p6/m, z0\.h +** add z0\.h, z0\.h, z23\.h +** uxth z0\.s, p6/m, z0\.s +** st1w z0\.s, p7, \[x20, x19, lsl 2\] +** ... +*/ +extern char __attribute__ ((simd, const)) fn3 (int, char); +void test_fn3 (int *a, int *b, char *c, int n) +{ + for (int i = 0; i < n; ++i) + a[i] = (int) (fn3 (b[i], c[i]) + c[i]); +} + +/* +** test_fn4: +** ... +** ld1h z23\.s, p7/z, \[x23, x19, lsl 1\] +** ld1w z0\.s, p7/z, \[x22, x19, lsl 2\] +** mov p0\.b, p7\.b +** mov z1\.d, z23\.d +** ptrue p6\.b, all +** bl _ZGVsMxvv_fn4 +** sxth z23\.s, p6/m, z23\.s +** sxth z0\.s, p6/m, z0\.s +** add z0\.s, z0\.s, z23\.s +** st1w z0\.s, p7, \[x21, x19, lsl 2\] +** ... +*/ +extern short __attribute__ ((simd, const)) fn4 (int, short); +void test_fn4 (int *a, int *b, short *c, int n) +{ + for (int i = 0; i < n; ++i) + a[i] = (int) (fn4 (b[i], c[i]) + c[i]); +} + +#pragma GCC reset_options +#pragma GCC target ("+simd") +/* scan-assembler {_ZGVnN4vv_fn4} } } */ +extern short __attribute__ ((simd, const)) fn4 (int, short); +void test_fn5 (int *a, int *b, short *c, int n) +{ + for (int i = 0; i < n; ++i) + a[i] = (int) (fn4 (b[i], c[i]) + c[i]); +} From patchwork Tue Nov 5 00:32:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Do Nascimento X-Patchwork-Id: 2006588 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=Y66mFqF2; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Y66mFqF2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Xj8Sp65Hsz1xxb for ; Tue, 5 Nov 2024 11:33:14 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 241133857711 for ; Tue, 5 Nov 2024 00:33:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on20625.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::625]) by sourceware.org (Postfix) with ESMTPS id 2FA9A3857B8F for ; Tue, 5 Nov 2024 00:32:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FA9A3857B8F 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 2FA9A3857B8F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::625 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766759; cv=pass; b=Ko9HkqbYf6zmiAWEP2Xam3mph1PJioDmE5pJMN0XRMxfAIJbK3bblX5z0PnxTD5t+us02225L+UlpV2hnxU9kj65VXpPJ7n9sZklgpo2RnAFKg10Xx58u8nuM4q86N32mWc37C8VEzHtGGH3wWQEzIeh03DjotH9QbRVsLrGxkE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730766759; c=relaxed/simple; bh=3/hDIg/gi8tQxGv5Kp8Z4yCI7goyhYCn+IDKfgK+TNs=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Message-ID:Date: MIME-Version; b=RouAceA2623prc/rJ4Vc9KiXpaDQKC+JQScXyXFvZk7duAy1OZLEB/FwiAzGIUr44NYml5muWfn/mP/n9o3FNilKyvU3Yio+Z82GWBwjuMxMpPOBn4UdMXn78NqdZbw6XW/3vhy3Yczy0sAtKzly21TrIePs8ujdTkK8g4QCwik= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=mRsxhB4ofYz8/Y7YCCBSU7uYR3epIkhj2PYOFgZPTWlNpy4EjqPJroTf7c6x/lvVBOxf3DAXtUEwzp6up81WFxZ5Mv3Ljbg34MWxhz5Kx1hQH9iBRqsieNAW+GByhiSs0UEhR8QGXNtzZT+GRT125vzlU7ZBAtizdejkA46Xn+OJUBrosbvzQFa4+aazes+uOIoz1mM7CEL9qlzLDPfYqV2iQvC6/VpsT+3haLfnXk6W2TCvTKy5krPz43JfCnwLpF+lGoWglXy98peDk3QOyH/sQhQwmVXOZI88DsKEE421E5eG8Zwha2QLD0kozEoVQiGeJnaJhrZf4FTiOAdj/A== 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=z8WRj+dcpb1FukV+x2xKvIqGnRAjJRpDh7zV8yI+M0Q=; b=M8iuWBvFPrqq/Q8k1zEhjpyKWwyKQWew5wWW5oGiOQD1v0PeI7JJwr+LYSk77OvjbaOG0nlee3E1SdtDQ7JwqboGZtAvWmyok6mfxwLJZRpfHpBer2f/vZOXQCnndO9lnjQGCWxrce8bM4rr/pceL5hYMlZrrbdb1msZ7zLXOEsBN9T5kM2HwNyVu/WKpVnuwsWEqkmcBIdhYHDiFjE3D++FlaTMl+jJsHo6t4s1LOqfU0+q9akq0v6bg6yCD2Ft87jFfk5gEmdY0hbIVRlNHwwYVSei+YzslEkVkZgFhcms3i4wirHMSOapTuSzt1rjq6XmgZyxQ+f766aLbZ/BJA== 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=z8WRj+dcpb1FukV+x2xKvIqGnRAjJRpDh7zV8yI+M0Q=; b=Y66mFqF2Wb2HPcFJ7wejRmZOC0gQFDDB1kEJv6Xjxh4f1h1U9bKo7slEQgqM0KmecDgDw3HSLtYDO2o5vB7axMnvk5rQScVsZfKCYZVLCNvWZiNiELwsKyY+pHcqDLgw7nOjj89oj+7vdG/PvAOtlJPYLd6aXK425xSij6naa5o= Received: from DB7PR05CA0039.eurprd05.prod.outlook.com (2603:10a6:10:2e::16) by AS8PR08MB10346.eurprd08.prod.outlook.com (2603:10a6:20b:57e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31; Tue, 5 Nov 2024 00:32:28 +0000 Received: from DB5PEPF00014B8C.eurprd02.prod.outlook.com (2603:10a6:10:2e:cafe::75) by DB7PR05CA0039.outlook.office365.com (2603:10a6:10:2e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30 via Frontend Transport; Tue, 5 Nov 2024 00:32:27 +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 DB5PEPF00014B8C.mail.protection.outlook.com (10.167.8.200) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:32:27 +0000 Received: ("Tessian outbound 4a86a9c66651:v490"); Tue, 05 Nov 2024 00:32:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 60bd29971df97887 X-TessianGatewayMetadata: ELJM9NQlTztFhWsn8HlGYizIzLQTyftYCQgtxMJs8j6UPJmW6VjjlhW2lTT/i+rvzANVZ0EXRw9d6/gvhIiBcp+CRXIqam0cXwK61QvZeaoLgUNnP0WqE6yb+8vljMaZuNh/FIQhzKYA4cVVAmZ+MQ== X-CR-MTA-TID: 64aa7808 Received: from Lfa7884c354c6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2972E6FE-A084-4377-97DA-6C4FADF373C1.1; Tue, 05 Nov 2024 00:32:21 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lfa7884c354c6.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 05 Nov 2024 00:32:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FbeYS0yyMYDD+PTxp6AQNT2gwVD+EyHnUhvupqbj7T1is323frB99l2sKz5oKRfAm8ogjeki4PIAh7bmLSdE3/Bszuz1LhfLVvVCiORyxtD5HnuT4crjtzZEkkE3m1UIq4cfw7m9DQODIvm8dmHKrqGgJUbNwE7RfgVQUDi0iWyG3SmQU/SMI99WANExHFuITC5rUuGSnjVpuGM0dIJvagsDLDsf/ZMrou1oophWQMUr1yjRdZmIytc1dw8C6IwCo9MAnggVVgWJOSL908ZQgSnqXWMrwN7PLwsbJRctkc/4IP7CluLaoH6HsdrFodbelXyeLGnpLl5T5nzarwHQYQ== 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=z8WRj+dcpb1FukV+x2xKvIqGnRAjJRpDh7zV8yI+M0Q=; b=x8GfPCandoO5tetjK18P+CLhaK4OKs0McwFodLZ84cJw4AGfSJwvgoVYvmciju5+jjExDw3mvRpz3nqkrzmfxGMjHmOZDMFEJxQVLoKcC8dsFE2D1FWgTjqyOw2H1bTDkT7E9+qi1wQctfDPDCwZavAW6z7ME1zScdfdlPCQMBMzyHhBRp+YRRtld7huFD+UKpZNeMWrXLZNY5zi6WXCVzZviQ2dI/QQigjlbE4VQGVFVhC9yy72XDErlFJ8I49RvkPTFztpZVYRsgSnXanHoNyzo2A1YoSm0KLvDuxH2/kpsKem5VYLiJL21QEN3590jRl9h06pyJ+WYMz4zkz+dQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=rehdat.com 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=z8WRj+dcpb1FukV+x2xKvIqGnRAjJRpDh7zV8yI+M0Q=; b=Y66mFqF2Wb2HPcFJ7wejRmZOC0gQFDDB1kEJv6Xjxh4f1h1U9bKo7slEQgqM0KmecDgDw3HSLtYDO2o5vB7axMnvk5rQScVsZfKCYZVLCNvWZiNiELwsKyY+pHcqDLgw7nOjj89oj+7vdG/PvAOtlJPYLd6aXK425xSij6naa5o= Received: from MW4PR04CA0269.namprd04.prod.outlook.com (2603:10b6:303:88::34) by VI1PR08MB10122.eurprd08.prod.outlook.com (2603:10a6:800:1c8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 00:32:18 +0000 Received: from DU2PEPF0001E9BF.eurprd03.prod.outlook.com (2603:10b6:303:88:cafe::32) by MW4PR04CA0269.outlook.office365.com (2603:10b6:303:88::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31 via Frontend Transport; Tue, 5 Nov 2024 00:32:16 +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 DU2PEPF0001E9BF.mail.protection.outlook.com (10.167.8.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 00:32:16 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 00:32:09 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 00:32:09 +0000 Received: from e133397 (10.57.66.241) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 5 Nov 2024 00:32:09 +0000 From: Victor Do Nascimento To: CC: , , Subject: [PATCH v2 4/4] vect: Disable `omp declare variant' tests for aarch64 In-Reply-To: (Victor Do Nascimento's message of "Tue, 5 Nov 2024 00:05:44 +0000") Message-ID: References: Date: Tue, 5 Nov 2024 00:32:07 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9BF:EE_|VI1PR08MB10122:EE_|DB5PEPF00014B8C:EE_|AS8PR08MB10346:EE_ X-MS-Office365-Filtering-Correlation-Id: a87fa672-c237-4708-3ba7-08dcfd3153a8 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|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info-Original: 4lttam7+F4FhZTEthLpdfPVfsqXvQLGUyUoNOLeuzuCCwUfgQf30galOwkvMePB3oMvX51bEdIivbHLVLRLCQ9JTCL1jSo5D9AcdFcjcXrkh11PmkgEXGHRrAgSLPtcMDqLVUP1uHE3oYSdzBzVz7xVuPwS38ur8JgDFe6YVMEMr5PrF+VlCeuRWHmQLImahobJ5yWt4ZUbG5PRR6BzFVa3J07mqTcn7Lg/KJSCHEALxeoc6rGA5Ac1O39OeQCCmQPeFwvN+glsaGWJRqgHJJRoW5GnjAY113YMVuuLMGqOjZ5TwKD20n8E8UO0OFfCiKwhgupEBZ271FpvhA6a0VVKEyBrkOrtiIoflhmNSI3Un85dJa8bydgu8BOe8En/0CfWJx0v8OAUA2DeDEr9BHLJUFK+ui8wnCK1iEGYopbXB42gZqdIkS1NuR15AlcOqUd5kXeQkOfeahzx3T1Bj89G680B6f7Ek+86WwUr+8y3cBKgGqWfj2IEe6IT8bNrUkUA9/R82TB9BsbXeDbWro6PKbah+ACbDEWjDHzPvUVfSoxP+v674AM9tOpx0QKSuKb6EeG+qj+76hcpKt93RkcTR5ZxGUs84FUf7+gGavfzVZiSmyd3vD0AUnbAxsVVPJEHeIWn7Pnvw7X629SLu6GzmzoaK8ldjWmQ4YAkji/xotzh33pYqP2UgBO2gWyLLlvayozLKP/ldPxkw0ziqW5bTOv0C7mF7nnJQl8U63QAgonPruwxmYWqZ07/2XMFXRkvbQCV0M00SDfNtf/1F35eYHVOuPrILZCSXZ6zBT9N3gMSAqCCeiEi/7Yo9mpoRIQyuQ0GjihvEHUbkpqQkaUG6B/gBmQZyIGJJT+vPv5xSUTLxaX7cUKCs1P6ItLhAbz98jI++XcHlCi+pbJC48/3vF7OjRteGfygYIwa5yP36cGbRtHGX2DzRiMn95dElOSbjyZa0PYtqbzwdIC2yD3LU/EuPixmu70mJCI8WEsF+6vrw+J5QUEsR0FbFmpl7f/014GNh9LiDqh2RmSSfNejlf3YLt4MIycwQESB82IIJS8zoxmsJ8WwHmw2d6Fu0eDWZgrC9QC/kOnhVOJFJPGlB63OvM0DnxA49Yn8l+oUbmxYRKJIQ+ptML8fjmSMvjuUZ1ELeyNiosOfkAEGELo0cY7BH05pG2KVJU6ODyXtiYitGBcYpOrJ4tzHVchZyeeUlwVyPxfp1xJrmjZxM2mrOM8LR6PgeeQZvFDtMHZvBh3oPzq+d7eTCSNx/sbZzJIJkDJmZTE3KtdI801QmsQnHKh5/mDxctz/0lwz7HrjilCGTOIcHioOpN+wZxhFUnWWDNlXnOMu992re5xFrJM6jUiME7WpXXVrKJVaTvl0= 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)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10122 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10b6:303:88::34]; domain=MW4PR04CA0269.namprd04.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B8C.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b242def3-5455-4f3b-e04f-08dcfd314c9d X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|36860700013|376014|1800799024|82310400026|14060799003; X-Microsoft-Antispam-Message-Info: EB750HeMWmTMeTawl1l9drbXOgchKf6iYvNZ4lqaWCvURso31QDHPUwmGj8YND/tQl2BBF2w405BnLr+QDK3DMWBFcROUklWvZLm5LBQTiwycfl5MmCyUQzwJPAUv7ZKvoaZ6d07KECqTjSrF2o4aEymUla0qcAJDLTHHnp2OezTzAPj69Zl3D6X3izsKBLU/1MB0FrKWkrlWlDkWzYnNPBcEG2AUNQ8wUoKB3ITJ6ir+58CfDk/GvZUdMhgCW201q0J+P4G7kxVOzxAfjF1/GgtTPKoi7kqW6RgZh2Z6hFTb9VAUF0YCEA6RA3kjfLH/rtP0EABPGx8h/ZZo8bPVt0fgoWvx2CSJVmnPgPSCT1DdnugexgU/w5w228fboXAHOrHdjZhwxi7q7vHpwy4evPFDdeOwEq40RI/2/IhnHHrHu4Zmg5HABvENL9Qjywl/VCMhiORvcIyWuz2rcvDW5WICZKuQoCTenWPzu9wEk/SSufIMbIcwEQOkrV+g4991D50Rx7Y8ETZkgdGyeega8ChH8gT7g4VkJfsI1Ql7XSEtgY++eS1G6HdhGZtYobs+sVok+obvsLcIPKpMjaBSKFjVSsAmIjtNiJswH9IGwKlRClBgfoC1xMWOZ9U9A6YxHpn+Vd21RdkVacwDQ53oHkKIruEyCOjyr31IcA9VhrV1j5LeEFPBg+6cia9aNJKKiDb5rCDSYr0pEq8LoeSlqPrbv/31Z4KhZa33QAzk6pIVmjWVd+AhqpY9zv5IEsPTyp8rcx8wE3vwqpECCNhqMP4dhic9jjYu/cu6lwbgFpzDpM7jhwY1NpVZVkrARIPYg/rGhFkPPEDHh//eUcAGyYuPVVoBWElYStouVSu/G7iRckKEfoebb7lTa+9xI+Q+uQCba7wQJMoktNxvri9mwBRztK1XfVX27zaXwIKS/gr+n7+4cIexxz23R/o6/Ef7tVohGVlaY3yzCuPi8NqpaP59lUkEKDfdgyu6ljwa9USnBU4eZ8PJYzdlzVBiiQXeSGhtnZisDFYTYIfZsKW8J6j6tQBCcNBg8/8nl1CYZSn9SynF+58rQHW7ICuXe9EZPnA2wOnHyXZf+0wAB87EiSCJjte8jm5MSsht/yMhDtwsY7QhUwPfavkmxHzUTW55CYq8tso85FLa+yrf+VhXUC8c5yuyCh2lFjRQlpV32qtrxgt8NUxpeo44Zsk2bP1tPWUX+tKnCmiIrpv/xgQZPwCJRc9hWDAXkexZ53WB1CSywc0OlRs0l3TqhosMzIqd216ibQ13GFrVyAoXsgvw24V2xgsKD9QtGH3sp7IKiOdRWSaXccZhJ04k/hzokU8unJVrRrXO1LjsFq76Xl+zyXZBoClEiK2LUgknXhpTnM= 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:(13230040)(35042699022)(36860700013)(376014)(1800799024)(82310400026)(14060799003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 00:32:27.8370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a87fa672-c237-4708-3ba7-08dcfd3153a8 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: DB5PEPF00014B8C.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10346 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 gcc/testsuite/ChangeLog: * c-c++-common/gomp/declare-variant-14.c: Make i?86 and x86_64 target only test. * gfortran.dg/gomp/declare-variant-14.f90: Likewise. --- gcc/testsuite/c-c++-common/gomp/declare-variant-14.c | 12 +++++------- .../gfortran.dg/gomp/declare-variant-14.f90 | 10 ++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-14.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-14.c index e3668893afe..2b71869787e 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-14.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-14.c @@ -1,6 +1,6 @@ -/* { dg-do compile { target vect_simd_clones } } */ +/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && vect_simd_clones } } } */ /* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } */ -/* { dg-additional-options "-mno-sse3" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-mno-sse3" } */ int f01 (int); int f02 (int); @@ -15,15 +15,13 @@ int test1 (int x) { /* At gimplification time, we can't decide yet which function to call. */ - /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" { target { !aarch64*-*-* } } } } */ + /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" } } */ /* After simd clones are created, the original non-clone test1 shall call f03 (score 6), the sse2/avx/avx2 clones too, but avx512f clones shall call f01 with score 8. */ /* { dg-final { scan-tree-dump-not "f04 \\\(x" "optimized" } } */ - /* { dg-final { scan-tree-dump-times "f03 \\\(x" 14 "optimized" { target { !aarch64*-*-* } } } } */ - /* { dg-final { scan-tree-dump-times "f03 \\\(x" 10 "optimized" { target { aarch64*-*-* } } } } */ - /* { dg-final { scan-tree-dump-times "f01 \\\(x" 4 "optimized" { target { !aarch64*-*-* } } } } */ - /* { dg-final { scan-tree-dump-times "f01 \\\(x" 0 "optimized" { target { aarch64*-*-* } } } } */ + /* { dg-final { scan-tree-dump-times "f03 \\\(x" 14 "optimized" } } */ + /* { dg-final { scan-tree-dump-times "f01 \\\(x" 4 "optimized" } } */ int a = f04 (x); int b = f04 (x); return a + b; diff --git a/gcc/testsuite/gfortran.dg/gomp/declare-variant-14.f90 b/gcc/testsuite/gfortran.dg/gomp/declare-variant-14.f90 index 6319df0558f..8db341fd153 100644 --- a/gcc/testsuite/gfortran.dg/gomp/declare-variant-14.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/declare-variant-14.f90 @@ -1,6 +1,6 @@ -! { dg-do compile { target vect_simd_clones } } +! { dg-do compile { target { { i?86-*-* x86_64-*-* } && vect_simd_clones } } } */ ! { dg-additional-options "-O0 -fdump-tree-gimple -fdump-tree-optimized" } -! { dg-additional-options "-mno-sse3" { target { i?86-*-* x86_64-*-* } } } +! { dg-additional-options "-mno-sse3" } module main implicit none @@ -40,10 +40,8 @@ contains ! call f03 (score 6), the sse2/avx/avx2 clones too, but avx512f clones ! shall call f01 with score 8. ! { dg-final { scan-tree-dump-not "f04 \\\(x" "optimized" } } - ! { dg-final { scan-tree-dump-times "f03 \\\(x" 14 "optimized" { target { !aarch64*-*-* } } } } - ! { dg-final { scan-tree-dump-times "f03 \\\(x" 6 "optimized" { target { aarch64*-*-* } } } } - ! { dg-final { scan-tree-dump-times "f01 \\\(x" 4 "optimized" { target { !aarch64*-*-* } } } } - ! { dg-final { scan-tree-dump-times "f01 \\\(x" 0 "optimized" { target { aarch64*-*-* } } } } + ! { dg-final { scan-tree-dump-times "f03 \\\(x" 14 "optimized" } } + ! { dg-final { scan-tree-dump-times "f01 \\\(x" 4 "optimized" } } a = f04 (x) b = f04 (x) test1 = a + b