public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113856] New: `(vect64 float){1.0f, 0}` code generation could just be `fmov sN, 1.0f`
@ 2024-02-09 23:30 pinskia at gcc dot gnu.org
  2024-02-09 23:37 ` [Bug target/113856] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-09 23:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113856
           Summary: `(vect64 float){1.0f, 0}` code generation could just
                    be `fmov sN, 1.0f`
           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
  Target Milestone: ---

Take:
```
#define vect64 __attribute__((vector_size(8) ))

vect64  float f1( float a)
{
  return (vect64 float){1.0f, 0};
}
vect64  float f2( float a)
{
  return (vect64 float){1.0f, 1.0f};
}
```

Currently GCC produces:
```
f1:
        adrp    x0, .LC0
        ldr     d0, [x0, #:lo12:.LC0]
        ret
f2:
        fmov    v0.2s, 1.0e+0
        ret
```


But f1 could be implemented using fmov also.
Like:
```
f1:
        fmov    s0, 1.0e+0
        ret
```

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

end of thread, other threads:[~2024-02-15  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 23:30 [Bug target/113856] New: `(vect64 float){1.0f, 0}` code generation could just be `fmov sN, 1.0f` pinskia at gcc dot gnu.org
2024-02-09 23:37 ` [Bug target/113856] " pinskia at gcc dot gnu.org
2024-02-15  4:41 ` pinskia at gcc dot gnu.org
2024-02-15  6:38 ` pinskia at gcc dot gnu.org
2024-02-15  8:25 ` pinskia 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).