https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114577

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>:

https://gcc.gnu.org/g:86dce005a1d440154dbf585dde5a2dd4cfac7a05

commit r14-9787-g86dce005a1d440154dbf585dde5a2dd4cfac7a05
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Thu Apr 4 14:15:49 2024 +0100

    aarch64: Recognise svundef idiom [PR114577]

    GCC 14 adds the header file arm_neon_sve_bridge.h to help interface
    SVE and Advanced SIMD code.  One of the defined idioms is:

      svset_neonq (svundef_TYPE (), advsimd_vector)

    which simply reinterprets advsimd_vector as an SVE vector without
    regard for what's in the upper bits.

    GCC was failing to recognise this idiom, which was likely to
    significantly hamper adoption.

    There is (AFAIK) no good way of representing an extension with
    undefined bits in gimple.  We could add an internal-only builtin
    to represent it, but the current framework makes that somewhat
    awkward.  It also doesn't seem very forward-looking.

    This patch instead goes for the simpler approach of recognising
    undefined arguments at expansion time.

    gcc/
            PR target/114577
            * config/aarch64/aarch64-sve-builtins.h
(aarch64_sve::lookup_fndecl):
            Declare.
            * config/aarch64/aarch64-sve-builtins.cc
(aarch64_sve::lookup_fndecl):
            New function.
            * config/aarch64/aarch64-sve-builtins-base.cc (is_undef): Likewise.
            (svset_neonq_impl::expand): Optimise expansions whose first
argument
            is undefined.

    gcc/testsuite/
            PR target/114577
            * gcc.target/aarch64/sve/acle/general/pr114577_1.c: New test.
            * gcc.target/aarch64/sve/acle/general/pr114577_2.c: Likewise.

Reply via email to