OSDN Git Service

* tree-complex.c (expand_complex_div_wide): Don't create CONDs that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / slp-8.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 32
7
8 int main1 ()
9 {
10   int i;
11   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};
12   float fa[N];
13
14   /* int -> float */
15   for (i = 0; i < N/4; i++)
16     {
17       fa[4*i] = (float) ib[4*i];        
18       fa[4*i + 1] = (float) ib[4*i + 1];        
19       fa[4*i + 2] = (float) ib[4*i + 2];        
20       fa[4*i + 3] = (float) ib[4*i + 3];        
21     }
22
23   /* check results:  */
24   for (i = 0; i < N/4; i++)
25     {
26       if (fa[4*i] != (float) ib[4*i]      
27           || fa[4*i + 1] != (float) ib[4*i + 1]
28           || fa[4*i + 2] != (float) ib[4*i + 2]
29           || fa[4*i + 3] != (float) ib[4*i + 3])
30         abort (); 
31     }   
32
33   return 0;
34 }
35
36 int main (void)
37
38   check_vect ();
39   
40   return main1 ();
41 }
42
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
44 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
45 /* { dg-final { cleanup-tree-dump "vect" } } */