This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78853] aligned reads/writes (vmovdqa) emitted when no such guarantee can be made
- From: "gonnet at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Dec 2016 14:33:03 +0000
- Subject: [Bug target/78853] aligned reads/writes (vmovdqa) emitted when no such guarantee can be made
- Auto-submitted: auto-generated
- References: <bug-78853-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78853
--- Comment #3 from Pedro Gonnet <gonnet at google dot com> ---
OK, thanks for clarifying!
The declaration of __m256i only specifies the attributes vector_size and
may_alias
(https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/avxintrin.h;hb=HEAD#l56),
so I'm guessing vector_size implies alignment? This does not seem to be
documented anywhere obvious.
Also interesting is that icc-17 produces unaligned load/stores for the same
code, but there is no amount of __attribute__((aligned(32))) that will make
them aligned.
In any case I'll use the __m*_u types to make an unaligned version of my
memswap function.