2 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
6 int a
[1024] __attribute__((aligned (32))) = { 1 };
7 int b
[1024] __attribute__((aligned (32))) = { 1 };
12 __attribute__((noinline
, noclone
)) int
18 #pragma omp simd aligned(a, p : 32) linear(k: m + 1) \
19 linear(i) reduction(+:s) lastprivate(u, v)
20 for (i
= 0; i
< 1024; i
++)
29 if (u
.u
!= 36 + 4 + 3 * 1023 || v
.v
!= 36 + 4 + 3 * 1024 || i
!= 1024)
34 __attribute__((noinline
, noclone
)) int
40 #pragma omp simd aligned(a, p : 32) linear(k: m + 1) \
41 reduction(+:s) lastprivate(u, v)
42 for (i
= 0; i
< 1024; i
++)
51 if (u
.u
!= 36 + 4 + 3 * 1023 || v
.v
!= 36 + 4 + 3 * 1024 || i
!= 1024)
59 #if __SIZEOF_INT__ >= 4
63 for (i
= 0; i
< 1024; i
++)
69 for (i
= 0; i
< 1024; i
++)
71 if (b
[i
] != (i
- 51) % 39
72 || a
[i
] != (i
- 512) * b
[i
])
75 if (k
!= 4 + 3 * 1024 || s
!= 1596127)
79 for (i
= 0; i
< 1024; i
++)
85 for (i
= 0; i
< 1024; i
++)
87 if (b
[i
] != (i
- 51) % 39
88 || a
[i
] != (i
- 512) * b
[i
])
91 if (k
!= 4 + 3 * 1024 || s
!= 1596127)