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

    <tr>
        <th>Summary</th>
        <td>
            Sub optimal optimization for many or for eqaul tests
        </td>
    </tr>

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

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

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

<pre>
    ```c++
bool many_or(unsigned int val) {
 __builtin_assume(val < 32);
    return val == 1 || val == 4 || val == 7 || val == 9 || val == 10 || val == 13;
}
```
produces code:
```asm
many_or(unsigned int):                            # @many_or(unsigned int)
        cmp     edi, 14
        setb    cl
 mov     eax, 9874
        bt      eax, edi
        setb    al
 and     al, cl
        ret
```
The cmp with 14 is redundant, it should be:
```asm
many_or(unsigned int): # @many_or(unsigned int)
        mov     eax, 9874
        bt      eax, edi
        setb    al
        ret
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVN1u2zwMfRr6hmggU05kX_iiTZAX-L77QLLZRJtsZfpJ1z39YCf9WeFi2DBCAJWjwyPyBLKO0R5H5hbWD7DeFTqnkw9t8N1X5lQY3z-3sBHX1QE9TEvsQNwb7x0Oenw--ABU53EW6tGOCS_aATUI6sbFw8Fk65IdDzrGPDBQfdEOQW5RElAD8oWJiIFTDiNeCTuQOywR1BbU9j1WLWBqAWsWsFIsgfK1C1C72-Zl9OvPc_B97jhi53sGef-BpONwRZZtmeecJ_wsgCRCJT4vf_Voim44z5l7C7TFsvr1OHIyM83d8MFfrnz9feI3tfpQYRK-J0y6i4r6RVGPPd4A2r5ddIvAadHF_0889_5k0wnLCm3EwH0eez0NuUWbMJ58dj2avzb5z5z89878xoKib2XfyEYX3JYbpdaqVoKKU6vEeqPKRilqyrpupHlUStdsTLOpuF5XhW1JkBREdSnEWtCqM43SFVd1KTd9Jx-hEjxo61bOXYaVD8fCxpi53ZSikoXThl2cXzvRyE84HwLR9PhDO9XcmXyMUAlnY4pvKskmx-1_2aA_Jztod832h07Wj_jow_w1QB_mPX_T2WHimGKRg2tPKZ3j9G_SHmh_tOmUzarzA9B-uuKW7s7Bf-EuAe3nxiLQfm78ZwAAAP__KhdGqw">