public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113613] New: [14 Regression] Missing ldp/stp optimization sometimes
@ 2024-01-26  6:04 pinskia at gcc dot gnu.org
  2024-01-26  6:05 ` [Bug target/113613] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-26  6:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113613
           Summary: [14 Regression] Missing ldp/stp optimization sometimes
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
                CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-*-*

Take:
```
typedef float __attribute__((vector_size(8))) v2sf;
v2sf a[4];
v2sf b[4];
void f()
{
  b[0] += a[0];
  b[1] += a[1];
}

```

With -O3 on the trunk we get:
```
f:
        adrp    x1, .LANCHOR0
        add     x0, x1, :lo12:.LANCHOR0
        ldr     d31, [x1, #:lo12:.LANCHOR0]
        ldr     d30, [x0, 32]
        fadd    v30.2s, v31.2s, v30.2s
        ldr     d31, [x0, 8]
        str     d30, [x1, #:lo12:.LANCHOR0]
        ldr     d30, [x0, 40]
        fadd    v30.2s, v31.2s, v30.2s
        str     d30, [x0, 8]
        ret
```

But in GCC 13 we got:
```
f:
        adrp    x1, .LANCHOR0
        add     x0, x1, :lo12:.LANCHOR0
        ldp     d1, d0, [x0]
        ldp     d3, d2, [x0, 32]
        fadd    v1.2s, v1.2s, v3.2s
        fadd    v0.2s, v0.2s, v2.2s
        stp     d1, d0, [x0]
        ret
```

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

end of thread, other threads:[~2024-02-23 14:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26  6:04 [Bug target/113613] New: [14 Regression] Missing ldp/stp optimization sometimes pinskia at gcc dot gnu.org
2024-01-26  6:05 ` [Bug target/113613] " pinskia at gcc dot gnu.org
2024-01-26  6:39 ` pinskia at gcc dot gnu.org
2024-01-26  8:34 ` acoplan at gcc dot gnu.org
2024-01-26  8:58 ` [Bug target/113613] [14 Regression] Missing ldp/stp optimization since r14-6290-g9f0f7d802482a8 acoplan at gcc dot gnu.org
2024-01-26  9:00 ` acoplan at gcc dot gnu.org
2024-01-26  9:05 ` acoplan at gcc dot gnu.org
2024-01-26  9:33 ` acoplan at gcc dot gnu.org
2024-01-26 10:20 ` rsandifo at gcc dot gnu.org
2024-02-23 14:13 ` cvs-commit at gcc dot gnu.org
2024-02-23 14:16 ` rsandifo 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).