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

    <tr>
        <th>Summary</th>
        <td>
            __cpuidex only exposed on Windows while GCC exposes it on linux as well.
        </td>
    </tr>

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

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

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

<pre>
    Gcc seems to be exposing __cpuidex as a built-in. (See https://compiler-explorer.com/z/MfGsbbr5f)
````
#include <cpuid.h>
#include <array>
void f()
{
    std::array<int, 4> cpui;
    __cpuidex(cpui.data(), 0, 0);
}
````

Clang already has an implementation of this built-in, as it was introduced in https://github.com/llvm/llvm-project/commit/8cd8bd4a5ca702024b9df53a9c7984bb700488a0
Can this be exposed all of the time instead of only when compiling on windows


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GOnDAM_ZpwsRaFhAxw4DDL7qxUqadK7XFliGdIFRJEws5Ov76CYWdWVXuohBIrxvZ7zzaGYE6OqGbqkamnBOfY-6n-8n0_kktary_1S9dBIBoCRA8tAb2PPhh3gtfXbpyNpnfAAAjtbGx8MC4FJspvRNDHOAYm90wcmDh0fhiNpemB3kfrJ5rSzg9MHH4xcfh6fAltO6kjExXjT4zv2Y7fv-uLkMZ1dtYETDZr5bRn8vlvXpwmvNx8b95oODJR3rMXj1cDACBEvYCU-y2qMS4y0UDO5DMsdZj89PeNNBPlYqUaI265RQN8O6pbECue_klpPRuL7gRoJ0J9gX7R0oEZRksDuYjReAf-CLE34abxUgUDmAjn5XJx8nruSINxf8h-MrGf201ra98-rodx8j-pi9fODGYxyk6Xrc5RdVhwwUXeVvqoJFZdUZV52xac52WJG_oG3QZqmwnSgNZesRJEMxAYFyKhXt68sxc49-TgOgnLBHkHZ-O0P4fPgiS6lrqSFSZUZ7tC8WKnVJn0NS9y1ZFSxVFTJgvVYo6dzkvKUOhKyMTUggvJM8mzjAtZplXRZSiqYicUqmqnWM5pQGPTRYLUT6fEhDBTveOylInFlmz4WIWpXnVq51NgObcmxHAPiyZaqu8bsLL7UME7-HGlBefeWIKXptmca8-8A2vcvO7NmaxNk3my9X_3bYUemDis6H8HAAD__8-ELDc">