public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100181] hot-cold partitioned code doesn't assemble
Date: Wed, 21 Apr 2021 14:42:27 +0000	[thread overview]
Message-ID: <bug-100181-4-eMCqeaXnFY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100181-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Thomas Schwinge from comment #8)
> (In reply to Tobias Burnus from comment #7)
> > (I could not reproduce the LLVM 9 issue in PR94278 back then.)
> 
> Hmm, but didn't you say in the LLVM issue
> <https://bugs.llvm.org/show_bug.cgi?id=45887> that you _did_ reproduce this back then?

I partially mixed it up - I could not reproduce it with a self-build LLVM but
could do so with the distro LLVM ones.

Our/my LLVM bug 45887 is similar to
https://bugs.llvm.org/show_bug.cgi?id=41914, which was fixed by
https://reviews.llvm.org/D79943 and the latter adds the check which causes the
error message: "undefined label '.L33'"

However, the other bug (41914) and the the testcase in the fix (D79943) were
about a label which was truly missing as opposed to one which is just in a
differently named .section.

 * * *

Obviously, with D79943 at place (LLVM 11, 12, ...), I can reproduce the issue
with -O2 (with < -O0 there is only .text) as then 's_branch .L33' is in
.section .text but '.L33:' is in '.section .text.unlikely'.

Whether it is intended that cross-.section s_branch are no longer permitted or
whether it happened by chance by this patch or on purpose, I don't know.

Sections themselves are supported – and the  LVM testsuite for GCN has
testcases with '.section' (under llvm/test/MC/AMDGPU/*.s) – but in the
testsuite one at a time.

GCC guards the .text.unlikely generation by (→ varasm.c's
default_function_section) by

  if (!flag_reorder_functions
      || !targetm_common.have_named_sections)
    return NULL;

while the patch in PR 94278 comment 3 uses
   flag_reorder_blocks_and_partition = 0

  parent reply	other threads:[~2021-04-21 14:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 12:19 [Bug target/100181] New: " rguenth at gcc dot gnu.org
2021-04-21 12:22 ` [Bug target/100181] " rguenth at gcc dot gnu.org
2021-04-21 12:23 ` rguenth at gcc dot gnu.org
2021-04-21 12:25 ` rguenth at gcc dot gnu.org
2021-04-21 12:26 ` rguenth at gcc dot gnu.org
2021-04-21 12:27 ` tschwinge at gcc dot gnu.org
2021-04-21 12:32 ` rguenth at gcc dot gnu.org
2021-04-21 12:43 ` burnus at gcc dot gnu.org
2021-04-21 12:52 ` tschwinge at gcc dot gnu.org
2021-04-21 14:42 ` burnus at gcc dot gnu.org [this message]
2021-07-19 15:59 ` burnus at gcc dot gnu.org
2021-07-19 16:00 ` burnus at gcc dot gnu.org
2022-02-11 14:08 ` burnus at gcc dot gnu.org
2022-02-11 14:27 ` ams at gcc dot gnu.org
2022-05-27 19:44 ` tschwinge 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-100181-4-eMCqeaXnFY@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).