111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-fcilkplus -Wunknown-pragmas" } */
|
|
3
|
|
4 /* Tests the clauses in several combinations put in different locations. */
|
|
5 /* This is mostly a parser test. */
|
|
6 #define Q 4
|
|
7
|
|
8 int z = Q;
|
|
9
|
|
10 __attribute__ ((vector (uniform(x), linear (y:1), vectorlength (4) )))
|
|
11 int func (int x, int y)
|
|
12 {
|
|
13 int zq = 5;
|
|
14 return x + (y*zq);
|
|
15 }
|
|
16 __attribute__ ((__vector__ (uniform(x), vectorlength (2), linear (y:1) )))
|
|
17 int func2 (int x, int y)
|
|
18 {
|
|
19 int zq = 5;
|
|
20 return x + (y*zq);
|
|
21 }
|
|
22
|
|
23 __attribute__ ((vector (uniform(y), linear (x), vectorlength (4) )))
|
|
24 int func3 (int x, int y)
|
|
25 {
|
|
26 int zq = 5;
|
|
27 return x + (y*zq);
|
|
28 }
|
|
29
|
|
30 __attribute__ ((vector (uniform(x), linear (y:1), mask)))
|
|
31 int func4 (int x, int y)
|
|
32 {
|
|
33 int zq = 5;
|
|
34 return x + (y*zq);
|
|
35 }
|
|
36
|
|
37 __attribute__ ((vector (uniform(x), linear (y:1), nomask)))
|
|
38 int func5 (int x, int y)
|
|
39 {
|
|
40 int zq = 5;
|
|
41 return x + (y*zq);
|
|
42 }
|
|
43
|
|
44 __attribute__ ((vector (uniform(x), mask, linear (y:1))))
|
|
45 int func6 (int x, int y)
|
|
46 {
|
|
47 int zq = 5;
|
|
48 return x + (y*zq);
|
|
49 }
|
|
50
|
|
51 __attribute__ ((vector (uniform (x), mask, linear (y:1)), vector))
|
|
52 int func7 (int x, int y)
|
|
53 {
|
|
54 int zq = 5;
|
|
55 return x + (y*zq);
|
|
56 }
|
|
57
|
|
58 __attribute__ ((vector (uniform (x), mask, linear (y:1)), vector (uniform (y), mask)))
|
|
59 int func8 (int x, int y)
|
|
60 {
|
|
61 int zq = 5;
|
|
62 return x + (y*zq);
|
|
63 }
|
|
64
|
|
65 __attribute__ ((vector, vector (uniform (y), mask)))
|
|
66 int func9 (int x, int y)
|
|
67 {
|
|
68 int zq = 5;
|
|
69 return x + (y*zq);
|
|
70 }
|
|
71
|
|
72 int main (int argc, char *argv[])
|
|
73 {
|
|
74 int ii = 0, q = 5;
|
|
75 for (ii = 0; ii < 10; ii++)
|
|
76 q += func (argc, ii);
|
|
77 return q;
|
|
78 }
|