1 /* PR middle-end/66199 */
4 #pragma omp declare target
5 int u
[1024], v
[1024], w
[1024];
6 #pragma omp end declare target
8 __attribute__((noinline
, noclone
)) void
12 #pragma omp target teams distribute parallel for simd default(none) firstprivate (a, b) shared(u, v, w)
13 for (d
= a
; d
< b
; d
++)
17 __attribute__((noinline
, noclone
)) void
18 f2 (long a
, long b
, long c
)
21 #pragma omp target teams distribute parallel for simd default(none) firstprivate (a, b, c) shared(u, v, w) linear(d) lastprivate(e)
22 for (d
= a
; d
< b
; d
++)
29 __attribute__((noinline
, noclone
)) void
30 f3 (long a1
, long b1
, long a2
, long b2
)
33 #pragma omp target teams distribute parallel for simd default(none) firstprivate (a1, b1, a2, b2) shared(u, v, w) lastprivate(d1, d2) collapse(2)
34 for (d1
= a1
; d1
< b1
; d1
++)
35 for (d2
= a2
; d2
< b2
; d2
++)
36 u
[d1
* 32 + d2
] = v
[d1
* 32 + d2
] + w
[d1
* 32 + d2
];
39 __attribute__((noinline
, noclone
)) void
40 f4 (long a1
, long b1
, long a2
, long b2
)
43 #pragma omp target teams distribute parallel for simd default(none) firstprivate (a1, b1, a2, b2) shared(u, v, w) collapse(2)
44 for (d1
= a1
; d1
< b1
; d1
++)
45 for (d2
= a2
; d2
< b2
; d2
++)
46 u
[d1
* 32 + d2
] = v
[d1
* 32 + d2
] + w
[d1
* 32 + d2
];