Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-4.c
blob1e943b737b91e8dd17498a6dee5ea6b8011d72cc
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-slsr -fdump-tree-optimized" } */
4 void foo (int);
6 int
7 f (int i)
9 int x, y;
11 x = i * 4;
12 y = x * 10;
13 foo (y);
15 i = i + 5;
16 x = i * 4;
17 y = x * 10;
18 foo (y);
20 i = i - 4;
21 x = i * 4;
22 y = x * 10;
23 foo (y);
26 /* { dg-final { scan-tree-dump-times "\\* 40" 1 "slsr" } } */
27 /* { dg-final { scan-tree-dump-times "\\+ 200" 1 "slsr" } } */
28 /* { dg-final { scan-tree-dump-times "\\- 160" 1 "slsr" } } */
29 /* { dg-final { scan-tree-dump-times "\\* 40" 1 "optimized" } } */
30 /* { dg-final { scan-tree-dump-times "\\+ 200" 1 "optimized" } } */
31 /* { dg-final { scan-tree-dump-times "\\+ 40" 1 "optimized" } } */