Hello
This code does not compile with icc 19.0.4.243.
#include <immintrin.h> extern "C" { void fct() {} } int main() { __asm__ __volatile__("callq fct"); __mmask8 a; __mmask8 b; __mmask8 r = _kand_mask8(a, b); }
I use this command for the compilation:
icc -mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -march=skylake-avx512 -O0 main.cpp
I get an error message:
/tmp/iccRFTW6tas_.s: Assembler messages: /tmp/iccRFTW6tas_.s:56: Error: no such instruction: `vkmovb %eax,%k0' /tmp/iccRFTW6tas_.s:57: Error: no such instruction: `vkmovb %edx,%k1' /tmp/iccRFTW6tas_.s:59: Error: no such instruction: `vkmovb %k0,%eax'
If we remove the __asm__ line or if we replace "callq fct" by "nop", the code compiles with the same command:
icc -mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -march=skylake-avx512 -O0 main.cpp
But, even without the __asm__ line, we get the same error with these commands:
icc -mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -march=skylake-avx512 -O0 main.cpp -S icc -mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -march=skylake-avx512 -O0 main.s
When the compilation works, icc (and g++) generate(s) kmovb instructions instead of vkmovb.
I have the same issue on godbolt.org (with ./a.out activated). It looks like an icc bug?