Files
mysysy/test/20_test_licm_sr.sy
2025-02-27 23:14:53 +08:00

20 lines
344 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++;
}
return f;
}