re PR rtl-optimization/12508 (weak optimization for some constants < 2^16)