[Bug target/66115] When using -O0 with -mavx the compiler uses aligned loads for possibly unaligned function parameters

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 12 06:07:00 GMT 2015


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is the requirement.  _mm*_loadu* are a special case, but the C __m128i type
itself requires 16-byte alignment.  Just print __alignof__ (__m128i)...
Just use _mm*_loadu* if the load is from unaligned pointer, and recent versions
should when optimizing be able to optimize that case into a memory load in AVX
instruction.



More information about the Gcc-bugs mailing list