1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -mfpmath=sse -msse2 -mtune=atom -fdump-tree-vect-stats" } */
3
4 extern void abort (void);
5
6 #ifndef STATIC
7 #define STATIC
8 #endif
9
10 #define N 16
11
12 double cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
13 double ca[N];
14
15 STATIC void
16 __attribute__ ((noinline))
sse2_test(void)17 sse2_test (void)
18 {
19 int i;
20
21 for (i = 0; i < N; i++)
22 {
23 ca[i] = cb[i];
24 }
25
26 /* check results: */
27 for (i = 0; i < N; i++)
28 {
29 if (ca[i] != cb[i])
30 abort ();
31 }
32 }
33
34 /* { dg-final { scan-tree-dump-times "Vectorized loops: 1" 1 "vect" } } */
35