1 /* { dg-do compile } */
2 /* { dg-require-effective-target fopenmp } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-additional-options "-fopenmp -fipa-pta" } */
6 extern void abort (void);
10 static void __attribute__((noinline
, noclone
, optimize("-fno-tree-vectorize")))
11 init (unsigned *results
, unsigned *pData
)
14 for (i
= 0; i
< nEvents
; ++i
)
18 static void __attribute__((noinline
, noclone
, optimize("-fno-tree-vectorize")))
19 check (unsigned *results
)
22 for (int idx
= 0; idx
< (int)nEvents
; idx
++)
32 unsigned results
[nEvents
];
33 unsigned pData
[nEvents
];
36 init (&results
[0], &pData
[0]);
38 #pragma omp parallel for
39 for (int idx
= 0; idx
< (int)nEvents
; idx
++)
40 results
[idx
] = coeff
* pData
[idx
];
47 /* { dg-final { scan-tree-dump-times "note: vectorized 1 loop" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
48 /* { dg-final { scan-tree-dump-not "versioning for alias required" "vect" } } */