3 ms·
question about the condition removal he's lamenting his code would have gotten an overflow at int32_t i = x * 0x1ff / 0xffff; where it not optimized away so
by avereveard 4y ago
question about the condition removal he's lamenting
his code would have gotten an overflow at
int32_t i = x * 0x1ff / 0xffff;
where it not optimized away
so it seems gcc is maintaining the code behaviour, only reporting a wrong debug line for it due code being shifted around.
- shultays 4y agothe part that was optimized away is `i >= 0` check. Which can't happen because x >= 0 already holds true
- avereveard 4y agoit also moves the division around