| Message ID | 20241204180244.4077058-1-richard.sandiford@arm.com |
|---|---|
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E66C3858C39 for <patchwork@sourceware.org>; Wed, 4 Dec 2024 18:03:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E66C3858C39 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 51ADE3858D20 for <gcc-patches@gcc.gnu.org>; Wed, 4 Dec 2024 18:03:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51ADE3858D20 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 51ADE3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733335387; cv=none; b=k/1jN/ienNHHH26HWBQDvF/F2+bJYxemGeuW+DmU3IeP9ssX3W5f6vFk53VPUkEkjk9FlStMndqp37Hga2nbmLsc9jUNQSrTsEia2HLRepI87GG8YDHn6ihOkqdTDr8i1brT1T6MmPqCxnYbNcD1AAZlajFmykvinbbXRSa1N2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733335387; c=relaxed/simple; bh=8gOhlMXQtFIc51Lm1YVPFW1U3+l6sMeWibUYQ505Qjs=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Go78Rmi8QhV2Fh3TcEosvEmDtIJ3bdnq1ezTUDJ/DdAxvySXELSqdTzOtdNldYxlMVtjHpL8DU3o7lCOUx6mj7LC886eIzel1j6py23jKR7rKhhq6agWTJzj/PX1TnKYrs6dWqLovnGbzjiXgwWJTqpMu4XuzMhZH4ezVDc5I6k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51ADE3858D20 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE17E1063; Wed, 4 Dec 2024 10:03:34 -0800 (PST) Received: from e121540-lin.manchester.arm.com (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0274C3F5A1; Wed, 4 Dec 2024 10:03:05 -0800 (PST) From: Richard Sandiford <richard.sandiford@arm.com> To: richard.earnshaw@arm.com, ktkachov@nvidia.com, pinskia@gmail.com, gcc-patches@gcc.gnu.org Cc: Richard Sandiford <richard.sandiford@arm.com> Subject: [PATCH 0/4] Rename the Advanced SIMD intrinsic flags Date: Wed, 4 Dec 2024 18:02:40 +0000 Message-Id: <20241204180244.4077058-1-richard.sandiford@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
Rename the Advanced SIMD intrinsic flags
|
|
Message
Richard Sandiford
Dec. 4, 2024, 6:02 p.m. UTC
The arm_neon.h intrinsic definitions use a bitmask of flags to indicate what side-effects the intrinsic might have. However, their names are a bit confusing: - FLAG_AUTO_FP was originally suggested as a way of saying "automatically derive FLAG_FP from the mode", i.e. automatically decide whether the function might read the FPCR or might raise FP exceptions. The current flag instead suppresses this behaviour. - FLAG_NONE suggests that the intrinsic has no side-effects, but it actually has the suggested meaning of FLAG_AUTO_FP, i.e. work out the flags from the mode. This tripped me up when adding the flags to the vluti intrinsics: I'd used NONE, but wanted the semantics attached to AUTO_FP. This series renames some flags in the hope of making this easier to follow. I realise it might not seem like stage 3 material, but I think it is a naming/maintenance bug. Tested on aarch64-linux-gnu. I'll commit tomorrow evening if there are no comments before then, but let me know if you'd like more time. Richard Sandiford (4): aarch64: Rename FLAG_AUTO_FP to FLAG_QUIET aarch64: Rename FLAG_NONE to FLAG_DEFAULT aarch64: Reintroduce FLAG_AUTO_FP aarch64: Mark vluti* intrinsics as QUIET gcc/config/aarch64/aarch64-builtins.cc | 45 +- gcc/config/aarch64/aarch64-simd-builtins.def | 762 +++++++++--------- .../aarch64/aarch64-simd-pragma-builtins.def | 24 +- 3 files changed, 416 insertions(+), 415 deletions(-)
Comments
> On 4 Dec 2024, at 19:02, Richard Sandiford <richard.sandiford@arm.com> wrote: > > The arm_neon.h intrinsic definitions use a bitmask of flags to > indicate what side-effects the intrinsic might have. However, > their names are a bit confusing: > > - FLAG_AUTO_FP was originally suggested as a way of saying > "automatically derive FLAG_FP from the mode", i.e. automatically > decide whether the function might read the FPCR or might raise > FP exceptions. The current flag instead suppresses this behaviour. > > - FLAG_NONE suggests that the intrinsic has no side-effects, > but it actually has the suggested meaning of FLAG_AUTO_FP, > i.e. work out the flags from the mode. > > This tripped me up when adding the flags to the vluti intrinsics: > I'd used NONE, but wanted the semantics attached to AUTO_FP. > > This series renames some flags in the hope of making this easier > to follow. I realise it might not seem like stage 3 material, > but I think it is a naming/maintenance bug. Fine with me. Patches to make the code more readable/maintainable are good to have even in stage 3 IMO. Adjusting the flags for the vluti* intrinsics is fixing the support for a new GCC 15 feature so there’s no risk of regression for existing functionality. Thanks, Kyrill > > Tested on aarch64-linux-gnu. I'll commit tomorrow evening if there > are no comments before then, but let me know if you'd like more time. > > Richard Sandiford (4): > aarch64: Rename FLAG_AUTO_FP to FLAG_QUIET > aarch64: Rename FLAG_NONE to FLAG_DEFAULT > aarch64: Reintroduce FLAG_AUTO_FP > aarch64: Mark vluti* intrinsics as QUIET > > gcc/config/aarch64/aarch64-builtins.cc | 45 +- > gcc/config/aarch64/aarch64-simd-builtins.def | 762 +++++++++--------- > .../aarch64/aarch64-simd-pragma-builtins.def | 24 +- > 3 files changed, 416 insertions(+), 415 deletions(-) > > -- > 2.25.1 >