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

    <tr>
        <th>Summary</th>
        <td>
            [SPIRV] Investigate usage of `report_fatal_error` in `SPIRVInstructionSelector`
        </td>
    </tr>

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

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

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

<pre>
    Throughout `SPIRVInstructionSelector` there are many uses of `report_fatal_error` to indicate various errors, however, none of these have any associated testing.

As part of https://github.com/llvm/llvm-project/pull/123853, this pattern was propagated to report an error and a test was added to ensure the correct error message was received. This caused the `hwasan` build bot to [fail](https://github.com/llvm/llvm-project/pull/123853#issuecomment-2608389396).

It is assumed that all of the other `report_fatal_error` instances would cause a similar failure if executed on the build-bot, or at the least, the other instance that outputs a diagnostics message printing out the current instruction [here](https://github.com/Icohedron/llvm-project/blob/def10ad82c6e527ba5c3aa29b76041dc94acff1d/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp#L3132).

This issue is to track an investigation of which uses of `report_fatal_error` cause the sanitization build-bot to fail, and apply a fix correspondingly.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyklMtu5LYShp-GvSlMQ6Iu3Vpo4RmjAQNncZAxsh2UyJLEhE0KZLF7nKcPSNmeALkYQVYy3HX9_r-IMZrFEY2i-yy6xwMmXn0YjZvIGnWYvH4Zn9fg07L6xCD66uv_n376-clFDkmx8e4rWVLsg-gr4JUCAQaCK7oXSJEi-DlnBdp84G8zMtpvFMJrvAfjtFHIBDcMxqcI5cco5BdY_Z1uFPKfzjvKlXilSLDijSA3wBi9MsikgSmycctRVA-ieniIsGHgnLIyb1E0D0JehLwshtc0HZW_Cnmx9vb2-bQF_wspFvKyJWuFvNSyOXdNbs6ryeWYKTi4Y4Qt-A2Xva2HfTVAt48O6DRgmacEo9Z7HLmYAuUVQPkQSPFrwpVixIVKdCBF5kb6CM-5q8IUc_ZKGeJ6x4gug5uSsRomz7mw6D7PaKzoHoU8_9d1GxNjIuWvV3L8SfbVuTkPzdALObyyfWIwMaNP1zIaMqC1r-qAzx74e8WNi4xOUYS7T1bvCwJCNFdjMUBeJFMyM9B3Uikz9q5ULjt_mjxnTTJnLv-2hJF3md66vzXZh_OJt8QRELTBxfnIRsV36FswLhsnh-3apBDIcSnyavFMODv7Q8JPyq-kg3d_xjxZPwl50TTXFeqzVD118jRhpxpEOUynvmprrYYW1TzX-g9ymZz3jGGhXKec39v3L87wqLZNyOZ_Td3IH5oVMxVls3bsgQOqX7Nnjbvly1mwLOpnuK9GrR-f7i5cBhbRGTa_7QXeRcpNiivll_0its2-AMJsvu_2j5t32rjFvhwPemz00Ax4oLE-NaduOPe1PKzjaT5VGoezpGqeZKurXrYzdUPVqvrctupgRlnJrqplU8m67-SxxZq06s911w8nfVKireiKxh4zzaMPy6FQGGvZVm13sDiRjeXxk9LRfWckpMxvYRiLhlNaomgrayLHH2XYsC2v5i5I9whP7yQJUvHWP_Ez7oPH9JCCHf_1NZf5Y7nnsuBtlL8HAAD__60z_pw">