• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test the basic functionality of integer element promotions of different types.
2; This tests checks passing of arguments, loading and storing to memory and
3; basic arithmetic.
4; RUN: llc -march=x86 < %s > /dev/null
5; RUN: llc -march=x86-64 < %s > /dev/null
6
7define <1 x i8> @test_1xi8(<1 x i8> %x, <1 x i8>* %b) {
8  %bb = load <1 x i8>, <1 x i8>* %b
9  %tt = xor <1 x i8> %x, %bb
10  store <1 x i8> %tt, <1 x i8>* %b
11  br label %next
12
13next:
14  ret <1 x i8> %tt
15}
16
17
18define <1 x i16> @test_1xi16(<1 x i16> %x, <1 x i16>* %b) {
19  %bb = load <1 x i16>, <1 x i16>* %b
20  %tt = xor <1 x i16> %x, %bb
21  store <1 x i16> %tt, <1 x i16>* %b
22  br label %next
23
24next:
25  ret <1 x i16> %tt
26}
27
28
29define <1 x i32> @test_1xi32(<1 x i32> %x, <1 x i32>* %b) {
30  %bb = load <1 x i32>, <1 x i32>* %b
31  %tt = xor <1 x i32> %x, %bb
32  store <1 x i32> %tt, <1 x i32>* %b
33  br label %next
34
35next:
36  ret <1 x i32> %tt
37}
38
39
40define <1 x i64> @test_1xi64(<1 x i64> %x, <1 x i64>* %b) {
41  %bb = load <1 x i64>, <1 x i64>* %b
42  %tt = xor <1 x i64> %x, %bb
43  store <1 x i64> %tt, <1 x i64>* %b
44  br label %next
45
46next:
47  ret <1 x i64> %tt
48}
49
50
51define <1 x i128> @test_1xi128(<1 x i128> %x, <1 x i128>* %b) {
52  %bb = load <1 x i128>, <1 x i128>* %b
53  %tt = xor <1 x i128> %x, %bb
54  store <1 x i128> %tt, <1 x i128>* %b
55  br label %next
56
57next:
58  ret <1 x i128> %tt
59}
60
61
62define <1 x i256> @test_1xi256(<1 x i256> %x, <1 x i256>* %b) {
63  %bb = load <1 x i256>, <1 x i256>* %b
64  %tt = xor <1 x i256> %x, %bb
65  store <1 x i256> %tt, <1 x i256>* %b
66  br label %next
67
68next:
69  ret <1 x i256> %tt
70}
71
72
73define <1 x i512> @test_1xi512(<1 x i512> %x, <1 x i512>* %b) {
74  %bb = load <1 x i512>, <1 x i512>* %b
75  %tt = xor <1 x i512> %x, %bb
76  store <1 x i512> %tt, <1 x i512>* %b
77  br label %next
78
79next:
80  ret <1 x i512> %tt
81}
82
83
84define <2 x i8> @test_2xi8(<2 x i8> %x, <2 x i8>* %b) {
85  %bb = load <2 x i8>, <2 x i8>* %b
86  %tt = xor <2 x i8> %x, %bb
87  store <2 x i8> %tt, <2 x i8>* %b
88  br label %next
89
90next:
91  ret <2 x i8> %tt
92}
93
94
95define <2 x i16> @test_2xi16(<2 x i16> %x, <2 x i16>* %b) {
96  %bb = load <2 x i16>, <2 x i16>* %b
97  %tt = xor <2 x i16> %x, %bb
98  store <2 x i16> %tt, <2 x i16>* %b
99  br label %next
100
101next:
102  ret <2 x i16> %tt
103}
104
105
106define <2 x i32> @test_2xi32(<2 x i32> %x, <2 x i32>* %b) {
107  %bb = load <2 x i32>, <2 x i32>* %b
108  %tt = xor <2 x i32> %x, %bb
109  store <2 x i32> %tt, <2 x i32>* %b
110  br label %next
111
112next:
113  ret <2 x i32> %tt
114}
115
116
117define <2 x i64> @test_2xi64(<2 x i64> %x, <2 x i64>* %b) {
118  %bb = load <2 x i64>, <2 x i64>* %b
119  %tt = xor <2 x i64> %x, %bb
120  store <2 x i64> %tt, <2 x i64>* %b
121  br label %next
122
123next:
124  ret <2 x i64> %tt
125}
126
127
128define <2 x i128> @test_2xi128(<2 x i128> %x, <2 x i128>* %b) {
129  %bb = load <2 x i128>, <2 x i128>* %b
130  %tt = xor <2 x i128> %x, %bb
131  store <2 x i128> %tt, <2 x i128>* %b
132  br label %next
133
134next:
135  ret <2 x i128> %tt
136}
137
138
139define <2 x i256> @test_2xi256(<2 x i256> %x, <2 x i256>* %b) {
140  %bb = load <2 x i256>, <2 x i256>* %b
141  %tt = xor <2 x i256> %x, %bb
142  store <2 x i256> %tt, <2 x i256>* %b
143  br label %next
144
145next:
146  ret <2 x i256> %tt
147}
148
149
150define <2 x i512> @test_2xi512(<2 x i512> %x, <2 x i512>* %b) {
151  %bb = load <2 x i512>, <2 x i512>* %b
152  %tt = xor <2 x i512> %x, %bb
153  store <2 x i512> %tt, <2 x i512>* %b
154  br label %next
155
156next:
157  ret <2 x i512> %tt
158}
159
160
161define <3 x i8> @test_3xi8(<3 x i8> %x, <3 x i8>* %b) {
162  %bb = load <3 x i8>, <3 x i8>* %b
163  %tt = xor <3 x i8> %x, %bb
164  store <3 x i8> %tt, <3 x i8>* %b
165  br label %next
166
167next:
168  ret <3 x i8> %tt
169}
170
171
172define <3 x i16> @test_3xi16(<3 x i16> %x, <3 x i16>* %b) {
173  %bb = load <3 x i16>, <3 x i16>* %b
174  %tt = xor <3 x i16> %x, %bb
175  store <3 x i16> %tt, <3 x i16>* %b
176  br label %next
177
178next:
179  ret <3 x i16> %tt
180}
181
182
183define <3 x i32> @test_3xi32(<3 x i32> %x, <3 x i32>* %b) {
184  %bb = load <3 x i32>, <3 x i32>* %b
185  %tt = xor <3 x i32> %x, %bb
186  store <3 x i32> %tt, <3 x i32>* %b
187  br label %next
188
189next:
190  ret <3 x i32> %tt
191}
192
193
194define <3 x i64> @test_3xi64(<3 x i64> %x, <3 x i64>* %b) {
195  %bb = load <3 x i64>, <3 x i64>* %b
196  %tt = xor <3 x i64> %x, %bb
197  store <3 x i64> %tt, <3 x i64>* %b
198  br label %next
199
200next:
201  ret <3 x i64> %tt
202}
203
204
205define <3 x i128> @test_3xi128(<3 x i128> %x, <3 x i128>* %b) {
206  %bb = load <3 x i128>, <3 x i128>* %b
207  %tt = xor <3 x i128> %x, %bb
208  store <3 x i128> %tt, <3 x i128>* %b
209  br label %next
210
211next:
212  ret <3 x i128> %tt
213}
214
215
216define <3 x i256> @test_3xi256(<3 x i256> %x, <3 x i256>* %b) {
217  %bb = load <3 x i256>, <3 x i256>* %b
218  %tt = xor <3 x i256> %x, %bb
219  store <3 x i256> %tt, <3 x i256>* %b
220  br label %next
221
222next:
223  ret <3 x i256> %tt
224}
225
226
227define <3 x i512> @test_3xi512(<3 x i512> %x, <3 x i512>* %b) {
228  %bb = load <3 x i512>, <3 x i512>* %b
229  %tt = xor <3 x i512> %x, %bb
230  store <3 x i512> %tt, <3 x i512>* %b
231  br label %next
232
233next:
234  ret <3 x i512> %tt
235}
236
237
238define <4 x i8> @test_4xi8(<4 x i8> %x, <4 x i8>* %b) {
239  %bb = load <4 x i8>, <4 x i8>* %b
240  %tt = xor <4 x i8> %x, %bb
241  store <4 x i8> %tt, <4 x i8>* %b
242  br label %next
243
244next:
245  ret <4 x i8> %tt
246}
247
248
249define <4 x i16> @test_4xi16(<4 x i16> %x, <4 x i16>* %b) {
250  %bb = load <4 x i16>, <4 x i16>* %b
251  %tt = xor <4 x i16> %x, %bb
252  store <4 x i16> %tt, <4 x i16>* %b
253  br label %next
254
255next:
256  ret <4 x i16> %tt
257}
258
259
260define <4 x i32> @test_4xi32(<4 x i32> %x, <4 x i32>* %b) {
261  %bb = load <4 x i32>, <4 x i32>* %b
262  %tt = xor <4 x i32> %x, %bb
263  store <4 x i32> %tt, <4 x i32>* %b
264  br label %next
265
266next:
267  ret <4 x i32> %tt
268}
269
270
271define <4 x i64> @test_4xi64(<4 x i64> %x, <4 x i64>* %b) {
272  %bb = load <4 x i64>, <4 x i64>* %b
273  %tt = xor <4 x i64> %x, %bb
274  store <4 x i64> %tt, <4 x i64>* %b
275  br label %next
276
277next:
278  ret <4 x i64> %tt
279}
280
281
282define <4 x i128> @test_4xi128(<4 x i128> %x, <4 x i128>* %b) {
283  %bb = load <4 x i128>, <4 x i128>* %b
284  %tt = xor <4 x i128> %x, %bb
285  store <4 x i128> %tt, <4 x i128>* %b
286  br label %next
287
288next:
289  ret <4 x i128> %tt
290}
291
292
293define <4 x i256> @test_4xi256(<4 x i256> %x, <4 x i256>* %b) {
294  %bb = load <4 x i256>, <4 x i256>* %b
295  %tt = xor <4 x i256> %x, %bb
296  store <4 x i256> %tt, <4 x i256>* %b
297  br label %next
298
299next:
300  ret <4 x i256> %tt
301}
302
303
304define <4 x i512> @test_4xi512(<4 x i512> %x, <4 x i512>* %b) {
305  %bb = load <4 x i512>, <4 x i512>* %b
306  %tt = xor <4 x i512> %x, %bb
307  store <4 x i512> %tt, <4 x i512>* %b
308  br label %next
309
310next:
311  ret <4 x i512> %tt
312}
313
314
315define <5 x i8> @test_5xi8(<5 x i8> %x, <5 x i8>* %b) {
316  %bb = load <5 x i8>, <5 x i8>* %b
317  %tt = xor <5 x i8> %x, %bb
318  store <5 x i8> %tt, <5 x i8>* %b
319  br label %next
320
321next:
322  ret <5 x i8> %tt
323}
324
325
326define <5 x i16> @test_5xi16(<5 x i16> %x, <5 x i16>* %b) {
327  %bb = load <5 x i16>, <5 x i16>* %b
328  %tt = xor <5 x i16> %x, %bb
329  store <5 x i16> %tt, <5 x i16>* %b
330  br label %next
331
332next:
333  ret <5 x i16> %tt
334}
335
336
337define <5 x i32> @test_5xi32(<5 x i32> %x, <5 x i32>* %b) {
338  %bb = load <5 x i32>, <5 x i32>* %b
339  %tt = xor <5 x i32> %x, %bb
340  store <5 x i32> %tt, <5 x i32>* %b
341  br label %next
342
343next:
344  ret <5 x i32> %tt
345}
346
347
348define <5 x i64> @test_5xi64(<5 x i64> %x, <5 x i64>* %b) {
349  %bb = load <5 x i64>, <5 x i64>* %b
350  %tt = xor <5 x i64> %x, %bb
351  store <5 x i64> %tt, <5 x i64>* %b
352  br label %next
353
354next:
355  ret <5 x i64> %tt
356}
357
358
359define <5 x i128> @test_5xi128(<5 x i128> %x, <5 x i128>* %b) {
360  %bb = load <5 x i128>, <5 x i128>* %b
361  %tt = xor <5 x i128> %x, %bb
362  store <5 x i128> %tt, <5 x i128>* %b
363  br label %next
364
365next:
366  ret <5 x i128> %tt
367}
368
369
370define <5 x i256> @test_5xi256(<5 x i256> %x, <5 x i256>* %b) {
371  %bb = load <5 x i256>, <5 x i256>* %b
372  %tt = xor <5 x i256> %x, %bb
373  store <5 x i256> %tt, <5 x i256>* %b
374  br label %next
375
376next:
377  ret <5 x i256> %tt
378}
379
380
381define <5 x i512> @test_5xi512(<5 x i512> %x, <5 x i512>* %b) {
382  %bb = load <5 x i512>, <5 x i512>* %b
383  %tt = xor <5 x i512> %x, %bb
384  store <5 x i512> %tt, <5 x i512>* %b
385  br label %next
386
387next:
388  ret <5 x i512> %tt
389}
390
391
392