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

    <tr>
        <th>Summary</th>
        <td>
            [X86] Enable constexpr on LZCNT and BMI intrinsics
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            backend:X86,
            clang:headers
      </td>
    </tr>

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

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

<pre>
    The x86 specific LZCNT and BMI intrinsics in lzcntintrin.h and bmiintrin.h are all capable of being converted to constexpr

We did something similar for the POPCNT intrinsics here: https://reviews.llvm.org/D86229 / cff0db08761f310dfebb5b41b307d2c12bda85fc

- [ ] Update `__builtin_ia32_*` intrinsics to allow handling in ExprConstant
- [ ] Update headers - ensuring they work for c, pre-C++11 and later C++ builds
- [ ] Test coverage - including the macro variants of some of the methods (e.g. `_tzcnt_u32` for `__tzcnt_u32`)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U8uO3DYQ_Brq0pgBH5JGc9BhHh4gyMtINkiQy4CPlsSYIgWSml3n6wPKi_XGgC8iWCLZVV3VMiU7esSeNGfSXCu55inE_rcff7dz8JUK5nP_NCG8dC2kBbUdrIaf_r788gTSGzj__ANYn6P1yeoE1oP7V_v8BdpP2xk126_7iCCdAy0XqRxCGECh9SPo4B8YMxrIoWxSxpclEnol9PTl-yeCsQZSmDFP5Uqys3UywhAi5Anh468fC613dCaMSMQJppyXRMSJ8Bvht4gPi89p79xj3oc4En67di3nRyD8BnoYqFG0O7RsEIyaAZVqVM2UoAfDNePKyK4Z9HtqOyDNGUhzhT8WIzMCaen9rlbrsvV3KwW_E34iLX1PLofSifAMk_TGFUHWw4eXJV6Keunzd96eUBqMCXaAPq2xXMwTfobnED9tvdCEX2CJuLsQfib8zNhmg5MZI7xiUMiZ9G2JJ0wZdHhglCPCDqzXbjWvJWCWOgZ4yGilz6l4V8wo6_YX8xRMAsI73I_7rQe5hOG-Cl60F25bY96jhB8r0wtzFEdZYc8OjFEhmGiqqWeaik4wbGrBDuogu6Huakn1UVNRq8FUtueU11Rwxuqma-o96_jBaGywNlp2siU1xVla9-Z1ZVNase9axrvKSYUubcnnfAzBwGBjyrCdIZwTfiGcK6k_oTdEnP7q2jdUO-lHIk6vbhS8uVaxL4V2ah0TqamzKX-NWZVtdtuclXeaK3zw2wi8hR2C_-5kVWt0_f9jPNo8rWqvw0z4rRR5XXZLDP-gzoTfNiGJ8Num978AAAD___36QCA">