public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99216] ICE in aarch64_sve::function_expander::expand() with LTO
Date: Fri, 05 Mar 2021 10:00:29 +0000	[thread overview]
Message-ID: <bug-99216-4-4bLzMIsfKh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99216-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Right, the problem appears to be to do with the way that overloaded functions
are implemented for the ACLE. Specifically the m_direct_overloads flag in
aarch64_sve::function_builder. If this flag is set, we register a separate
builtin (with a separate function code) for each overload as opposed to
registering the overloaded function once and resolving it later. The two
different schemes end up with each builtin having a different code.

We set m_direct_overloads to be true if the language is C++:

m_direct_overloads = lang_GNU_CXX ();

so in cc1plus, we use one numbering scheme, but in lto1, we use a different
numbering scheme, with predictably disastrous consequences (we try and expand
svaddv as an svbic).

So one options would be that for LTO we instantiate both sets of tree nodes.
Then, when expanding a tree node that came from LTO, we dispatch on a flag in
the tree node (essentially just whether it came from C++ or not) to determine
which set of functions to use. Seems a bit messy though.

@Richard: does that sound at all sane? Any ideas for a better approach?

  parent reply	other threads:[~2021-03-05 10:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23  9:39 [Bug target/99216] New: " acoplan at gcc dot gnu.org
2021-02-23  9:45 ` [Bug target/99216] " ktkachov at gcc dot gnu.org
2021-02-23 10:14 ` acoplan at gcc dot gnu.org
2021-03-04 14:55 ` acoplan at gcc dot gnu.org
2021-03-05 10:00 ` acoplan at gcc dot gnu.org [this message]
2021-03-05 11:53 ` rsandifo at gcc dot gnu.org
2021-03-05 12:15 ` acoplan at gcc dot gnu.org
2021-03-29 11:20 ` cvs-commit at gcc dot gnu.org
2021-03-29 11:23 ` acoplan at gcc dot gnu.org
2021-03-30 15:38 ` rsandifo at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-22 13:38 ` cvs-commit at gcc dot gnu.org
2021-04-22 13:52 ` acoplan 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-99216-4-4bLzMIsfKh@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).