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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-tgl-3 pr124697]$ cat foo.c
typedef double v4df __attribute__((vector_size(32)));
typedef double v2df __attribute__((vector_size(16)));
typedef struct {
  v2df a[2];
} c __attribute__((aligned(32)));
extern v4df d;
void
e (float a1, float a2, float a3, float a4, float a5, float a6, c f)
{
  d = *(v4df *) &f;
}
[hjl@gnu-tgl-3 pr124697]$ make foo.s
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -O2
-march=x86-64-v4 -S foo.c
[hjl@gnu-tgl-3 pr124697]$ cat foo.s
        .file   "foo.c"
        .text
        .p2align 4
        .globl  e
        .type   e, @function
e:
.LFB0:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        vmovapd 16(%rbp), %ymm0  <<<<<<< f is aligned at 16 bytes.
        vmovapd %ymm0, d(%rip)
        vzeroupper
        popq    %rbp
        .cfi_def_cfa 7, 8
        ret
        .cfi_endproc
.LFE0:
        .size   e, .-e
        .ident  "GCC: (GNU) 16.0.1 20260331 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tgl-3 pr124697]$

Reply via email to