1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-08-09 20:25:17 +00:00
Files
kickc/src/test/kc/subexpr-optimize-0.kc
2019-06-03 12:19:47 +02:00

11 lines
285 B
C

// Tests optimization of identical sub-expressions
// The two examples of i*2 is detected as identical leading to optimized ASM where *2 is only calculated once
void main() {
byte* screen = 0x400;
for( byte i: 0..2) {
*screen++ = i*2;
*screen++ = i*2;
}
}