From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2047.outbound.protection.outlook.com [40.107.6.47]) by sourceware.org (Postfix) with ESMTPS id 52B993858D37 for ; Thu, 29 Jun 2023 18:24:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52B993858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TW4/mGBY/9HPTLWwTxyyvCj4MAbVN/DbDbuXo7VZukY=; b=HqtEvLFkBw8+JFqfDOKAYHTYbILQEp7cjcMiiyap1vPRbux/UFlajrVlhtcTpNyjfkL6CArDxLWMWnHAE2wdeH+8Tr1VZFe2XrPWN77g3ntOr+R1mGDmoGOJys/+3y520WkiN3C0xflwaRgH7NWA6rlbGnhRpOXe3fcwUZlPDtk= Received: from DBBPR09CA0047.eurprd09.prod.outlook.com (2603:10a6:10:d4::35) by AS8PR08MB7720.eurprd08.prod.outlook.com (2603:10a6:20b:508::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Thu, 29 Jun 2023 18:24:18 +0000 Received: from DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::67) by DBBPR09CA0047.outlook.office365.com (2603:10a6:10:d4::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Thu, 29 Jun 2023 18:24:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT048.mail.protection.outlook.com (100.127.142.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Thu, 29 Jun 2023 18:24:18 +0000 Received: ("Tessian outbound c08fa2e31830:v142"); Thu, 29 Jun 2023 18:24:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 162ea3376db386a3 X-CR-MTA-TID: 64aa7808 Received: from e95a34c0fb62.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B4BF6A96-1488-4E51-A256-8657FCA79CDF.1; Thu, 29 Jun 2023 18:24:11 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e95a34c0fb62.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 29 Jun 2023 18:24:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWP9ANKBxZzJ0CNWisBNciiOlzb3D/zt2CZaJp1bCaA5tTwTu6glag9K1m3qdOQxRt9/udzFvfMu67ln5p5KVzRdQM/DfVY8Y4TgfaXoFoxUBrGxvdf/c3uDd/q3fpMixqTdXbimigS/oGmcE9h/IQaq6i93pd/NHxxsCXc5a16jUZWNfAZxQ3JfEYk4NfJDMaw16spKuFxUKJNkYNOsSdz0abH+8fK0qmjwe9lqQRnXPWFFzrNfeT25eZC4buNlVv12B1gegCwixm5W+bsY7SQkmoCb4Z15Q442UjfsPiLEKFM2g8Diyk+2QMxxXEg+M0P7i9M3vui2Oo/RxLdqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TW4/mGBY/9HPTLWwTxyyvCj4MAbVN/DbDbuXo7VZukY=; b=VxTFP4oGEiuKbFXLTI+bZo/zwtN22ekFTfUj9FKF5uNH3nYguXSVPTlGZ4Eg6TLC+brhaSi+v+Mtzwb4kz/P2D92vVb0HB9ik+bfWB5mPk0YLQoRIBTWwtSh3UCDkA2x0MyFo9hqU6a6REOmQ60LMdWRxrMvWuDiXWv4cyIW5+OoBrGi1lyMh9h21n0JW5l5phjHchzGKRi0jsXvuVoHgV19iPR9IqRLotn7wANf6L81yrRVJ9IaqZ6MmA8v21otmOVH9KplpfE3+rxiryHF+Y0O4m3iHQUOQFRTkJO+L/zb6cHcRH0gbn+DaakQbMqjffniv8ozJy47urppctv5kA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TW4/mGBY/9HPTLWwTxyyvCj4MAbVN/DbDbuXo7VZukY=; b=HqtEvLFkBw8+JFqfDOKAYHTYbILQEp7cjcMiiyap1vPRbux/UFlajrVlhtcTpNyjfkL6CArDxLWMWnHAE2wdeH+8Tr1VZFe2XrPWN77g3ntOr+R1mGDmoGOJys/+3y520WkiN3C0xflwaRgH7NWA6rlbGnhRpOXe3fcwUZlPDtk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by GV1PR08MB8177.eurprd08.prod.outlook.com (2603:10a6:150:93::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 29 Jun 2023 18:24:09 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::bcf:d5c1:39d2:8c41]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::bcf:d5c1:39d2:8c41%5]) with mapi id 15.20.6544.019; Thu, 29 Jun 2023 18:24:09 +0000 Date: Thu, 29 Jun 2023 19:24:06 +0100 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [PATCH] aarch64: Remove architecture dependencies from intrinsics Message-ID: References: <98b3efca-4c1c-7797-022c-0be09087d086@e124511.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P265CA0169.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:312::6) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|GV1PR08MB8177:EE_|DBAEUR03FT048:EE_|AS8PR08MB7720:EE_ X-MS-Office365-Filtering-Correlation-Id: 3dcc3222-b1dc-4ea4-a08e-08db78ce0d71 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Uo9FU97HG0oSLFkeXRGdn8vjcDdMhPJlKYDLpRl9gUHYJkb2AXFb5DNK2wdbfY5DBLpg6nXQ2V97oPjrnd4GpmPy5p+EZLugE2JG9u+I2yFSEq3MlGjI2vz9m1PW7oMB/LEvFO72noHijha8l7uCxJZ/xuJTdm5dajNXkm47VBIhXCUNEcOO2whi7u8NFut5FYJ5yCXaL+FWwQLzrWxBxroAUtZNpzXJrtffrdmQFsEMWLLnBCs06rdPk1rpuC8e9aBiwFn4sRIYt5Mh5B8QU704a1jxUiXxK0G4PYOmVRhMLizh/RvHtf1/MeljWzj1VeTDvCY/1vYoFha25o+j60ULiGfl30SCRZfNWS1TPmKnN2lbx2rF20oMvgPptupqBKjWZBxcLByPz367Gp2FdPGCE/XsvCYBfh0+lZYd9Kv9ASTvWOP9+DODO8Y0iFq9LDeCN/75G952iwyZUU9NgHyikknKQKCSK4Ldb+PYk8cRBxBXK1cz2we0UJOQ779jxPfxv0xC3H4W9O6yuO8kwi9P4Xt7q1fv4wCO06chVDY= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6678.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(376002)(136003)(366004)(39860400002)(451199021)(26005)(86362001)(41300700001)(6486002)(6666004)(6506007)(478600001)(186003)(6512007)(2906002)(44832011)(66556008)(38100700002)(66476007)(66946007)(31696002)(5660300002)(6636002)(8936002)(8676002)(316002)(84970400001)(31686004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8177 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 356f2c01-ab6a-4c89-2b82-08db78ce07b2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9jCbp0ab1m74RKWKOB4I7aYCjkPIdCykCbfpt1yOpodU3+IgUQvJbUcYINJzy52HR4BGHzx8m+CoTJhhSD7kwabrO/uWtpyWHPeiwX1Gu0F6IKPiB046OoKw929QXxIsmW0vmLNbK2AhhjQeiX/lPSbJjiHoMMOQUiBMlOdPMZMNYon1sCss7LpB7fIY1rsWUs/6r31A6xV25jYEq6R/tBhcx+n71nlKcntXURcilVKVRQkKqfBYEbmPcmk3RIKHjsEhRx//ww4rFeqeNGetNnDFswQbXmdFcrDoT3vE5q4om1D37ut5vQMd4sgo/S5pkiti1mMOk0zqW5+extazKiigUk0DDUHHbm3R/q6g8W5h4KkGccRqnJQsvRQ5j0CwibrgNhGnqjXc2w007FlfdjbZUKZm+Q5lYy81l9v9L5f2iUvb7MUCp274+pipBo1Lb6hy4LdQlrw0+Kt1C+QT+2Q/0HjOfVpP1ibB0DiOl2sxBOpAm35A65UdQXnOdvSJ73S3BEtLbdfF5E+9x17tN7K2sM7VQEGjyEUU4DDwD/c7y7Jzau6/Xzu2Tr8OTpb3QNyGRbXLqQJJhEFgYYooQHyfbvObMMRvBBRzbzfax7VJApOMcwIfHqJzxXa877dVG9RqLAJvo/SYwCckMs6KSl6gS2MR/rDQfaccSwilv9/ogAXhhzxbU+fvF/CVpcyYo72hshQH5kfO0RT/Hi0j/R8zyB66r0xiq4Dtbr8rkYY= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(136003)(346002)(396003)(451199021)(40470700004)(36840700001)(46966006)(40460700003)(41300700001)(6512007)(316002)(47076005)(82310400005)(336012)(86362001)(31696002)(36860700001)(186003)(44832011)(6506007)(26005)(2906002)(82740400003)(356005)(81166007)(40480700001)(5660300002)(8676002)(8936002)(84970400001)(6636002)(31686004)(70586007)(478600001)(6486002)(70206006)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 18:24:18.7203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3dcc3222-b1dc-4ea4-a08e-08db78ce0d71 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: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7720 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Jun 27, 2023 at 07:23:32AM +0100, Richard Sandiford wrote: > Andrew Carlotti via Gcc-patches writes: > > Many intrinsics currently depend on both an architecture version and a > > feature, despite the corresponding instructions being available within > > GCC at lower architecture versions. > > > > LLVM has already removed these explicit architecture version > > dependences; this patch does the same for GCC, as well as removing an > > unecessary simd dependency for the scalar fp16 intrinsics. > > > > Binutils does not support all of these architecture+feature combinations > > yet, but this is an existing problem that is already reachable from GCC. > > For example, compiling the test gcc.target/aarch64/usadv16qi-dotprod.c > > with -O3 -march=armv8-a+dotprod has resulted in an assembler error since > > GCC 10. I intend to patch this in binutils. > > > > This patch retains explicit architecture version dependencies for > > features that do not currently have a separate feature flag. > > > > Ok for master, and backport to GCC 13? > > > > gcc/ChangeLog: > > > > * config/aarch64/aarch64.h (TARGET_MEMTAG): Remove armv8.5 > > dependency. > > * config/aarch64/arm_acle.h: Remove unnecessary armv8.x > > dependencies from target pragmas. > > * config/aarch64/arm_fp16.h (target): Likewise. > > The change to this file is a bit different from the others, > since it's removing an implicit dependency on +simd, rather > than a dependency on an architecture level. I think it'd be > worth mentioning that explicitly in the changelog. > > OK with that change, thanks. > > (Arguably we should add +nosimd to many of the other pragmas in > arm_acle.h, but that's logically a separate patch.) > > Richard Actually, I think I should just remove the +nosimd from the patch, because +fp16 doesn't enable simd (unlike +bf16, which has simd as an 'explicit on' implication). Aside from +bf16, the only other feature with simd as an 'explicit on' is +rdma. However, there appear to be no non-simd rdma instructions, so +nothing+rdma+nosimd is effectively the same as +nothing. > > ... > > > > diff --git a/gcc/config/aarch64/arm_fp16.h b/gcc/config/aarch64/arm_fp16.h > > index a8fa4dbbdfe1bab4aa604bb311ef66d4e1de18ac..84b2ed66f9ba19fba6ccd8be33940d7239bfa22e 100644 > > --- a/gcc/config/aarch64/arm_fp16.h > > +++ b/gcc/config/aarch64/arm_fp16.h > > @@ -30,7 +30,7 @@ > > #include > > > > #pragma GCC push_options > > -#pragma GCC target ("arch=armv8.2-a+fp16") > > +#pragma GCC target ("+nothing+fp16+nosimd") > > > > typedef __fp16 float16_t; > >