2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / vect-double-1.c
blobc44e669b0efacb687330b3c2757e2a58e5248dc4
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=core2" } } */
3 /* { dg-options "-O2 -ftree-vectorize -mfpmath=sse -march=core2 -fdump-tree-vect-stats" } */
4 /* { dg-add-options bind_pic_locally } */
6 extern void abort (void);
8 #ifndef STATIC
9 #define STATIC
10 #endif
12 #define N 16
14 double cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
15 double ca[N];
17 STATIC void
18 __attribute__ ((noinline))
19 sse2_test (void)
21 int i;
23 for (i = 0; i < N; i++)
25 ca[i] = cb[i];
28 /* check results: */
29 for (i = 0; i < N; i++)
31 if (ca[i] != cb[i])
32 abort ();
36 /* { dg-final { scan-tree-dump-times "Vectorized loops: 1" 1 "vect" } } */