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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64] Crash if code defines __arm_tpidr2_save
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:AArch64
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          efriedma-quic
      </td>
    </tr>
</table>

<pre>
    Testcase (compile with `-march=armv9-a+sme -g`):

```
void __arm_tpidr2_save() {}
__arm_new_za void f(float *a) {}
```

```
inlinable function call in a function with debug info must have a !dbg location
  call aarch64_sme_preservemost_from_x0 void @__arm_tpidr2_save()
fatal error: error in backend: Broken module found, compilation aborted!
```

https://c.godbolt.org/z/MnhMMET9P
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Uk1vnDAQ_TXDxdqVGdgPDhx2s91bpB5yR4M9gBsbb22zafPrKyBR1PRDQoBHb97Me34Uo-lH5hp2Z9hdMprS4EPNXTCsHW2-T0Zlrdc_6yeOSVFkAXhU3t2MZfFi0iBgLzeOghqguFBw92pDgOfoWGx62EvACooTyAvI9_devj3L8e6NFk1DwTXpZnTAJtKdAY-AlYDDGQ6XFbhiRn5pXkksXR3gsbOekgA80Wf8pzl_LZrRmpFay6KbRpWMH4Uia4UZBX2UFp2a26kXZuy8cFNMYqA7CxKAuW57Yb2iGbvSipWFZlv2ZRMdN7fAkcOdnY-p6YJ3zQ-5qoBS_kP-StZRIis4BB-gOK0_84ItqWce9Vw7B__Mo3BeT7MUP40a8EGs97TsJaj1IbEGzP_jzpDSLc7XhVfAq9r2Xrfepq0PPeD1FfD6OA6Pj1-eqq-ZrgtdFRVlXOf76liVVbEvs6He4YGwyFHnlWZdaayOsugUHsqCy1btMlOjxCLPJeZHxLLYliyrMi81cdF1MpdQSnZk7Nbau5tnZybGietDLo9VZqllG5fAIn54cDotXgPinONQz72bduojlNKamOIHWzLJLol_79ldxEOgOAjTCeU1C82dGTn-GctsCrb-3aXepGFqt8o7wOs84-2zuQX_jVUCvC7rR8DrouBXAAAA__8bMRGc">