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

    <tr>
        <th>Summary</th>
        <td>
            [InstCombine] reduce test-for-overflow of shifted value
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Forking this off from #57330:

```ll
define i1 @src(i8 %x) {
  %add = shl i8 %x, 1
  %cmp = icmp ult i8 %add, %x
  ret i1 %cmp
}

define i1 @tgt(i8 %x) {
  %r = icmp slt i8 %x, 0
  ret i1 %r
}
```

https://alive2.llvm.org/ce/z/sTrumT
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9kttu4yAQhp8G36BEHIxNLrjYNorU-74A5mDTxSYCnHb36ReTNE13pZUwHg__8H8eGIL-JU4h_nTLCPPkEgzWQhvDDAGhrKcUAfoDoCNAn3OHrsP7a0Ib6xYDHYagRSkqQLjjpZp9AHKAoH-6yuCWklpDQI8wTR7eRc8QP0jUfK4StwWrzzddqdyUteImjiZX11pzg-uPj6zf0PKY_4cWv1zT3bXSoX8N4992n015dJ9yPqete-RUhvTuYsje-8u8D3EsGWXK9Ls86TWu82tjBO46TFvactZoQfWBHmSTXfZGAPb0sqT8HOah_BFgxwKjV2VgNinvbIi7cDHR-vBeDrC019lsNLxIv5pmjV58ZxldntZhr8JcPjai22t3juHNqNKnk0tpNakE2x3gzSQ46zjDsm11h1SvZWeJ6rTSmvIWK8IaLwfj00YKCFnMO6xblLjQNk4QRAjipMUEc8T2qufUsqFj2nKKMC4HZGbp_L1BTRQVaVjHVBa9Szl9LcqU3LiY2phtf7nmKUQRQ5bZRDdOuan2ouL_AUH_1QU">