2014-10-24 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gcc.target / sparc / pdist.c
blob6ecc20aa178c4aa576382bf4e2937c834eecf087
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)));
6 int64_t foo (vec8 a, vec8 b) {
7 int64_t d = 0;
8 d = __builtin_vis_pdist (a, b, d);
9 return d;
12 int64_t bar (vec8 a, vec8 b) {
13 int64_t d = 0;
14 return __builtin_vis_pdist (a, b, d);
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;
22 /* { dg-final { scan-assembler-times "pdist\t%" 3 } } */