[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 KTEST/KORTEST intrinsics to be used in constexpr (PR #166103)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 6 05:34:23 PST 2025


================
@@ -8965,6 +8965,10 @@ int test_mm512_kortestc(__m512i __A, __m512i __B, __m512i __C, __m512i __D) {
                          _mm512_cmpneq_epu32_mask(__C, __D));
 }
 
+TEST_CONSTEXPR(_mm512_kortestc(0x0000, 0x0000) == 0x0000);
+TEST_CONSTEXPR(_mm512_kortestc(0x0000, 0x8000) == 0x8000);
+TEST_CONSTEXPR(_mm512_kortestc(0x0123, 0xFEDC) == 0xFFFF);
----------------
RKSimon wrote:

These should be return 0 or 1 - not a bitmask
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm512_kortestc&ig_expand=3934,3937,3932

https://github.com/llvm/llvm-project/pull/166103


More information about the cfe-commits mailing list