public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/102347] "fatal error: target specific builtin not available" with MMA and LTO
Date: Thu, 16 Sep 2021 10:36:00 +0000	[thread overview]
Message-ID: <bug-102347-4-NQlCoetm9Y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102347-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
This seems not a target specific issue. I noticed the target_option tree node
is created expectedly when seeing target pragma, it explains why it works well
without lto. When lto does streaming out, it does stream the target_option
node. 

Creating output block for decls
Creating compressed section .gnu.lto_.decls.db802b44a7cc3ae9
Outputting global stream
 0:  <function_decl 0x7d785d7f9e00 main>
    Streaming tree  <function_decl 0x7d785d7f9e00 main>
     Start of LTO_tree_scc of size 1
      Streaming header of  <optimization_node 0x7d785d590000>  to decls
      Streaming body of  <optimization_node 0x7d785d590000>  to decls
     286 bytes
     Start of LTO_tree_scc of size 1
      Streaming header of  <target_option_node 0x7d785d580030>  to decls
      Streaming body of  <target_option_node 0x7d785d580030>  to decls
     149 bytes

But debugging the read_decls part, I noticed it can materialize the
corresponding option_node, but it seems we don't associate this option_node to
the related function_decl. 


I constructed one aarch64 test case, it fails as well.

int64x2_t v1 = {100, 200};
int32x4_t v2 = {11, 22, 33, 44};

#pragma GCC target ("+simd")
int main()
{
  uint64x2_t vres = (uint64x2_t) __builtin_aarch64_usubw2v4si (v1, v2);
  printf("vres: %lld %lld\n", vres[0], vres[1]);
  return 0;
}

Command: -march=armv8-a+nosimd -flto

It can pass without -flto.

  parent reply	other threads:[~2021-09-16 10:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 12:18 [Bug lto/102347] New: " chip.kerchner at ibm dot com
2021-09-15 13:20 ` [Bug lto/102347] " linkw at gcc dot gnu.org
2021-09-15 13:36 ` [Bug target/102347] " rguenth at gcc dot gnu.org
2021-09-16 10:36 ` linkw at gcc dot gnu.org [this message]
2021-09-17  9:10 ` linkw at gcc dot gnu.org
2021-09-17  9:20 ` pinskia at gcc dot gnu.org
2021-09-17 14:15 ` marxin at gcc dot gnu.org
2021-09-21 23:53 ` bergner at gcc dot gnu.org
2021-09-23  6:51 ` linkw at gcc dot gnu.org
2021-09-23  7:08 ` linkw at gcc dot gnu.org
2021-09-23  7:26 ` rguenther at suse dot de
2021-11-26  1:59 ` linkw at gcc dot gnu.org
2021-11-30  4:51 ` cvs-commit at gcc dot gnu.org
2021-12-01 18:17 ` cvs-commit at gcc dot gnu.org
2021-12-10 13:31 ` wschmidt at gcc dot gnu.org
2021-12-15  5:48 ` cvs-commit at gcc dot gnu.org
2021-12-15  6:15 ` cvs-commit at gcc dot gnu.org
2021-12-15  8:05 ` cvs-commit at gcc dot gnu.org
2021-12-15  8:13 ` linkw at gcc dot gnu.org
2021-12-15  8:25 ` linkw 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-102347-4-NQlCoetm9Y@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).