i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-48.c
blobdfae6177b21f8a0525721d7f4c4000019ec42ddf
1 /* { dg-do compile } */
2 /* { dg-additional-options "-fgimple -fdump-tree-optimized" } */
3 /* { dg-require-effective-target vect_double } */
5 double a[2];
7 void __GIMPLE (ssa,startwith ("fix_loops"))
8 foo (double x)
10 double tem2;
11 double tem1;
12 double _1;
13 double _2;
14 double _3;
15 double _4;
17 __BB(2):
18 _1 = a[0];
19 _2 = x_6(D) * 3.0e+0;
20 tem1_7 = _1 + _2;
21 _3 = x_6(D) + 1.0e+0;
22 _4 = a[1];
23 tem2_8 = _4 + _3;
24 a[0] = tem1_7;
25 a[1] = tem2_8;
26 return;
29 void __GIMPLE (ssa,startwith ("fix_loops"))
30 bar (double x)
32 double tem2;
33 double tem1;
34 double _1;
35 double _2;
36 double _3;
37 double _4;
39 __BB(2):
40 _1 = a[0];
41 _2 = x_6(D) * 3.0e+0;
42 tem1_7 = _1 + _2;
43 _3 = x_6(D) + 1.0e+0;
44 _4 = a[1];
45 /* Once with operands swapped. */
46 tem2_8 = _3 + _4;
47 a[0] = tem1_7;
48 a[1] = tem2_8;
49 return;
52 /* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" } } */
53 /* We want to vectorize as { a[0], a[1] } + { x*3, x+1 } and thus
54 elide one add in each function. */
55 /* { dg-final { scan-tree-dump-times " \\+ " 4 "optimized" } } */