public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113084] New: aarch64: vget_low blocks tail-call
@ 2023-12-19 16:30 joe.ramsay at arm dot com
  2023-12-19 16:57 ` [Bug middle-end/113084] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: joe.ramsay at arm dot com @ 2023-12-19 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113084
           Summary: aarch64: vget_low blocks tail-call
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joe.ramsay at arm dot com
  Target Milestone: ---

In the following, f could be tail-called.

#include <arm_neon.h>

float32x4_t f(float32x4_t);

float32x2_t g(float32x2_t x) {
  return vget_low_f32 (f (vcombine_f32 (x, x)));
}


however GCC 13 emits the following at O1, O2 and O3

g:
        ins     v0.d[1], v0.d[0]
        stp     x29, x30, [sp, -16]!
        mov     x29, sp
        bl      f
        ldp     x29, x30, [sp], 16
        ret

I observed the same or worse codegen for all versions of Arm64 GCC on Compiler
Explorer

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

* [Bug middle-end/113084] aarch64: vget_low blocks tail-call
  2023-12-19 16:30 [Bug target/113084] New: aarch64: vget_low blocks tail-call joe.ramsay at arm dot com
@ 2023-12-19 16:57 ` pinskia at gcc dot gnu.org
  2023-12-19 16:57 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-19 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end
           Keywords|                            |missed-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Gcc also currently does not support tail calls if the types change. There is
another bug about that.

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

* [Bug middle-end/113084] aarch64: vget_low blocks tail-call
  2023-12-19 16:30 [Bug target/113084] New: aarch64: vget_low blocks tail-call joe.ramsay at arm dot com
  2023-12-19 16:57 ` [Bug middle-end/113084] " pinskia at gcc dot gnu.org
@ 2023-12-19 16:57 ` pinskia at gcc dot gnu.org
  2023-12-19 17:26 ` pinskia at gcc dot gnu.org
  2024-01-26  5:19 ` [Bug target/113084] " pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-19 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

* [Bug middle-end/113084] aarch64: vget_low blocks tail-call
  2023-12-19 16:30 [Bug target/113084] New: aarch64: vget_low blocks tail-call joe.ramsay at arm dot com
  2023-12-19 16:57 ` [Bug middle-end/113084] " pinskia at gcc dot gnu.org
  2023-12-19 16:57 ` pinskia at gcc dot gnu.org
@ 2023-12-19 17:26 ` pinskia at gcc dot gnu.org
  2024-01-26  5:19 ` [Bug target/113084] " pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-19 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=14441,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=107503
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-12-19

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also related to PR 107503 .

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

* [Bug target/113084] aarch64: vget_low blocks tail-call
  2023-12-19 16:30 [Bug target/113084] New: aarch64: vget_low blocks tail-call joe.ramsay at arm dot com
                   ` (2 preceding siblings ...)
  2023-12-19 17:26 ` pinskia at gcc dot gnu.org
@ 2024-01-26  5:19 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-26  5:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |target

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh __builtin_aarch64_get_lowv4sf is not lowered to BIT_FIELD_REF either which
it can be now.

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

end of thread, other threads:[~2024-01-26  5:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 16:30 [Bug target/113084] New: aarch64: vget_low blocks tail-call joe.ramsay at arm dot com
2023-12-19 16:57 ` [Bug middle-end/113084] " pinskia at gcc dot gnu.org
2023-12-19 16:57 ` pinskia at gcc dot gnu.org
2023-12-19 17:26 ` pinskia at gcc dot gnu.org
2024-01-26  5:19 ` [Bug target/113084] " 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).