#compilers
- Why signed (x*2)/2 folds to x but unsigned doesn't2026-06-04
The same expression optimizes to a constant for signed ints and to real work for unsigned — because signed overflow is undefined, and one IR flag says so.
The same expression optimizes to a constant for signed ints and to real work for unsigned — because signed overflow is undefined, and one IR flag says so.