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