| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -mvis2" } */ |
| 3 |
|
| 4 |
typedef long long int64_t; |
| 5 |
typedef int vec32 __attribute__((vector_size(8))); |
| 6 |
typedef short vec16 __attribute__((vector_size(8))); |
| 7 |
typedef unsigned char vec8 __attribute__((vector_size(8))); |
| 8 |
|
| 9 |
long test_bmask (long x, long y) |
| 10 |
{ |
| 11 |
return __builtin_vis_bmask (x, y); |
| 12 |
} |
| 13 |
|
| 14 |
vec16 test_bshufv4hi (vec16 x, vec16 y) |
| 15 |
{ |
| 16 |
return __builtin_vis_bshufflev4hi (x, y); |
| 17 |
} |
| 18 |
|
| 19 |
vec32 test_bshufv2si (vec32 x, vec32 y) |
| 20 |
{ |
| 21 |
return __builtin_vis_bshufflev2si (x, y); |
| 22 |
} |
| 23 |
|
| 24 |
vec8 test_bshufv8qi (vec8 x, vec8 y) |
| 25 |
{ |
| 26 |
return __builtin_vis_bshufflev8qi (x, y); |
| 27 |
} |
| 28 |
|
| 29 |
int64_t test_bshufdi (int64_t x, int64_t y) |
| 30 |
{ |
| 31 |
return __builtin_vis_bshuffledi (x, y); |
| 32 |
} |
| 33 |
|
| 34 |
/* { dg-final { scan-assembler "bmask\t%" } } */ |
| 35 |
/* { dg-final { scan-assembler "bshuffle\t%" } } */ |