SDCC does numerous algebraic simplifications, the following is a small sub-set of these optimizations.
i = j + 0; /* changed to: */ i = j;Note the subexpressions given above are generally introduced by macro expansions or as a result of copy/constant propagation.
i /= 2; /* changed to: */ i >>= 1;
i = j - j; /* changed to: */ i = 0;
i = j / 1; /* changed to: */ i = j;