1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_neon_ok } */
3 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -mvectorize-with-neon-double" } */
4 /* { dg-add-options arm_neon } */
5
6 #define N 32
7
8 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
9 float fa[N];
10 int ia[N];
11
convert()12 int convert()
13 {
14 int i;
15
16 /* int -> float */
17 for (i = 0; i < N; i++)
18 fa[i] = (float) ib[i];
19
20 /* float -> int */
21 for (i = 0; i < N; i++)
22 ia[i] = (int) fa[i];
23
24 return 0;
25 }
26
27 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
28