From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 23077385770F; Thu, 18 May 2023 10:39:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23077385770F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684406357; bh=o3qVB01S3l9ZRp1haSnFZ8o+ueOaBPWbDbSaXVl+cqM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vxF0kI8JGFQhIOI+VPSDFZ8vhi4q9Yej5g39qp3fslTOtha6et7a2w1etndeQ+cqB Zuq6G7RTc2KjdA9UVq5hihsJvM+n2qCT8yAoPh56CGpObTPBObMTPHwz4E+wuTQOYK 4in8t5EHYD+jVpNHx9O8VsZ1V6zdGAERRZ5NbhCQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96795] MVE: issue with polymorphism and integer promotion Date: Thu, 18 May 2023 10:39:15 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: sripar01 at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D96795 --- Comment #7 from CVS Commits --- The releases/gcc-12 branch has been updated by Stam Markianos-Wright : https://gcc.gnu.org/g:7d3043505c770e96d5471edee2b97c8169f26316 commit r12-9557-g7d3043505c770e96d5471edee2b97c8169f26316 Author: Stam Markianos-Wright Date: Thu Nov 10 15:02:47 2022 +0000 arm: further fix overloading of MVE vaddq[_m]_n intrinsic It was observed that in tests `vaddq_m_n_[s/u][8/16/32].c`, the _Generic resolution would fall back to the `__ARM_undef` failure state. This is a regression since `dc39db873670bea8d8e655444387ceaa53a01a79` a= nd `6bd4ce64eb48a72eca300cb52773e6101d646004`, but it previously wasn't identified, because the tests were not checking for this kind of failur= e. The above commits changed the definitions of the intrinsics from using `[u]int[8/16/32]_t` types for the scalar argument to using `int`. This allowed `int` to be supported in user code through the overloaded `#defines`, but seems to have broken the `[u]int[8/16/32]_t` types The solution implemented by this patch is to explicitly use a new _Generic mapping from all the `[u]int[8/16/32]_t` types for int. With t= his change, both `int` and `[u]int[8/16/32]_t` parameters are supported from user code and are handled by the overloading mechanism correctly. Note that in these scalar cases it is safe to pass the raw p, rather than the typeof-ed __p, because we are not at risk of the _Generics being exponentially expanded on the `n` scalar argument to an `_n` intrinsic. Using p instead will give a more accurate error message to the user, should something be wrong with that argument. gcc/ChangeLog: PR target/96795 * config/arm/arm_mve.h (__arm_vaddq_m_n_s8): Change types. (__arm_vaddq_m_n_s32): Likewise. (__arm_vaddq_m_n_s16): Likewise. (__arm_vaddq_m_n_u8): Likewise. (__arm_vaddq_m_n_u32): Likewise. (__arm_vaddq_m_n_u16): Likewise. (__arm_vaddq_m): Fix Overloading. (__ARM_mve_coerce3): New. (cherry picked from commit e0dd75fe90ef4cda94f431747d239d6cfcf5656f)=