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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Karl Meakin <[email protected]>:

https://gcc.gnu.org/g:c870965b25efeea1b77f18016df5a5203aae3cdf

commit r17-6324-gc870965b25efeea1b77f18016df5a5203aae3cdf
Author: Karl Meakin <[email protected]>
Date:   Mon Nov 16 14:17:50 2026 +0000

    aarch64 [PR128777]: Force arguments to vmin/vmax to be in registers

    The `"<fmaxmin><mode>3<vczle><vczbe>"` insn expects both arguments to be
    in registers, but `gimple_minmax::expand` was expanding to an
    `UNSPEC_FMIN`/`UNSPEC_FMAX` without first checking that both arguments
    were in registers, so the resulting RTL would cause an ICE if one of the
    arguments to vmin/vmax was an immediate. Fix by forcing the arguments to
    be in registers.

    Commited as obvious.

    gcc/ChangeLog:
            PR target/128777
            * config/aarch64/aarch64-neon-builtins-base.cc
            (gimple_minmax::expand): Force arguments to be in registers.

    gcc/testsuite/ChangeLog:

            * gcc.target/aarch64/neon/vminmax_imm.c: New test.

Reply via email to