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

    <tr>
        <th>Summary</th>
        <td>
            [InstCombine] Instruction sink doesn't see through sink opportunities from `bb0` to `bb2` in `bb0->bb1->bb2`
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          minglotus-6
      </td>
    </tr>
</table>

<pre>
    see https://gcc.godbolt.org/z/G7Paj7h37 for two test cases.
* in function `@inst_sink`, the two instructions (`load`, `icmp`) in the entry block sink to the block where it is used.
* in function `@inst_not_sink`, the two instructions stay in the entry block although they are used only in `if.false.orig_indirect2`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEkk1upDoQx09TbKxGpqAxLFjkJa9H2c0NIhuqwYmxW3YxUc_pR3YiRRqNlJVV3-Vf_XVKdvVEE5z_g_NTpQ_eQpx261cX-EinvjJhuU-JSGzMtwTtA-AF8LLOc72GxQTHdYgr4OU34OWH-qlf1dYqcQ1R8HsQTInFrBOlGuQTyAfAB2G9uB5-Zhu8gF5CJ61P_JKsf8smPgreqJRnfzxKZhKAA_TSBb18ZkEv7bzfijXmrrmMPMe7MC7MbyJ3FByK_8PzvlEkYVnYJI5Ey_db-fD9Zon1_V_zteMtHOuWA3ehI5WZInhX0vP-1_qqXaI6RLu-WL_YSDMj9LJapnYZ21FXNDWqaXFs-_NQbZMZkahtmnZoxk61Rg3UKxyURIW9HHVlJ5TYya7pm-HcNUPdNYtUDZ6vfWNQKYRO0q6tq537tefzVTalg6ZhGHtZOW3IpSIJRE_vogQBMSskTrnmZI41QSedTZy-urBlV7T07BM_ht1YT3B-Es9frD5OsgRKHlCxyMriLRZIJRRutxD58JYtJXGNYc-YjJHQy3zKYmQ-nwCNkSdo_zem-XgKuiO66S-9Wt4OU89hB7zkhT-f0y2GV5oZ8FK-mQAvBcOfAAAA__-Cbv8t">