| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mcpu=ultrasparc -mvis" } */ |
| 3 |
typedef long long int64_t; |
| 4 |
typedef unsigned char vec8 __attribute__((vector_size(8))); |
| 5 |
|
| 6 |
int64_t foo (vec8 a, vec8 b) { |
| 7 |
int64_t d = 0; |
| 8 |
d = __builtin_vis_pdist (a, b, d); |
| 9 |
return d; |
| 10 |
} |
| 11 |
|
| 12 |
int64_t bar (vec8 a, vec8 b) { |
| 13 |
int64_t d = 0; |
| 14 |
return __builtin_vis_pdist (a, b, d); |
| 15 |
} |
| 16 |
|
| 17 |
int64_t baz (vec8 a, vec8 b, int64_t d) { |
| 18 |
int64_t e = __builtin_vis_pdist (a, b, d); |
| 19 |
return e + d; |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-assembler-times "pdist\t%" 3 } } */ |