public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/110946] New: 3x perf regression with -Os on M1 Pro
@ 2023-08-08 11:25 dave.rodgman at arm dot com
  2023-08-08 11:37 ` [Bug other/110946] " dave.rodgman at arm dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dave.rodgman at arm dot com @ 2023-08-08 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110946
           Summary: 3x perf regression with -Os on M1 Pro
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dave.rodgman at arm dot com
  Target Milestone: ---

Please see
https://github.com/Mbed-TLS/mbedtls/pull/7784/commits/6cfd9b54ae0d06451c1a46a10e57fa099878bb03
for details.

On M1 Pro, under -Os, we see a 3.1x performance regression for AES-XTS, which
can be solved by forcing -O2 for two functions. For comparison, clang -Os gives
around 5% perf regression (which is more in the ballpark that I'd expect). So
it looks to me like gcc is getting something wrong when compiling these two
functions with -Os.

We measured a smaller but still significant difference (20-25%) on x86-64.

Affects all versions of gcc that I was able to test with (9 .. 12).

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

end of thread, other threads:[~2023-08-08 21:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08 11:25 [Bug other/110946] New: 3x perf regression with -Os on M1 Pro dave.rodgman at arm dot com
2023-08-08 11:37 ` [Bug other/110946] " dave.rodgman at arm dot com
2023-08-08 12:22 ` amonakov at gcc dot gnu.org
2023-08-08 12:32 ` [Bug ipa/110946] " rguenth at gcc dot gnu.org
2023-08-08 12:35 ` [Bug other/110946] " dave.rodgman at arm dot com
2023-08-08 12:40 ` dave.rodgman at arm dot com
2023-08-08 13:27 ` dave.rodgman at arm dot com
2023-08-08 15:57 ` pinskia at gcc dot gnu.org
2023-08-08 16:48 ` [Bug ipa/110946] " amonakov at gcc dot gnu.org
2023-08-08 17:38 ` amonakov at gcc dot gnu.org
2023-08-08 21:20 ` amonakov at gcc dot gnu.org
2023-08-08 21:47 ` amonakov 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).