summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/vec-cg.c
blob: c31d217d880eaf6db93eff19ee4e01d5076a2619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Test code generation of vector built-ins.  We don't have this for
   most of ours today.  As new built-ins are added, please add to this
   test case.  Update as necessary to add VSX, P8-vector, P9-vector,
   etc. */

/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O0" } */

#include <altivec.h>

static vector signed int i, *pi;
static int int1;

void
b()
{
  i = __builtin_altivec_lvxl (int1, pi);
  i = vec_lvxl (int1, pi);
}

/* { dg-final { scan-assembler-times "lvxl" 2 } } */