From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20CF43857B9B; Mon, 10 Jul 2023 14:15:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20CF43857B9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688998541; bh=2TdBirsvKLGygHWVtZUc0PxzwZbmyybqD9xTQnVpa+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Nsn/vByFod5C0Wo/Zq7DQBANp21uaoVIS5jqCg3WULxWDDrOfZLs1+MgOpXwefX4P eKuWClHwYGvH5rFsAHKd4Eirr1sKleNHUcxLIrOtl/UBLDZ/0/vpnLNi8YbMNZNg10 ho3EWMqvSKf6e7TRAJM72L38v0/yGP6YQGFnOgdg= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110268] [14 Regression] arm MVE intrinsics support broken with LTO Date: Mon, 10 Jul 2023 14:15:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: clyon at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110268 --- Comment #6 from CVS Commits --- The master branch has been updated by Christophe Lyon : https://gcc.gnu.org/g:eca10aaa3954af3dab56eccc208c90273c2b1732 commit r14-2418-geca10aaa3954af3dab56eccc208c90273c2b1732 Author: Christophe Lyon Date: Mon Jun 26 14:39:47 2023 +0000 arm: Fix MVE intrinsics support with LTO (PR target/110268) After the recent MVE intrinsics re-implementation, LTO stopped working because the intrinsics would no longer be defined. The main part of the patch is simple and similar to what we do for AArch64: - call handle_arm_mve_h() from arm_init_mve_builtins to declare the intrinsics when the compiler is in LTO mode - actually implement arm_builtin_decl for MVE. It was just a bit tricky to handle __ARM_MVE_PRESERVE_USER_NAMESPACE: its value in the user code cannot be guessed at LTO time, so we always have to assume that it was not defined. The led to a few fixes in the way we register MVE builtins as placeholders or not. Without this patch, we would just omit some versions of the inttrinsics when __ARM_MVE_PRESERVE_USER_NAMESPACE is true. In fact, like for the C/C++ placeholders, we need to always keep entries for all of them to ensure that we have a consistent numbering scheme. 2023-06-26 Christophe Lyon PR target/110268 gcc/ * config/arm/arm-builtins.cc (arm_init_mve_builtins): Handle LT= O. (arm_builtin_decl): Hahndle MVE builtins. * config/arm/arm-mve-builtins.cc (builtin_decl): New function. (add_unique_function): Fix handling of __ARM_MVE_PRESERVE_USER_NAMESPACE. (add_overloaded_function): Likewise. * config/arm/arm-protos.h (builtin_decl): New declaration. gcc/testsuite/ * gcc.target/arm/pr110268-1.c: New test. * gcc.target/arm/pr110268-2.c: New test.=