rturrado wrote: A couple of questions.
1) `clang/lib/Headers/avx512fintrin.h` implements both `_mm512_kortestc(A, B)` and `_kortestc_mask16_u8(A, B)` in terms of `__builtin_ia32_kortestchi`. However, `_mm512_kortestc` returns an `int` with the value of `A | B`, while `_kortestc_mask16_u8` returns an `unsigned char` with the value `A | B = 0xFFFF`. Wouldn't it be better to have `mm512_kortestc` also as a builtin? 2) I have updated `clang/lib/AST/ByteCode/InterpBuiltin.cpp` adding cases for all the `ktest` and `kortest` instructions, and calling `interp__builtin_elementwise_int_binop`, which returns an `APInt`. Wouldn't it be better to call `interp__builtin_ia32_test_op` and return a `bool` (which could later be casted to an `unsigned char`). A possible `_mm512_kortestc` could indeed call `interp__builtin_elementwise_int_binop` and return an `APInt` of 16 bits. https://github.com/llvm/llvm-project/pull/166103 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
