Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / vect.x
bloba2b2c632d817de3a304cc8f85507cee152ec7596
1 typedef int *__restrict__ pRINT;
2 typedef unsigned int *__restrict__ pRUINT;
3 typedef long long *__restrict__ pRINT64;
4 typedef unsigned long long *__restrict__ pRUINT64;
5 extern int abs (int j);
7 void test_orn (pRUINT a, pRUINT b, pRUINT c)
9   int i;
10   for (i = 0; i < 16; i++)
11      c[i] = a[i] | (~b[i]);
14 void test_bic (pRUINT a, pRUINT b, pRUINT c)
16   int i;
17   for (i = 0; i < 16; i++)
18      c[i] = a[i] & (~b[i]);
21 void mla (pRINT a, pRINT b, pRINT c)
23   int i;
24   for (i=0;i<16;i++)
25     c[i] += a[i] * b[i]; 
28 void mls (pRINT a, pRINT b, pRINT c)
30   int i;
31   for (i=0;i<16;i++)
32     c[i] -= a[i] * b[i];
35 void smax (pRINT a, pRINT b, pRINT c)
37   int i;
38   for (i=0;i<16;i++)
39     c[i] = (a[i] > b[i] ? a[i] : b[i]);
42 void smin (pRINT a, pRINT b, pRINT c)
44   int i;
45   for (i=0;i<16;i++)
46     c[i] = (a[i] < b[i] ? a[i] : b[i]);
49 void umax (pRUINT a, pRUINT b, pRUINT c)
51   int i;
52   for (i=0;i<16;i++)
53     c[i] = (a[i] > b[i] ? a[i] : b[i]);
56 void umin (pRUINT a, pRUINT b, pRUINT c)
58   int i;
59   for (i=0;i<16;i++)
60     c[i] = (a[i] < b[i] ? a[i] : b[i]);
63 unsigned int reduce_umax (pRUINT a)
65   int i;
66   unsigned int s = a[0];
67   for (i = 1; i < 16; i++)
68     s = (s > a[i] ? s : a[i]);
70   return s;
73 unsigned int reduce_umin (pRUINT a)
75   int i;
76   unsigned int s = a[0];
77   for (i = 1; i < 16; i++)
78     s = (s < a[i] ? s : a[i]);
80   return s;
83 int reduce_smax (pRINT a)
85   int i;
86   int s = a[0];
87   for (i = 1; i < 16; i++)
88     s = (s > a[i] ? s : a[i]);
90   return s;
93 int reduce_smin (pRINT a)
95   int i;
96   int s = a[0];
97   for (i = 1; i < 16; i++)
98     s = (s < a[i] ? s : a[i]);
100   return s;
103 unsigned int reduce_add_u32 (pRINT a)
105   int i;
106   unsigned int s = 0;
107   for (i = 0; i < 16; i++)
108     s += a[i];
110   return s;
113 int reduce_add_s32 (pRINT a)
115   int i;
116   int s = 0;
117   for (i = 0; i < 16; i++)
118     s += a[i];
120   return s;
123 unsigned long long reduce_add_u64 (pRUINT64 a)
125   int i;
126   unsigned long long s = 0;
127   for (i = 0; i < 16; i++)
128     s += a[i];
130   return s;
133 long long reduce_add_s64 (pRINT64 a)
135   int i;
136   long long s = 0;
137   for (i = 0; i < 16; i++)
138     s += a[i];
140   return s;
143 void sabd (pRINT a, pRINT b, pRINT c)
145   int i;
146   for (i = 0; i < 16; i++)
147     c[i] = abs (a[i] - b[i]);
150 void saba (pRINT a, pRINT b, pRINT c)
152   int i;
153   for (i = 0; i < 16; i++)
154     c[i] += abs (a[i] - b[i]);