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

    <tr>
        <th>Summary</th>
        <td>
            Simplification for `(A ==/!= B) &/| (((cast)A) CMP C)`
        </td>
    </tr>

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

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

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

<pre>
    Example:
https://godbolt.org/z/Pr8T7xsMz
```c
bool f(int a)
{
    bool t = a == 0;
    short t1 = a;
    bool t2 = t1 >= 3;
    return t & t2;
}

bool g(int b)
{
    bool t = b == 3;
    short t1 = b;
    bool t2 = t1 >= 3;
    return t | t2;
}
```

The example above is taken from the following:
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-6.c
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-7.c
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8k81unDAQx5_GXKxdmWExcOCw2Q23SJGaF7C9w-LG4JU9JGmevjJsmkRq2kOlShbMx9_4h2dGxWjPE2LLyhtWHjM10-BD-7hRIfjnmGl_-tHevqjx4pAVeyaOTOwHoktMHnQMurM_ae9o68OZQffKoLsP9UP1Eu9eVzmTYl1m9bX3jvcMajsRVwyaq6y6WQ3OOV80xFlx5Co9kyFY8UERBx-IU75qPqXWzbBkFsFtsopPmoA0hykdAZIT_Mqx6ng13lnPV1b9V1b9xlp8zar_gbU6_J717YY_oj8MyHGtHFfaPyG3kZN6xIn3wY-cBuS9d84_2-n8VW0tDbPeGj8mx5jNaEPwYXUYdNp5zaAbVSR8jxJGirMlXCPbU2oMCoibGBWDzowXbWkjt-a_n1ltTXZqi1NTNCrDNpeNrMqqKmU2tFjnsixR5YUWjexLswNhtJYVykr1xmS2BQFFLkQtmqIs5TbPK9R9r5vm1Dc707OdwFFZt3XuaUwDkdkYZ2xlXea7zCmNLi6TBjDhM1-SDCANXmjTno2ez5HthLOR4vtXyJLD9psdL8721iiyfuK9DzyVHOr9teuW-8tT_9wwaFJnp0h14AzqdRkViUGzT-nD3T0_pI6WIpuDa_9QhQRyfW0uwX9HQwy6BT8y6Jbf-xkAAP__TbI58A">