aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c
blob: a29240754f653924ab830cdd807d002f9d224aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */

#include <stddef.h>

#ifndef SIZE
#define SIZE 1024
#endif

#ifndef ALIGN
#define ALIGN 32
#endif

#define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))

long long sign_ll[SIZE]	ALIGN_ATTR;
int	  sign_i [SIZE]	ALIGN_ATTR;

void copy_int_to_long_long (void)
{
  size_t i;

  for (i = 0; i < SIZE; i++)
    sign_ll[i] = sign_i[i];
}

/* { dg-final { scan-assembler "vupkhsw" } } */
/* { dg-final { scan-assembler "vupklsw" } } */