This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Vectorizer/alignment
- From: Hendrik Greving <hendrik dot greving dot intel at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, Richard Henderson <rth at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 11 Nov 2013 20:26:24 -0800
- Subject: Re: Vectorizer/alignment
- Authentication-results: sourceware.org; auth=none
- References: <CANc4vhqiMCbkHHbKjY-tPmvi7iU4wXP4Jf_4S83jGTBJTCCi3Q at mail dot gmail dot com> <3a0cd1a6-76c9-4539-9830-8ddbf5405db3 at email dot android dot com> <CANc4vhobNfNQkm1HdFjL5c1tUnxOiNyumFG5XUCb71LRxBdU5g at mail dot gmail dot com> <CAFiYyc0G5vCtQp9Zy-xUyfeK6475FrVn++yacW1kB_v5H+nTjQ at mail dot gmail dot com> <20131111113922 dot GW27813 at tucnak dot zalov dot cz> <CAFiYyc0TtYQUaaYCkVYKMbMu3o7XrG_Sd8HbwbNGxpto4-wcgw at mail dot gmail dot com> <20131111133926 dot GX27813 at tucnak dot zalov dot cz> <CAFiYyc0AHfKdmOT5ovL5TgvPyF0-H2qHroFwLWCGaeCxB3X4OQ at mail dot gmail dot com> <5281448D dot 8020401 at redhat dot com> <CAGWvnym+Rn0B7U=cP8+S99AVYq4g+Ekwbw9RRAwrHBdefW6Ppw at mail dot gmail dot com> <CANc4vhrK6WC+FoU8jz-1U6SOZ0yH7DpDJ8oESvWN-PK7yo_MHQ at mail dot gmail dot com> <CAMe9rOqcwuoPe8zbb0o1=eEm-+nz1OnFQq0hZAnB8R9Y61mWvA at mail dot gmail dot com>
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.