openmp: Add testcases for omp_max_vf
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-version-2.c
blob7d3fb722f477c9a55d78f8b6e34b4adafb3617ff
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3 /* { dg-require-effective-target vect_condition } */
5 void foo (double *x, double *y, int m, int n, int o, int p)
7 for (int i = 0; i < m; ++i)
8 for (int j = 0; j < n; ++j)
9 for (int k = 0; k < o; ++k)
10 for (int l = 0; l < k; ++l)
12 double tem = x[l] + y[l];
13 if (tem != 0.)
14 y[l] = x[l];
15 else
16 y[l] = 0.;
20 /* Vectorization using partial vectors has zero versioning_threshold with
21 either usage 1 or usage 2, the cond_expr replies on the computation in
22 outer loop, so it doesn't need to reuse the loop version created by if
23 conversion. */
24 /* { dg-final { scan-tree-dump "reusing loop version created by if conversion" "vect" {target {! vect_partial_vectors } } } } */