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

            Bug ID: 65375
           Summary: poor codegen for ld[234]/st[234]
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kugan at gcc dot gnu.org

#include <arm_neon.h>
void hello_vst2(float* fout, float *fin)
{
float32x4x2_t a;
a = vld2q_f32 (fin);
vst2q_f32 (fout, a);
}


with aarch64-none-linux-gnu-gcc  -O2 -ffast-math -unsafe-math-optimisations
produces:

    .cpu generic+fp+simd
    .file    "neon.c"
    .text
    .align    2
    .p2align 3,,7
    .global    hello_vst2
    .type    hello_vst2, %function
hello_vst2:
    ld2    {v0.4s - v1.4s}, [x1]
    sub    sp, sp, #32
    umov    x1, v0.d[0]
    umov    x2, v0.d[1]
    str    q1, [sp, 16]
    mov    x5, x1
    stp    x5, x2, [sp]
    ld1    {v0.16b - v1.16b}, [sp]
    st2    {v0.4s - v1.4s}, [x0]
    add    sp, sp, 32
    ret
    .size    hello_vst2, .-hello_vst2
    .ident    "GCC: (GNU) 5.0.0 20150305 (experimental)"
    .section    .note.GNU-stack,"",%progbits

Reply via email to