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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note a more complex case like:
```
int f(int a, unsigned b, int c)
{
  c &= 0xffff;
  return (c >> a) ^ (b >> a);
}
```
Should also be optimized to:
```
int f(int a, unsigned b, int c)
{
  c &= 0xffff;
  return (c^b) >> a;
}
```

That is if both are known to be non-negative we can do the combining.

Reply via email to