Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / pr32044.c
blob58a62662b4f76e9e440d508fbd1c9210a7177c45
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 int foo (int n)
6 while (n >= 45)
7 n -= 45;
9 return n;
12 int bar (int n)
14 while (n >= 64)
15 n -= 64;
17 return n;
20 int bla (int n)
22 int i = 0;
24 while (n >= 45)
26 i++;
27 n -= 45;
30 return i;
33 int baz (int n)
35 int i = 0;
37 while (n >= 64)
39 i++;
40 n -= 64;
43 return i;
46 /* The loops computing division/modulo by 64 should be eliminated */
47 /* { dg-final { scan-tree-dump-times "if" 6 "optimized" } } */
49 /* There should be no division/modulo in the final dump (division and modulo
50 by 64 are done using bit operations). */
51 /* { dg-final { scan-tree-dump-times "/" 0 "optimized" } } */
52 /* { dg-final { scan-tree-dump-times "%" 0 "optimized" } } */
54 /* { dg-final { cleanup-tree-dump "optimized" } } */