1 /* { dg-require-effective-target vect_double } */
5 extern long int lrint (double);
6 extern void abort (void);
10 __attribute__((noinline
, noclone
)) void
14 for (i
= 0; i
< n
; i
++)
16 a
[4 * i
+ 0] = lrint (b
[4 * i
+ 0]) + 1;
17 a
[4 * i
+ 1] = lrint (b
[4 * i
+ 1]) + 2;
18 a
[4 * i
+ 2] = lrint (b
[4 * i
+ 2]) + 3;
19 a
[4 * i
+ 3] = lrint (b
[4 * i
+ 3]) + 4;
23 __attribute__((noinline
, noclone
)) void
27 for (i
= 0; i
< 2 * n
; i
++)
29 a
[2 * i
+ 0] = lrint (b
[2 * i
+ 0]) + 1;
30 a
[2 * i
+ 1] = lrint (b
[2 * i
+ 1]) + 2;
34 __attribute__((noinline
, noclone
)) void
38 for (i
= 0; i
< 64; i
++)
39 a
[i
] = lrint (b
[i
]) + 1;
42 __attribute__((noinline
, noclone
)) void
46 for (i
= 0; i
< n
; i
++)
48 a
[4 * i
+ 0] = lrint (b
[4 * i
+ 0]);
49 a
[4 * i
+ 1] = lrint (b
[4 * i
+ 1]);
50 a
[4 * i
+ 2] = lrint (b
[4 * i
+ 2]);
51 a
[4 * i
+ 3] = lrint (b
[4 * i
+ 3]);
55 __attribute__((noinline
, noclone
)) void
59 for (i
= 0; i
< 2 * n
; i
++)
61 a
[2 * i
+ 0] = lrint (b
[2 * i
+ 0]);
62 a
[2 * i
+ 1] = lrint (b
[2 * i
+ 1]);
66 __attribute__((noinline
, noclone
)) void
70 for (i
= 0; i
< 64; i
++)
74 __attribute__((noinline
, noclone
)) int
79 for (i
= 0; i
< 64; i
++)
82 b
[i
] = ((i
& 1) ? -4 * i
: 4 * i
) + 0.25;
85 for (i
= 0; i
< 64; i
++)
86 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
) + 1 + (i
& 3))
91 for (i
= 0; i
< 64; i
++)
92 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
) + 1 + (i
& 1))
97 for (i
= 0; i
< 64; i
++)
98 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
) + 1)
103 for (i
= 0; i
< 64; i
++)
104 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
))
109 for (i
= 0; i
< 64; i
++)
110 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
))
115 for (i
= 0; i
< 64; i
++)
116 if (a
[i
] != ((i
& 1) ? -4 * i
: 4 * i
))
128 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 6 "vect" { target vect_call_lrint } } } */
129 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target vect_call_lrint } } } */