mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-08-09 20:25:17 +00:00
11 lines
285 B
C
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;
|
|
}
|
|
}
|
|
|