i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-outer-slp-2.c
blob0e5388b46ce80b610d75e18c725b8f05881c244b
1 /* { dg-require-effective-target vect_double } */
2 /* { dg-require-effective-target vect_intdouble_cvt } */
4 #include "tree-vect.h"
6 double image[40];
8 void __attribute__((noipa))
9 foo (void)
11 for (int i = 0; i < 20; i++)
13 double suma = 0;
14 double sumb = 0;
15 for (int j = 0; j < 40; j++)
17 suma += j+i;
18 sumb += j+i;
20 image[2*i] = suma;
21 image[2*i+1] = sumb;
25 int main ()
27 check_vect ();
29 foo ();
31 #pragma GCC novector
32 for (int i = 0; i < 20; i++)
34 double suma = 0;
35 double sumb = 0;
36 for (int j = 0; j < 40; j++)
38 suma += j+i;
39 sumb += j+i;
40 asm ("" : "+g" (suma));
41 asm ("" : "+g" (sumb));
43 if (image[2*i] != suma
44 || image[2*i+1] != sumb)
45 abort ();
48 return 0;
51 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
52 /* We don't yet support SLP inductions for variable length vectors. */
53 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_variable_length } } } */