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

--- Comment #2 from Kael Franco <kaelfandrew at gmail dot com> ---
This should optimize as well:

#define C 7

unsigned
src (unsigned short b)
{
  unsigned t = b;
  return (t * (C - 1)) / C;
}

unsigned
tgt (unsigned short b)
{
  unsigned t = b;
  return t - (t / C);
}

Reply via email to