aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sparc/bmaskbshuf.c
blob: 22809b5f5e997eca2a1192357a5aabf3937216b3 (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
31
32
33
34
35
/* { dg-do compile } */
/* { dg-options "-O -mvis2" } */

typedef long long int64_t;
typedef int vec32 __attribute__((vector_size(8)));
typedef short vec16 __attribute__((vector_size(8)));
typedef unsigned char vec8 __attribute__((vector_size(8)));

long test_bmask (long x, long y)
{
  return __builtin_vis_bmask (x, y);
}

vec16 test_bshufv4hi (vec16 x, vec16 y)
{
  return __builtin_vis_bshufflev4hi (x, y);
}

vec32 test_bshufv2si (vec32 x, vec32 y)
{
  return __builtin_vis_bshufflev2si (x, y);
}

vec8 test_bshufv8qi (vec8 x, vec8 y)
{
  return __builtin_vis_bshufflev8qi (x, y);
}

int64_t test_bshufdi (int64_t x, int64_t y)
{
  return __builtin_vis_bshuffledi (x, y);
}

/* { dg-final { scan-assembler "bmask\t%" } } */
/* { dg-final { scan-assembler "bshuffle\t%" } } */