2 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
10 #pragma omp simd linear(b:2) reduction(+:c)
11 for (i
= 0; i
< 64; i
++)
13 c
= c
+ (b
!= 7 + 2 * i
);
16 if (c
|| i
!= 64 || b
!= 7 + 64 * 2)
19 #pragma omp simd linear(b:3) reduction(+:c)
20 for (i
= 0; i
< 64; i
+= 4)
22 c
= c
+ (b
!= 7 + i
/ 4 * 3);
25 if (c
|| i
!= 64 || b
!= 7 + 16 * 3)
28 #pragma omp simd linear(i) linear(b:2) reduction(+:c)
29 for (i
= 0; i
< 64; i
++)
31 c
= c
+ (b
!= 7 + 2 * i
);
34 if (c
|| i
!= 64 || b
!= 7 + 64 * 2)
37 #pragma omp simd linear(i:4) linear(b:3) reduction(+:c)
38 for (i
= 0; i
< 64; i
+= 4)
40 c
= c
+ (b
!= 7 + i
/ 4 * 3);
43 if (c
|| i
!= 64 || b
!= 7 + 16 * 3)
46 #pragma omp simd collapse (2) linear(b:2) reduction(+:c)
47 for (i
= 0; i
< 8; i
++)
48 for (j
= 0; j
< 8; j
++)
50 c
= c
+ (b
!= 7 + 2 * j
+ 2 * 8 * i
);
53 if (c
|| i
!= 8 || j
!= 8 || b
!= 7 + 64 * 2)
56 #pragma omp simd collapse (2) lastprivate (i, j) linear(b:2) reduction(+:c)
57 for (i
= 0; i
< 8; i
++)
58 for (j
= 0; j
< 8; j
++)
60 c
= c
+ (b
!= 7 + 2 * j
+ 2 * 8 * i
);
63 if (c
|| i
!= 8 || j
!= 8 || b
!= 7 + 64 * 2)
66 #pragma omp parallel for simd schedule (static, 4) linear(b:2) reduction(+:c)
67 for (i
= 0; i
< 64; i
++)
69 c
= c
+ (b
!= 7 + 2 * i
);
72 if (c
|| i
!= 64 || b
!= 7 + 64 * 2)
75 #pragma omp parallel for simd schedule (static, 4) linear(b:3) reduction(+:c)
76 for (i
= 0; i
< 64; i
+= 4)
78 c
= c
+ (b
!= 7 + i
/ 4 * 3);
81 if (c
|| i
!= 64 || b
!= 7 + 16 * 3)
84 #pragma omp parallel for simd schedule (static, 4) linear(i) linear(b:2) reduction(+:c)
85 for (i
= 0; i
< 64; i
++)
87 c
= c
+ (b
!= 7 + 2 * i
);
90 if (c
|| i
!= 64 || b
!= 7 + 64 * 2)
93 #pragma omp parallel for simd schedule (static, 4) linear(i:4) linear(b:3) reduction(+:c)
94 for (i
= 0; i
< 64; i
+= 4)
96 c
= c
+ (b
!= 7 + i
/ 4 * 3);
99 if (c
|| i
!= 64 || b
!= 7 + 16 * 3)
102 #pragma omp parallel for simd lastprivate (i, j) collapse (2) schedule (static, 4) linear(b:2) reduction(+:c)
103 for (i
= 0; i
< 8; i
++)
104 for (j
= 0; j
< 8; j
++)
106 c
= c
+ (b
!= 7 + 2 * j
+ 2 * 8 * i
);
109 if (c
|| i
!= 8 || j
!= 8 || b
!= 7 + 64 * 2)
112 #pragma omp parallel for simd collapse (2) schedule (static, 4) linear(b:2) reduction(+:c)
113 for (i
= 0; i
< 8; i
++)
114 for (j
= 0; j
< 8; j
++)
116 c
= c
+ (b
!= 7 + 2 * j
+ 2 * 8 * i
);
119 if (c
|| i
!= 8 || j
!= 8 || b
!= 7 + 64 * 2)