gcc: improve comparisons against constants
gcc: improve comparisons against constants

Simplify the constants when possible, e.g. by converting the comparison
(x > 4095) into (x >= 4096), or (x == 2048) into (x - 2048 == 0).

manuelafm/riscv-gnu-toolchain,manuelafm/riscv-gnu-toolchain,manuelafm/riscv-gnu-toolchain