This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43225] Structure copies not vectorized
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2010 05:24:27 -0000
- Subject: [Bug target/43225] Structure copies not vectorized
- References: <bug-43225-10175@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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-bugzilla@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