public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/94678] aarch64: unexpected result with -mgeneral-regs-only and sve
Date: Wed, 22 Apr 2020 17:25:24 +0000	[thread overview]
Message-ID: <bug-94678-4-QFYi6BlUr6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94678-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:154ae7d4e921d704118d6a16ee5cc2a10b9047da

commit r10-7891-g154ae7d4e921d704118d6a16ee5cc2a10b9047da
Author: Fei Yang <felix.yang@huawei.com>
Date:   Wed Apr 22 18:24:59 2020 +0100

    aarch64: unexpected result with -mgeneral-regs-only and sve [PR94678]

    As the two testcases for PR94678 show, -mgeneral-regs-only is handled
    properly with SVE.  We should issue an error message instead of expanding
    SVE builtin funtions when -mgeneral-regs-only option is specified.

    The middle end should never try to use vector patterns when the vector
    modes have been disabled by !have_regs_of_mode.  But it's still wrong
    for the target to provide patterns that would inevitably lead to spill
    failure due to lack of registers.  So we should also add check for
    !TARGET_GENERAL_REGS_ONLY in TARGET_SVE and other SVE related macros.

    2020-04-22  Felix Yang  <felix.yang@huawei.com>

    gcc/
            PR target/94678
            * config/aarch64/aarch64.h (TARGET_SVE):
            Add && !TARGET_GENERAL_REGS_ONLY.
            (TARGET_SVE2): Add && TARGET_SVE.
            (TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3,
            TARGET_SVE2_SM4): Add && TARGET_SVE2.
            * config/aarch64/aarch64-sve-builtins.h
            (sve_switcher::m_old_general_regs_only): New member.
            * config/aarch64/aarch64-sve-builtins.cc
(check_required_registers):
            New function.
            (reported_missing_registers_p): New variable.
            (check_required_extensions): Call check_required_registers before
            return if all required extenstions are present.
            (sve_switcher::sve_switcher): Save TARGET_GENERAL_REGS_ONLY in
            m_old_general_regs_only and clear MASK_GENERAL_REGS_ONLY in
            global_options.x_target_flags.
            (sve_switcher::~sve_switcher): Set MASK_GENERAL_REGS_ONLY in
            global_options.x_target_flags if m_old_general_regs_only is true.

    gcc/testsuite/
            PR target/94678
            * gcc.target/aarch64/sve/acle/general/nosve_6.c: New test.

  parent reply	other threads:[~2020-04-22 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21  7:11 [Bug target/94678] New: " felix.yang at huawei dot com
2020-04-21  7:12 ` [Bug target/94678] " felix.yang at huawei dot com
2020-04-22 17:25 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-22 17:26 ` rsandifo at gcc dot gnu.org
2020-04-23 15:08 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94678-4-QFYi6BlUr6@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).