aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/vect.x
blob: c0f79b50b80e8f983bf62c42cb7ced810303f997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
typedef int *__restrict__ pRINT;
typedef unsigned int *__restrict__ pRUINT;
typedef long long *__restrict__ pRINT64;
typedef unsigned long long *__restrict__ pRUINT64;

void test_orn (pRUINT a, pRUINT b, pRUINT c)
{
  int i;
  for (i = 0; i < 16; i++)
     c[i] = a[i] | (~b[i]);
}

void test_bic (pRUINT a, pRUINT b, pRUINT c)
{
  int i;
  for (i = 0; i < 16; i++)
     c[i] = a[i] & (~b[i]);
}

void mla (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] += a[i] * b[i]; 
}

void mls (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] -= a[i] * b[i];
}

void smax (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] = (a[i] > b[i] ? a[i] : b[i]);
}

void smin (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] = (a[i] < b[i] ? a[i] : b[i]);
}

void umax (pRUINT a, pRUINT b, pRUINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] = (a[i] > b[i] ? a[i] : b[i]);
}

void umin (pRUINT a, pRUINT b, pRUINT c)
{
  int i;
  for (i=0;i<16;i++)
    c[i] = (a[i] < b[i] ? a[i] : b[i]);
}

unsigned int reduce_umax (pRUINT a)
{
  int i;
  unsigned int s = a[0];
  for (i = 1; i < 16; i++)
    s = (s > a[i] ? s : a[i]);

  return s;
}

unsigned int reduce_umin (pRUINT a)
{
  int i;
  unsigned int s = a[0];
  for (i = 1; i < 16; i++)
    s = (s < a[i] ? s : a[i]);

  return s;
}

int reduce_smax (pRINT a)
{
  int i;
  int s = a[0];
  for (i = 1; i < 16; i++)
    s = (s > a[i] ? s : a[i]);

  return s;
}

int reduce_smin (pRINT a)
{
  int i;
  int s = a[0];
  for (i = 1; i < 16; i++)
    s = (s < a[i] ? s : a[i]);

  return s;
}

unsigned int reduce_add_u32 (pRINT a)
{
  int i;
  unsigned int s = 0;
  for (i = 0; i < 16; i++)
    s += a[i];

  return s;
}

int reduce_add_s32 (pRINT a)
{
  int i;
  int s = 0;
  for (i = 0; i < 16; i++)
    s += a[i];

  return s;
}

unsigned long long reduce_add_u64 (pRUINT64 a)
{
  int i;
  unsigned long long s = 0;
  for (i = 0; i < 16; i++)
    s += a[i];

  return s;
}

long long reduce_add_s64 (pRINT64 a)
{
  int i;
  long long s = 0;
  for (i = 0; i < 16; i++)
    s += a[i];

  return s;
}

void sabd (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i = 0; i < 16; i++)
    c[i] = abs (a[i] - b[i]);
}

void saba (pRINT a, pRINT b, pRINT c)
{
  int i;
  for (i = 0; i < 16; i++)
    c[i] += abs (a[i] - b[i]);
}