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

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

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

commit r17-3399-gec2890c334eaccbe37e2e2eae6a4de62fefdcbf8
Author: Kyrylo Tkachov <[email protected]>
Date:   Wed Aug 19 07:14:10 2026 +0200

    libcpp: require SVE as well as SVE2 for the AArch64 lexer [PR126935]

    init_vectorized_lexer only tested HWCAP2_SVE2.  Some virtual machines
    advertise SVE2 while leaving SVE clear, which is a nonsense
    configuration but one that occurs in practice, and there the compiler
    dies as soon as it lexes anything:

      build/genmatch --gimple ...
      make[3]: *** [Makefile:3102: s-gimple-match] Illegal instruction

    Test HWCAP_SVE alongside HWCAP2_SVE2 so the run-time dispatch declines
    the SVE2 helper on such a machine and keeps using Neon.
    SVE2 without SVE is a nonsense configuration architecture-wise and
    arguably the VM hypervisor is at fault here, but it is easy to work around
    for the sake of fixing bootstrap on such machines.

    libcpp/ChangeLog:

            PR target/126935
            * lex.cc (HWCAP_SVE): Define if not already defined.
            (init_vectorized_lexer): Require HWCAP_SVE as well as
            HWCAP2_SVE2.

    Signed-off-by: Kyrylo Tkachov <[email protected]>

Reply via email to