summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c
blob: a116316c17406df5d6c2491cd7fd67463e89862b (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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/* { dg-do compile { target { powerpc64-*-* } } } */
/* { dg-skip-if "do not override mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
/* { dg-options "-mcpu=power9 -O0" } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
/* { dg-final { scan-assembler-times "lxvx" 40 } } */
/* { dg-final { scan-assembler-times "stxvx" 40 } } */

#include <altivec.h>

extern vector double vd, *vdp;
extern vector signed long long vsll, *vsllp;
extern vector unsigned long long vull, *vullp;
extern vector float vf, *vfp;
extern vector signed int vsi, *vsip;
extern vector unsigned int vui, *vuip;
extern vector signed short vss, *vssp;
extern vector unsigned short vus, *vusp;
extern vector signed char vsc, *vscp;
extern vector unsigned char vuc, *vucp;
extern double *dp;
extern signed long long *sllp;
extern unsigned long long *ullp;
extern float *fp;
extern signed int *sip;
extern unsigned int *uip;
extern signed short *ssp;
extern unsigned short *usp;
extern signed char *scp;
extern unsigned char *ucp;

void foo0 (void)
{
  vd = vec_xl (0, vdp);
}

void foo1 (void)
{
  vsll = vec_xl (0, vsllp);
}

void foo2 (void)
{
  vull = vec_xl (0, vullp);
}

void foo3 (void)
{
  vf = vec_xl (0, vfp);
}

void foo4 (void)
{
  vsi = vec_xl (0, vsip);
}

void foo5 (void)
{
  vui = vec_xl (0, vuip);
}

void foo6 (void)
{
  vss = vec_xl (0, vssp);
}

void foo7 (void)
{
  vus = vec_xl (0, vusp);
}

void foo8 (void)
{
  vsc = vec_xl (0, vscp);
}

void foo9 (void)
{
  vuc = vec_xl (0, vucp);
}

void foo10 (void)
{
  vec_xst (vd, 0, vdp);
}

void foo11 (void)
{
  vec_xst (vsll, 0, vsllp);
}

void foo12 (void)
{
  vec_xst (vull, 0, vullp);
}

void foo13 (void)
{
  vec_xst (vf, 0, vfp);
}

void foo14 (void)
{
  vec_xst (vsi, 0, vsip);
}

void foo15 (void)
{
  vec_xst (vui, 0, vuip);
}

void foo16 (void)
{
  vec_xst (vss, 0, vssp);
}

void foo17 (void)
{
  vec_xst (vus, 0, vusp);
}

void foo18 (void)
{
  vec_xst (vsc, 0, vscp);
}

void foo19 (void)
{
  vec_xst (vuc, 0, vucp);
}

void foo20 (void)
{
  vd = vec_xl (0, dp);
}

void foo21 (void)
{
  vsll = vec_xl (0, sllp);
}

void foo22 (void)
{
  vull = vec_xl (0, ullp);
}

void foo23 (void)
{
  vf = vec_xl (0, fp);
}

void foo24 (void)
{
  vsi = vec_xl (0, sip);
}

void foo25 (void)
{
  vui = vec_xl (0, uip);
}

void foo26 (void)
{
  vss = vec_xl (0, ssp);
}

void foo27 (void)
{
  vus = vec_xl (0, usp);
}

void foo28 (void)
{
  vsc = vec_xl (0, scp);
}

void foo29 (void)
{
  vuc = vec_xl (0, ucp);
}

void foo30 (void)
{
  vec_xst (vd, 0, dp);
}

void foo31 (void)
{
  vec_xst (vsll, 0, sllp);
}

void foo32 (void)
{
  vec_xst (vull, 0, ullp);
}

void foo33 (void)
{
  vec_xst (vf, 0, fp);
}

void foo34 (void)
{
  vec_xst (vsi, 0, sip);
}

void foo35 (void)
{
  vec_xst (vui, 0, uip);
}

void foo36 (void)
{
  vec_xst (vss, 0, ssp);
}

void foo37 (void)
{
  vec_xst (vus, 0, usp);
}

void foo38 (void)
{
  vec_xst (vsc, 0, scp);
}

void foo39 (void)
{
  vec_xst (vuc, 0, ucp);
}