icc doesn't like -fomit-frame-pointer without -O
[libfirm] / ir / be / test / codegen / spillharness2.c
1 void f(int);
2
3 volatile int G1, G2, G3, G4, G5;
4
5 volatile int VG;
6
7 void test()
8 {
9         int foo = rand();
10
11         // spill foo.
12         int t1 = G1;
13         int t2 = G2;
14         int t3 = G3;
15         int t4 = G4;
16         int t5 = G5;
17
18         int bar = rand();
19         int i;
20
21         G1 = t1; G2 = t2; G3 = t3; G4 = t4; G5 = t5;
22         G1 = t1; G2 = t2; G3 = t3; G4 = t4; G5 = t5;
23         G1 = t1; G2 = t2; G3 = t3; G4 = t4; G5 = t5;
24
25         i = 10000;
26         while (i--) {
27                 VG = foo;  // really keep foo in a reg.
28                 f(bar);   // bar live
29                 G1 = t1;
30                 VG = foo;
31                 G2 = t2;
32                 VG = foo;
33                 G3 = t3;
34                 VG = foo;
35                 G4 = t4;
36                 VG = foo;
37                 G5 = t5;
38
39         }
40 }