https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122209

--- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> ---
Some more context here.  What _does_ work is

  t = 3 + 4 * t;
  t &= 0xFFF;
  t = 3 + 4 * t;
  t &= 0xFFF;
  ...

ccp is able to recognize exactly what we want and optimize to

  return 4095;

So IMHO it is a reassoc (or related) problem.  I'll play around with that
in the next stage 1.

Reply via email to