1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-stats" } */
3 
test(int a,int b,int c,int g)4 int test (int a, int b, int c, int g)
5 {
6   int d, e;
7   if (a)
8     d = b * c;
9   else
10     d = b - c;
11   e = b * c + g;
12   return d + e;
13 }
14 
15 /* We should hoist and CSE only the multiplication.  */
16 
17 /* { dg-final { scan-tree-dump-times " \\* " 1 "pre" } } */
18 /* { dg-final { scan-tree-dump "Insertions: 1" "pre" } } */
19