https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70600
Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-04-08 Ever confirmed|0 |1 --- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- We could match a pattern (a±c1)±(b±c2) with intermediate conversions, or try to generalize reassoc, but in this particular case, it mostly looks like yet another example for the missing narrowing pass. _146 has a single use, which is a narrowing conversion to a "good" type (not something like a 16 bit 'short' on a platform where all arithmetic insns are for 32 bits), so I can't see any reason not to perform the addition (with a constant) in the narrower mode, and transitively the shift as well.