public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/110724] Unnecessary alignment on branch to unconditional branch targets
Date: Tue, 18 Jul 2023 17:48:28 +0000	[thread overview]
Message-ID: <bug-110724-4-6Rd9N4Nn7m@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110724-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-07-18
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The generic tuning is:
  "16:11:8",                            /* Loop alignment.  */
  "16:11:8",                            /* Jump alignment.  */
  "0:0:8",                              /* Label alignment.  */

The the operands are described as:
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Optimize-Options.html#index-falign-functions
```
-falign-functions=n:m:n2
...
Examples: -falign-functions=32 aligns functions to the next 32-byte boundary,
-falign-functions=24 aligns to the next 32-byte boundary only if this can be
done by skipping 23 bytes or less, -falign-functions=32:7 aligns to the next
32-byte boundary only if this can be done by skipping 6 bytes or less.

The second pair of n2:m2 values allows you to specify a secondary alignment:
-falign-functions=64:7:32:3 aligns to the next 64-byte boundary if this can be
done by skipping 6 bytes or less, otherwise aligns to the next 32-byte boundary
if this can be done by skipping 2 bytes or less. If m2 is not specified, it
defaults to n2.
```

So align jumps to 16 byte if 11 or less bytes can be used or 8 byte alignment
Which is exactly what this does:
        .p2align 4,,7          # <-- unnecessary alignment
        .p2align 3

  parent reply	other threads:[~2023-07-18 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 17:11 [Bug rtl-optimization/110724] New: " javier.martinez.bugzilla at gmail dot com
2023-07-18 17:38 ` [Bug middle-end/110724] " pinskia at gcc dot gnu.org
2023-07-18 17:48 ` pinskia at gcc dot gnu.org [this message]
2023-07-18 19:07 ` javier.martinez.bugzilla at gmail dot com
2023-07-18 20:00 ` [Bug target/110724] " pinskia at gcc dot gnu.org
2023-07-18 20:02 ` pinskia at gcc dot gnu.org
2023-07-19  6:46 ` rguenth at gcc dot gnu.org
2023-07-19  8:26 ` javier.martinez.bugzilla at gmail dot com

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-110724-4-6Rd9N4Nn7m@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).