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

    <tr>
        <th>Summary</th>
        <td>
            [RISCV] Fix assertion failure when zcmp extension is enabled.
        </td>
    </tr>

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

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

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

<pre>
    Before accessing "getOpcode" thorugh machine instruction, check if the iterator
has reached the end of Machine basic block otherwise we will crash at the
assertion !NodePtr->isKnownSentinel().

The above assertion is hit in "Prologue/Epilogue Insertion & Frame Finalization
pass".

Differential - https://reviews.llvm.org/D158256
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUkkFv5CgQhX8NvpS65S7jjvvgQ5KOpWi1u9FkNHcMZVMTGizA7Ux-_chONJlcAKn03ldVPJUSj56oFfWdqM-FmrMNsR1VvHIe5ymrsin6YH61dzSESKC0ppTYjyAQR8r_TzoYEoiwCufRwkVpy56Afcpx1pmDF3gP2pJ-AR4gWwLOFFUOUZRnUd5alSCS0pbMViVvIAzw74dRrxJr6F3QLxCypbhwIlgIFnYOdFTJgsqr8t1OpURxxYLAw3_B0FOOO1E9cPrHh8U_k8_syQlsBJ7275r387slUH24Enx6cALLGXh1w6cYXBhnEtg9TLw94dF_4o7QRXUh6Ngrx29qG36znlRKAvEL7szDQHFtRznYgc15SqK6FdgJ7CJdmZa0d-562Yc4CuzOh7rB-liYtjKn6qQKag_HEzZ1XcmmsO2gqxs8nJqhlERotDS9ampEoqHRh-ZQcIslVmWDsqyrWjb7XqORlTGyPJq-lFLIki6K3R9qwSnN1B7lSd4UTvXk0hYVRE8LbEWBuCYntqtm189jErJ0nPJn70Xm7LaMfXt8vv8h6jN0_PrXkgfFbo4EiyUPb_oyAb1m8unjA8ir3pHZF3N07dc1jZzt3O91uAjsVt7HtZti-Ek6C-y2LpPAbpvidwAAAP__Ks_3dA">