Debian Codegraph @

gcc/testsuite/gcc.target/sparc/vis3misc.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mvis3b" } */
3
4 typedef int __v2si __attribute__((vector_size(8)));
5 typedef short __v4hi __attribute__((vector_size(8)));
6 typedef unsigned char __v8qi __attribute__((vector_size(8)));
7 typedef long long int64_t;
8
9 __v4hi test_fchksm16 (__v4hi x, __v4hi y)
10 {
11 return __builtin_vis_fchksm16 (x, y);
12 }
13
14 long test_pdistn (__v8qi x, __v8qi y)
15 {
16 return __builtin_vis_pdistn (x, y);
17 }
18
19 __v4hi test_fmean16 (__v4hi x, __v4hi y)
20 {
21 return __builtin_vis_fmean16 (x, y);
22 }
23
24 int64_t test_fpadd64 (int64_t x, int64_t y)
25 {
26 return __builtin_vis_fpadd64 (x, y);
27 }
28
29 int64_t test_fpsub64 (int64_t x, int64_t y)
30 {
31 return __builtin_vis_fpsub64 (x, y);
32 }
33
34 /* { dg-final { scan-assembler "fchksm16\t%" } } */
35 /* { dg-final { scan-assembler "pdistn\t%" } } */
36 /* { dg-final { scan-assembler "fmean16\t%" } } */
37 /* { dg-final { scan-assembler "fpadd64\t%" } } */
38 /* { dg-final { scan-assembler "fpsub64\t%" } } */