This is the mail archive of the gcc@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]

Re: Vectorizer/alignment


I've filed bug 59084. I think it actually might affect the same x86
backend stuff as bug 41464.
Hendrik

On Mon, Nov 11, 2013 at 4:00 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Nov 11, 2013 at 2:48 PM, Hendrik Greving
> <hendrik.greving.intel@gmail.com> wrote:
>> Ok, thanks, that explains it... Apparently x86 splits the vector movs
>> into 2 in ix86_expand_vector_move_misalign->ix86_avx256_split_vector_move_misalign.
>> But I wanted to mention that e.g. icc, despite also putting g_a, g_b,
>> g_c into .comm, actually generates AVX2 vmovdqu using ymm...
>>
>> Examples:
>>
>> foo.c:
>>
>> #include <stdio.h>
>> #include <stdint.h>
>> #include "foo.h"
>>
>> int g_a[LENGTH];
>> int g_b[LENGTH];
>> int g_c[LENGTH];
>> void
>> foo()
>> {
>>     int i ;
>>     for (i = 0; i < LENGTH; i++) {
>>         g_c[i] = g_a[i] + g_b[i];
>>     }
>> }
>>
>> icc:
>> icc/13.1.3/bin/icc -S -O3 -march=core-avx2 foo.c -v -save-temps -vec-report=2
>>
>> gcc:
>> gcc -S -O3 -march=core-avx2 foo.c -ftree-vectorizer-verbose=1 -dp -v -da
>>
>>
>
> Please open a bug.  We will fix it.
>
> Thanks.
>
> --
> H.J.


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