https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68101

            Bug ID: 68101
           Summary: Provide a way to allocate arrays aligned to 32 bytes
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com
  Target Milestone: ---

This is an extension of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24261
which is claimed to be RESOLVED FIXED, but is not when `-m32` is used.

There should be a way to allocate aligned arrays independently of what malloc()
does, be it using a command-line option or a directive. It is very important
for SIMD friendly code, particularly with !$omp simd which gfortran now
supports.

With pointer arrays we can just point to a position a few bytes after the
allocated buffer, but we cannot do this with allocatable arrays. Other Fortran 
processors do have similar extensions.

According to this reference
https://software.intel.com/en-us/articles/practical-intel-avx-optimization-on-2nd-generation-intel-core-processors?language=en
:
"Similarly, to achieve best results use Intel AVX instructions on 32-byte
vectors that are 32-byte aligned."
"It is important to make every effort to align the data to 32 bytes in advance
to avoid potential performance degradation."

Reply via email to