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

    <tr>
        <th>Summary</th>
        <td>
            Missing optimization for shift+and+boolean pattern
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          bcl5980
      </td>
    </tr>
</table>

<pre>
    This issue comes from #55739
src and tgt should be the same.
```
int src (int c)
{
  return ((2 << c) & 15) != 0;
}

int tgt (int c)
{
  return (unsigned)c <= 2;
}

```
https://godbolt.org/z/fPYEYrjbG
https://alive2.llvm.org/ce/z/pS2xu2

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUsFunDAQ_RpzGRXZw5pdDj5kS5JTpUrtJUfbGHBkMLJN1Obr6wWSSlErRRpgBr958-xn5bvf4udoI9gYVwPaTyZCH_wEBCvOz1VDaEvoXQwa5NxBGhLE0a-uA2UgjQainEy5g0hNj9hKO2ds7iN4uaWa4EFGztc9AQgmrWG-QXIgkOprjg2a_9XA-J4xUrVASXV9I2iP5H3QTdjnBq1ztMNsuozS-8AW8H_UH7Y0prREUt0RfMgx-E55l0ofhly95qf__nT_FJ7V47_g0tkXg6VzL9PRos3Rt_zAXyvuTUUnqq6pGlkkm5wR37I1dh7AL8lO9lUm62fofcg-2D4RvGZf8lt574ycYZEpmTAXa3Dig1ybxlWV2eNc3FQcny9L8M9GZ6qH7RbEnPCa4akYhUHN2EXxjmF_aXqq-bln9MQVRYMNZYWTyrgoCL8S3hZWIEWkNVKKjHFWYi1Vp_rcftGnnnNyomaS1r2fQhHEpkGtQ8yLzsYU_y7KuHll3vjlmkYfhNKONxdabHLFpvUPpvrQEA">