public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99988] New: aarch64: GCC generates excessive consecutive bti j instructions
@ 2021-04-09 10:13 acoplan at gcc dot gnu.org
  2021-04-09 10:23 ` [Bug target/99988] " acoplan at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-04-09 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99988
           Summary: aarch64: GCC generates excessive consecutive bti j
                    instructions
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50535
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50535&action=edit
minimal reproducer

For the attached testcase (reduced from the linux kernel), GCC generates
multiple redundant sequences of back-to-back bti j instructions, the longest of
which is 262 instructions long.

To reproduce:

$ aarch64-linux-gnu-gcc -c test.c -S -o - -O2 -mbranch-protection=standard |
uniq -c | grep "bti j" | sort -nr
    262         hint    36 // bti j
      7         hint    36 // bti j
      6         hint    36 // bti j
      4         hint    36 // bti j
      4         hint    36 // bti j
      3         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j
      2         hint    36 // bti j

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-05-12 15:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 10:13 [Bug target/99988] New: aarch64: GCC generates excessive consecutive bti j instructions acoplan at gcc dot gnu.org
2021-04-09 10:23 ` [Bug target/99988] " acoplan at gcc dot gnu.org
2021-04-09 11:29 ` acoplan at gcc dot gnu.org
2021-04-21 13:42 ` cvs-commit at gcc dot gnu.org
2021-04-21 13:46 ` acoplan at gcc dot gnu.org
2021-04-22 12:46 ` cvs-commit at gcc dot gnu.org
2021-05-11 15:15 ` cvs-commit at gcc dot gnu.org
2021-05-12  9:58 ` cvs-commit at gcc dot gnu.org
2021-05-12 15:03 ` cvs-commit at gcc dot gnu.org
2021-05-12 15:08 ` acoplan at gcc dot gnu.org

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).