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

    <tr>
        <th>Summary</th>
        <td>
            MachineSink debug invariance
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            tools:llc,
            debuginfo
      </td>
    </tr>

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

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

<pre>
    With input [bbi-70492-a.mir.gz](https://github.com/llvm/llvm-project/files/8852827/bbi-70492-a.mir.gz) and [bbi-70492-b.mir.gz](https://github.com/llvm/llvm-project/files/8852828/bbi-70492-b.mir.gz) (only difference is presence of a single `DBG_VALUE`) the following invocations of the `machine-sink` pass produce different results


```
$ llc -machine-sink-load-instrs-threshold=2 -run-pass=machine-sink bbi-70492-a.mir -o a.mir
$ llc -machine-sink-load-instrs-threshold=2 -run-pass=machine-sink bbi-70492-b.mir -o b.mir
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1kk3P1CAQxz8NvRCaLi19OfSwj1UvejLq0UChLT4UGl7WPH56p91s3DXPxUQTUmYK8__NDCOcfOm_6rhgbbcUMWJPQmjSFFVHCc9X7fP5J2IDou0S4xZQeUb0HawZYpLIR7eCY8zltpHNu-9qjOBO2qgAe9sy2tIGrFekaYe5lY9c8S-57QNX3HFB21nzgqWeJuWVHRXWAW9ehcN2E-Y4aDsbhVFdDE_vv305f_j8Fuw9Oi4KT84Y9wOuQPcubuRROxv2wP0Q7q18XLRVBFSewcUbDzvAyQT6N2zEQEwmBlQMqDg_fAF1XVeXVtiYEZN7XWIcl0TbEH0gcQGtxRmJyoFi4pMlOxO8-xD8xztg4vBh_DeMuGHEHeZWXCb7UnZlx7Ooo1H9x6vGp11CKpGO7nKvObxKlrzp_3oidAjpGAnGulOVLX1H647KSbKGF-3IOsnLhjd1K1kr2obLzHChTOhhLBGl0Tmz86Ap4CH6BkaHHplpO7n9Fxsy3dOC0qIumtOpalmdl6wYu1GVzUlOqqwkqgq1cm3yPbnc-Tnz_ZEn6AQ4NDrE8PsQ-qlnq9SRA-jzFBfn-5X75xQMv2ibHWX1R02_ADLsMiI">