================
@@ -242,6 +250,16 @@ unsigned char test_kortest_mask32_u8(__m512i __A, __m512i 
__B, __m512i __C, __m5
                             _mm512_cmpneq_epu16_mask(__C, __D), CF);
 }
 
+#if TEST_STD_VER > 17
+TEST_CONSTEXPR bool test_kortest_mask32_u8() {
+  unsigned char all_ones = 0;
+  return (_kortest_mask32_u8(0x0000'0000, 0x0000'0000, &all_ones) == 1) && 
(all_ones == 0)
+      && (_kortest_mask32_u8(0x0000'0000, 0x8000'0000, &all_ones) == 0) && 
(all_ones == 0)
+      && (_kortest_mask32_u8(0x0123'4567, 0xFEDC'BA98, &all_ones) == 0) && 
(all_ones == 1)
+      ;
+}
----------------
rturrado wrote:

I don't like very much the idea of adding `struct kortest_result`. It should 
better go in `builtin_test_helpers.h` instead of in a cpp file.

Another option would be to return `std::pair<unsigned char, unsigned char>`, 
but we would have to compare then against `__cplusplus >= 201402L` because 
`std::pair(U1 &&x, U2 &&x)` is `constexpr` since C++14.

https://github.com/llvm/llvm-project/pull/166103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to