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

    <tr>
        <th>Summary</th>
        <td>
            [MachineBlockPlacement] Potential bug in maybeTailDuplicateBlock
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:codegen
      </td>
    </tr>

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

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

<pre>
    In llvm/lib/CodeGen/MachineBlockPlacement.cpp:3115 (`bool MachineBlockPlacement::maybeTailDuplicateBlock()`)  

`RemoveList = EHPadWorkList;` may be unintended assignment to a reference, which would replace the content in `BlockWorkList`


https://github.com/llvm/llvm-project/blame/8c33b3380b8044824f6adb48cc8d2076aecae566/llvm/lib/CodeGen/MachineBlockPlacement.cpp#L3115
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkktr3D4UxT_N9Ub8B-nKlu2FF5PM320hhVAKXetxx1YiW4MtT8i3L_KEPiCFdqOFuI_fuefodfXDTNRBdQfVqdBbGuPSjZuehydXmOheu08zC-E6AfbBG8D-Pjr6QDNg_1nb0c90F6J9fgza0kRzOtjLBeRRClExwAYUNzEG9m4tyCPI46RfDX3VPpy2S_BWp1tVbsYWFAdsGQN-An58exX_QlO80oNfEwN5Yv9_fNTuW1ye8w_IO1CcTfqVGWLb7OdEsyPHbmrzYpYi02yhMy00WwK8Zy-jtyN7iVtwbKFLRmRpJGZjbk_MzwwU38l-LFL8N6z9HVO6rFkY9oD94NO4mYON-_3ezhiu03-XJT6RTYC9CXoiwL6xUhopG24aXpYNlmelnSkbaxuHvFaarKZKqV8G_bUfKB-yIYXrpGtlqwvqRC1qLlusRTF2QlZ1Y00rsZK1OxuBjTCqbNszryruysJ3yLHkleRcohDiUBphROtMJYVVEhsoOU3ah0NmO8RlKPy6btS1slZYBG0orHvKEHd6ebTR0ZC5MSdv6fazmG1YoeTBr2n9OSr5FPaMvp-i6sQeYzbJ68DMNmSv_hCqYltC988W7VJWwP6m5trh9wAAAP__IJwG5Q">