Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr62171.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3
4 struct omp_data_i
5 {
6 double *__restrict__ results;
7 double *__restrict__ pData;
8 double *__restrict__ coeff;
9 };
10
11 #define nEvents 1000000
12
13 double __attribute__((noinline, noclone))
14 f (struct omp_data_i *__restrict__ p, int argc)
15 {
16
17 int idx;
18
19 for (idx = 0; idx < nEvents; idx++)
20 ((p->results))[idx] = (*(p->coeff)) * ((p->pData))[idx];
21
22 return ((p->results))[argc];
23 }
24
25 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
26 /* { dg-final { scan-tree-dump-not "versioned" "vect" } } */