Files
mysysy/test/20_test_licm_sr.sy
2025-05-30 01:57:24 +08:00

20 lines
350 B
Plaintext

//test file for loop-invariant code motion (licm) and strength reduction (sr is optional)
int main(){
const int a = 1;
const int b = 2;
int c, d, f;
int i = 0;
while(i < 100){
c = a + b;
d = c * 2;
if(i > 50){
f = i * d;
}
i = i + 1;
}
return f;
}