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

    <tr>
        <th>Summary</th>
        <td>
            Clang incorrectly disallows SVE builtins & types when SVE is disabled but SME is enabled
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            SVE
      </td>
    </tr>

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

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

<pre>
    Issue is what it says on the tin.

There are two parts to this as far as I can see. In `Sema.cpp` there's some diagnostics that check if "sve" is enabled for the target before sizeless types are used. This one is easy to fix.

The worse one is the fact that `SInst` which is the parent of every SVE instruction defines `TargetGuard = "sve";` and we have to manually override it every time something diverges. I'm not sure which is the best way to fix this. We could have the default be "sve|sme" and the make sure that every override takes into consideration whether or not SME should be in the list of valid prerequisites. This seems like less work than having to change it for every instruction definition.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkkzGT4zYMhX8N1WBOI1OWfC5U3N2uMy5S7c6lhkRYQkyRDkFZcX59htQ6O0ka0wUEfO89AEV4dESdar6r5qXAJU4-dEgzBfGu6L15dGeRhYAF1gkjcATBh4B3ECeCyK5U1Yuqvm2_7xMFAgwEcfVwwxAFooc4sQAKXDCk5wwDOhCiEs4OVFu90YzlcLuptkptAyl9EBA_ExjG0XmJPAjERDBMNFyBL6C0ljsprRMcOewtGbj4sIFhGClCTxcfCIT_IksiEB83ksy3CJkS3hOYd1kfoTwS7IX__K8mWH0Qeham_hcc4saT8M9OYmJfJx6mZ8kNA7kI_gJ0p_CAt5-vwE5iWIbI3oGhCzuS1OA90_6yYDCg6pdPaar-nvqiM7ASTHinRDijW9DaB_g7hcCGUizbkMgzZePixG4Ew3cKI0kJZ6UPMzgfQZZA_ybtSSKs-FSf4yrhN4LBL9Z8jJ0oEeNik6tPwsMPmXMEiTCVzHilbUI2Z4P6BzPilQTYRQ-Dd8KGAmYv1olS7uBDRnz79RVkysN7At52zbJkN-9o2cAtUKA_FhaOSV4OUohmActXgpz26sM1cbgkIdmR5k7oxmxYWpWN73-pcPpbFqarzbE-YkHd7rDbHZqvx0YXU2d2pqe2bgdsza6u2r3RQ930tcFhaNvDseBOV3pf1XVVVXXT6LKpqz0d26Y31Z4Ou53aVzQj29La-1z6MBaczqz7etjpY2GxJyv5KrV--_maFqF5KUKXqr_0yyhqXyU75PP7yNFS98OiG4Hd4EOgIdoHGBa01q-S969f2EZ2Akq3H8ewTuS23ZRcnM-oX7YQPi-rWILtphhvoupvSp-UPo0cp6UvBz8rfUogH8-XW_C_0xCVPmVVovQpC_s7AAD__3A6guI">