This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/47397] New: GCC not correctly define alignment of memory in AVX mode


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: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]