public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115418] New: [14 regression] Extra movapd emitted for MAX implementation
@ 2024-06-10 17:06 sjames at gcc dot gnu.org
  2024-06-10 17:13 ` [Bug target/115418] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-10 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115418
           Summary: [14 regression] Extra movapd emitted for MAX
                    implementation
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

```
#define MAX(a, b) ((a) < (b) ? (b) : (a))
#define MAX3(a, b, c) MAX((a), MAX((b), (c)))

double f(double a, double b, double c)
{
return MAX3(a,b,c);
}
```

```
$ gcc-14 /tmp/foo200.c -S -o - -O2
.file   "foo200.c"
.text
.p2align 4
.globl  f
.type   f, @function
f:
.LFB0:
.cfi_startproc
movapd  %xmm2, %xmm3
maxsd   %xmm1, %xmm3
maxsd   %xmm0, %xmm3
movapd  %xmm3, %xmm0
ret
.cfi_endproc
.LFE0:
.size   f, .-f
.ident  "GCC: (Gentoo Hardened 14.1.1_p20240608 p2) 14.1.1 20240608"
.section        .note.GNU-stack,"",@progbits
```

I only see the extra movapd with 14.

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

end of thread, other threads:[~2024-06-11  5:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10 17:06 [Bug target/115418] New: [14 regression] Extra movapd emitted for MAX implementation sjames at gcc dot gnu.org
2024-06-10 17:13 ` [Bug target/115418] " pinskia at gcc dot gnu.org
2024-06-10 17:21 ` [Bug target/115418] " pinskia at gcc dot gnu.org
2024-06-11  5:27 ` liuhongt 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).