<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/70582>70582</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang is suboptimal for `~(b >> a) ^ (c >> a)` where b and c are specific constants
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Example:
```cpp
int f(int a)
{
  return ~(2 >> a) ^ (5 >> a);
}

int g(int a)
{
  return ~(7 >> a);
}
```
https://godbolt.org/z/bh8YdMeYY
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUU2vmzAQ_DXLxUrkLLHBBx9elHDrD8jRX4Bbg5Ft-toe-tsrSF6_VKlPQtplNZrxzKic_TA7J4FdgF0rtZYxJvnpoFKKr7nS0X6Vty9qWoKD-gXoFegLcPr4zLI8Ln4upAdst6kAxRPXXB4LIcmVNc3kO2CLBOob1LcdSIDdCGDLfj9CfXkjuD6XnyrDO1Wa_xC-WXj8jqUsefOHHWA3RKtjKMeYBsDuG2Cnx_ZuP7j7vbKytqIWqnLyxEXLGBdMVKO0Bg0XDWsaceLOnPuzFUqdaK8pb7gxlZdIsT5RFJQh1uJouHXWCdPQs655g3CmblI-HEP4PG3alc95dbKhrMUqKO1C3mtCNEHNAyBujSW54Q96HTKcafC55F8MxZfg5A4nPpO86rgUP6lA-pgIcLpFpf9ViPkjP07J6-iSI5qo2RJDVHIkL8743hti4pyLmkuu1hTkX1n6Mq76aOIE2G3veo7DkuJHZwpgt9vMgN3u9EcAAAD__6Xnu0w">