[Bug c/20982] New: alignment attribute ignired for vector types
Hakon dot Bugge at scali dot com
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 23:34:00 GMT 2005
creating a vector type aligned on a smaller unit than the size of the vector,
produces incorrect SSE code. On Intel SSE, movups must be used instead of movaps,
and memory operands to other SSE instructons must be avoided.
E.g. :
typedef float v4sf __attribute__ ((mode(V4SF),aligned(8)));
v4sf foo(v4sf *p, v4sf *q) {
return *p + *q;
}
produces
0: 0f 28 07 movaps (%rdi),%xmm0
3: 0f 58 06 addps (%rsi),%xmm0
6: c3 retq
it should have been something like:
movups (%rdi),%xmm0
movups (%rsi),%xmm1
addps %xmm1, %xmm0
retq
Thanks, HÃ¥kon
--
Summary: alignment attribute ignired for vector types
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Hakon dot Bugge at scali dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.4.3
GCC host triplet: 3.4.3
GCC target triplet: 3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20982
More information about the Gcc-bugs
mailing list