http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47397
Summary: GCC not correctly define alignment of memory in AVX
mode
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
In
---
double a[NUM], b[NUM];
void foo()
{
for (i = 0; i < N; i++)
{
b[i] = a[i+2] * 10.0;
}
}
---
both "a" and "b" are aligned at 32byte/256bits. However, RTL dump from
"-O3 -mavx" shows that alignment of a[i+2] is 64bits instead of 128bits
as expected:
(insn 39 38 40 4 (set (mem:V4DF (plus:DI (reg/f:DI 95)
(reg:DI 80 [ ivtmp.21 ])) [2 MEM[symbol: b, index: ivtmp.21_20,
offset: 16B]+0 S32 A64])
(unspec:V4DF [
(reg:V4DF 93)
] UNSPEC_MOVU)) align.c:64 -1
(nil))