------- Comment #1 from pinskia at gmail dot com 2010-03-02 05:24 ------- Subject: Re: New: Structure copies not vectorized
Sent from my iPhone On Mar 1, 2010, at 8:23 PM, "astrange at ithinksw dot com" <gcc-bugzi...@gcc.gnu.org > wrote: > Source: > > #include <emmintrin.h> > > struct a1 { char l[16];}; Are sure that struct has 128 bit alignment because I think it only has 8bit alignment. > struct a2 { __m128i l; }; > > void f1(struct a1 *a, struct a1 *b) > { > *a = *b; > } > > void f2(struct a2 *a, struct a2 *b) > { > *a = *b; > } > >> /usr/local/gcc45/bin/gcc -O3 -fomit-frame-pointer -S copy_gcc.c > _f1: > movq (%rsi), %rax > movq %rax, (%rdi) > movq 8(%rsi), %rax > movq %rax, 8(%rdi) > ret > > _f2: > movdqa (%rsi), %xmm0 > movdqa %xmm0, (%rdi) > ret > > Both are appropriately aligned and should use movdqa. This might not > show up in > generic code, but I could have used it in an ffmpeg optimization. > > > -- > Summary: Structure copies not vectorized > Product: gcc > Version: 4.5.0 > Status: UNCONFIRMED > Severity: enhancement > Priority: P3 > Component: target > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: astrange at ithinksw dot com > GCC host triplet: x86_64-*-* > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43225 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43225