Hi,
Please note that currently the test:
int a[N];
short b[N*2];
for (int i = 0; i < N; ++i)
a[i] = b[i*2];
Is compiled to (with -march=corei7 -O2 -ftree-vectorize):
movdqa b(%rax), %xmm0
movdqa b-16(%rax), %xmm2
pand%xmm1, %xmm0
pand%xmm1, %xmm2
On Tue, Jun 24, 2014 at 4:05 AM, Richard Biener
wrote:
> On Sat, May 3, 2014 at 2:39 AM, Cong Hou wrote:
>> On Mon, Apr 28, 2014 at 4:04 AM, Richard Biener wrote:
>>> On Thu, 24 Apr 2014, Cong Hou wrote:
>>>
Given the following loop:
int a[N];
short b[N*2];
for (int
On Sat, May 3, 2014 at 2:39 AM, Cong Hou wrote:
> On Mon, Apr 28, 2014 at 4:04 AM, Richard Biener wrote:
>> On Thu, 24 Apr 2014, Cong Hou wrote:
>>
>>> Given the following loop:
>>>
>>> int a[N];
>>> short b[N*2];
>>>
>>> for (int i = 0; i < N; ++i)
>>> a[i] = b[i*2];
>>>
>>>
>>> After being ve
On Mon, Apr 28, 2014 at 4:04 AM, Richard Biener wrote:
> On Thu, 24 Apr 2014, Cong Hou wrote:
>
>> Given the following loop:
>>
>> int a[N];
>> short b[N*2];
>>
>> for (int i = 0; i < N; ++i)
>> a[i] = b[i*2];
>>
>>
>> After being vectorized, the access to b[i*2] will be compiled into
>> several
On Thu, 24 Apr 2014, Cong Hou wrote:
> Given the following loop:
>
> int a[N];
> short b[N*2];
>
> for (int i = 0; i < N; ++i)
> a[i] = b[i*2];
>
>
> After being vectorized, the access to b[i*2] will be compiled into
> several packing statements, while the type promotion from short to int
>
Given the following loop:
int a[N];
short b[N*2];
for (int i = 0; i < N; ++i)
a[i] = b[i*2];
After being vectorized, the access to b[i*2] will be compiled into
several packing statements, while the type promotion from short to int
will be compiled into several unpacking statements. With this