2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / vect-args.c
blob02cf3f55eeb1555a37a7e7213e9eadecec1bb6a4
1 /* { dg-do compile } */
2 /* { dg-options "-w -Wno-psabi" } */
4 /* AVX512F and AVX512BW modes. */
5 typedef unsigned char V64QImode __attribute__((vector_size(64)));
6 typedef unsigned short V32HImode __attribute__((vector_size(64)));
7 typedef unsigned int V16SImode __attribute__((vector_size(64)));
8 typedef unsigned long long V8DImode __attribute__((vector_size(64)));
9 typedef float V16SFmode __attribute__((vector_size(64)));
10 typedef double V8DFmode __attribute__((vector_size(64)));
12 /* AVX and AVX2 modes. */
13 typedef unsigned char V32QImode __attribute__((vector_size(32)));
14 typedef unsigned short V16HImode __attribute__((vector_size(32)));
15 typedef unsigned int V8SImode __attribute__((vector_size(32)));
16 typedef unsigned long long V4DImode __attribute__((vector_size(32)));
17 typedef float V8SFmode __attribute__((vector_size(32)));
18 typedef double V4DFmode __attribute__((vector_size(32)));
20 /* SSE1 and SSE2 modes. */
21 typedef unsigned char V16QImode __attribute__((vector_size(16)));
22 typedef unsigned short V8HImode __attribute__((vector_size(16)));
23 typedef unsigned int V4SImode __attribute__((vector_size(16)));
24 typedef unsigned long long V2DImode __attribute__((vector_size(16)));
25 typedef float V4SFmode __attribute__((vector_size(16)));
26 typedef double V2DFmode __attribute__((vector_size(16)));
28 /* MMX and 3DNOW modes. */
29 typedef unsigned char V8QImode __attribute__((vector_size(8)));
30 typedef unsigned short V4HImode __attribute__((vector_size(8)));
31 typedef unsigned int V2SImode __attribute__((vector_size(8)));
32 typedef float V2SFmode __attribute__((vector_size(8)));
34 /* Test argument loading and unloading of each. */
35 #define TEST(TYPE) \
36 extern TYPE data_##TYPE; \
37 void r_##TYPE (TYPE x) { data_##TYPE = x; } \
38 void s_##TYPE (void) { r_##TYPE (data_##TYPE); }
40 TEST(V64QImode)
41 TEST(V32HImode)
42 TEST(V16SImode)
43 TEST(V8DImode)
44 TEST(V16SFmode)
45 TEST(V8DFmode)
47 TEST(V32QImode)
48 TEST(V16HImode)
49 TEST(V8SImode)
50 TEST(V4DImode)
51 TEST(V8SFmode)
52 TEST(V4DFmode)
54 TEST(V16QImode)
55 TEST(V8HImode)
56 TEST(V4SImode)
57 TEST(V2DImode)
58 TEST(V4SFmode)
59 TEST(V2DFmode)
61 TEST(V8QImode)
62 TEST(V4HImode)
63 TEST(V2SImode)
64 TEST(V2SFmode)