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

    <tr>
        <th>Summary</th>
        <td>
            [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 integer comparison intrinsics to be used in constexpr
        </td>
    </tr>

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

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

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

<pre>
    The core integer comparison intrinsics could be used in constexpr:
```
_mm512_cmp_epi8_mask _mm512_cmp_epu8_mask
_mm512_cmp_epi16_mask _mm512_cmp_epu16_mask
_mm512_cmp_epi32_mask _mm512_cmp_epu32_mask
_mm512_cmp_epi64_mask _mm512_cmp_epu64_mask
```
These need to handle the comparison modes detaieds in the Intel Intrinsics Guide:
```
0: OP := _MM_CMPINT_EQ
1: OP := _MM_CMPINT_LT
2: OP := _MM_CMPINT_LE
3: OP := _MM_CMPINT_FALSE
4: OP := _MM_CMPINT_NE
5: OP := _MM_CMPINT_NLT
6: OP := _MM_CMPINT_NLE
7: OP := _MM_CMPINT_TRUE
```
There are a LOT of wrappers to these intrinsics (e.g. eq/ge/gt/le/lt/neq variants) - ideally we need test coverage for all of them. To avoid incredible boredom you should probably write a script to autogen these somehow.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEVFFv2zYQ_jXUyyGGRIqW_aAHJbaHYknbtV7QN4MizxJXilRJymn-_UDNSbc6XgGbIr7v093p4_FECLqziDXht4RvMjHF3vn60--f9eBs1jr1XO97BOk8grYRO_Qg3TAKr4OzCfLaBi0DSDcZBS3CFFCBtiCdDRG_j56whuQNWebnX94choEX9CCH8YCjXh0GEb7Cf8DpH_BCWyzfEp_RCzWjb6nP6IV6Wb6lPqM_fcG-x4BgERVEB72wyiDE2alXcwanMIDCKDSqkCxJgnc2oknri3G_TVrhpUc5YQ18-AiJYRs4PDwc7h4-vnu_P2z_IHlTXKXv9yRv6HV6S_KGXaV3zf3npCivKt4nml-n5_zL_-HT-9VVfv_pz-2l2R5BpD_cf9iDO8KTF-OIPiT343wW_2pFQle46BaA3wjddZiWSOjOpJ1JO4vf4CS8FjYGQtdwA1qhMOYZnl4OFUME6U7oRYdwdB6EMSlx7HFYwN6BODmd-lx6VLo1CK3zqNwAz26C0M-3YfSuFW0K63VM1Qfp9RhT0WKKrkN7Lj64AXv3tMhUzdSarUWGdVHxdVUynvOsr6tWHCvJSr6qjoxXXJS0KrA6Ki6wLCTLdE1zyos8X-ZrtqJ80a5Q8aKsJDsuV0wIUuY4CG0WxpyGhfNdpkOYsC6WNOdlZkSLJsxzgNLOOQVH7UOEWUQoJfSOUNoK-RWtIqz5slq-otII2xHW9CgU-vADf50APyvb54jSqTkw32S-TkXdtFMXSJkbHWL4UWbU0cwDKqXkG8Jv7-YofAOPKKPz2--j356EmUR087BhzaMOOt4JYxIHhO7ma-dHj_F20iZqCzcglILm8Qsv6C9GW3RvzrVs8qbuYxxDSkp3qc907Kd2Id2QWs2cXh43o3d_oUy9NxsaCN2djT_V9O8AAAD__8kpv4g">