AVR: Assert minimal required bit width of section_common::flags.
[gcc.git] / libgomp / testsuite / libgomp.c / max_vf-2.c
blob545cf1d2138a5e3360dbc8c0c8ac1b2b678a1130
1 /* Ensure that the default safelen is set correctly for the larger of the host
2 and offload device, to prevent defeating the vectorizer. */
4 /* { dg-require-effective-target offload_target_any } */
6 /* { dg-do link } */
7 /* { dg-options "-fopenmp -O2 -fdump-tree-omplower" } */
9 int f(float *a, float *b, int n)
11 float sum = 0;
12 #pragma omp target teams distribute parallel for simd map(tofrom: sum) reduction(+:sum)
13 for (int i = 0; i < n; i++)
14 sum += a[i] * b[i];
15 return sum;
18 /* Make sure that the max_vf used is suitable for the offload device.
19 { dg-final { scan-tree-dump-times {omp simd safelen\(64\)} 1 "omplower" { target offload_target_amdgcn } } } */
21 int main() {}