public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/114575] New: [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae
@ 2024-04-03 15:19 tnfchris at gcc dot gnu.org
  2024-04-03 15:56 ` [Bug rtl-optimization/114575] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-04-03 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114575
           Summary: [14 Regression] SVE addressing modes broken since
                    g:839bc42772ba7af66af3bd16efed4a69511312ae
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*

Created attachment 57864
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57864&action=edit
addr.cc

Since the offending commit, compiling the example attached with -O3
-march=armv8.5-a+sve2 results in:

.L14:
        lsl     x0, x1, 1
        add     x1, x1, 8
        add     x2, x3, x0
        add     x6, x0, x4
        ld1h    z2.h, p7/z, [x2]
        ld1h    z22.h, p7/z, [x6]
        add     x0, x0, x5
        fmad    z22.h, p7/m, z21.h, z2.h
        ld1h    z20.h, p7/z, [x0]
        fmad    z20.h, p7/m, z26.h, z22.h
        st1h    z20.h, p7, [x2]
        cmp     x1, 808
        bne     .L14

instead of what it was before the commit:

.L14:
        ld1h    z2.h, p7/z, [x1, x0, lsl 1]
        ld1h    z22.h, p7/z, [x2, x0, lsl 1]
        ld1h    z20.h, p7/z, [x3, x0, lsl 1]
        fmad    z22.h, p7/m, z21.h, z2.h
        fmad    z20.h, p7/m, z26.h, z22.h
        st1h    z20.h, p7, [x1, x0, lsl 1]
        add     x0, x0, 8
        cmp     x0, 808
        bne     .L14

It's now no longer pushing in the register shifts. This causes significant
performance loss as it needs to now perform the integer ALU ops before doing
the load and they're on the critical path.

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

* [Bug rtl-optimization/114575] [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae
  2024-04-03 15:19 [Bug rtl-optimization/114575] New: [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae tnfchris at gcc dot gnu.org
@ 2024-04-03 15:56 ` pinskia at gcc dot gnu.org
  2024-04-04  7:19 ` rguenth at gcc dot gnu.org
  2024-04-10  6:00 ` [Bug rtl-optimization/114575] [15 " rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-03 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=114510
   Target Milestone|---                         |14.0
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Definitely related to PR 114510 (but that is not caused by the combine patch as
it was happening beforehand).

There does seems like some address cost model issue here too.

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

* [Bug rtl-optimization/114575] [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae
  2024-04-03 15:19 [Bug rtl-optimization/114575] New: [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae tnfchris at gcc dot gnu.org
  2024-04-03 15:56 ` [Bug rtl-optimization/114575] " pinskia at gcc dot gnu.org
@ 2024-04-04  7:19 ` rguenth at gcc dot gnu.org
  2024-04-10  6:00 ` [Bug rtl-optimization/114575] [15 " rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-04  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I proposed reverting the offending revision but am waiting for Seghers OK.

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

* [Bug rtl-optimization/114575] [15 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae
  2024-04-03 15:19 [Bug rtl-optimization/114575] New: [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae tnfchris at gcc dot gnu.org
  2024-04-03 15:56 ` [Bug rtl-optimization/114575] " pinskia at gcc dot gnu.org
  2024-04-04  7:19 ` rguenth at gcc dot gnu.org
@ 2024-04-10  6:00 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-10  6:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|14.0                        |15.0
            Summary|[14 Regression] SVE         |[15 Regression] SVE
                   |addressing modes broken     |addressing modes broken
                   |since                       |since
                   |g:839bc42772ba7af66af3bd16e |g:839bc42772ba7af66af3bd16e
                   |fed4a69511312ae             |fed4a69511312ae

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reverted for GCC 14 but will re-appear for GCC 15.

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

end of thread, other threads:[~2024-04-10  6:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 15:19 [Bug rtl-optimization/114575] New: [14 Regression] SVE addressing modes broken since g:839bc42772ba7af66af3bd16efed4a69511312ae tnfchris at gcc dot gnu.org
2024-04-03 15:56 ` [Bug rtl-optimization/114575] " pinskia at gcc dot gnu.org
2024-04-04  7:19 ` rguenth at gcc dot gnu.org
2024-04-10  6:00 ` [Bug rtl-optimization/114575] [15 " rguenth 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).