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

--- Comment #3 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:b3aed459634654d295a1d00e6c149565ced7a9a2

commit r14-6387-gb3aed459634654d295a1d00e6c149565ced7a9a2
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Sun Dec 10 19:46:07 2023 +0000

    aarch64: Fix invalid subregs for BE svread/write_za

    Multi-register svread_za and svwrite_za are implemented using one
    pattern per register count, with the register contents being bitcast
    on entry (for writes) or return (for reads).  Previously we relied
    on subregs for this, with the subreg for reads being handled by
    target-independent code.  But using subregs isn't correct for many
    big-endian cases, where following subreg rules often requires actual
    instructions.  The semantics are instead supposed to be those of
    svreinterpret.

    gcc/
            PR target/112931
            PR target/112933
            * config/aarch64/aarch64-protos.h (aarch64_sve_reinterpret):
Declare.
            * config/aarch64/aarch64.cc (aarch64_sve_reinterpret): New
function.
            * config/aarch64/aarch64-sve-builtins-sme.cc
(svread_za_impl::expand)
            (svwrite_za_impl::expand): Use it to cast the SVE register to the
            right mode.

Reply via email to