Next: 8.1.7 'switch' Statements Up: 8.1 Optimizations Previous: 8.1.5 Loop Reversing Contents Index

## 8.1.6 Algebraic Simplifications

SDCC does numerous algebraic simplifications, the following is a small sub-set of these optimizations.

> `i = j + 0; /* changed to: */ i = j;`
> `i /= 2; /* changed to: */ i >>= 1;`
> `i = j - j; /* changed to: */ i = 0;`
> `i = j / 1; /* changed to: */ i = j;`

Note the subexpressions given above are generally introduced by macro expansions or as a result of copy/constant propagation.