[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #6 from Andrew Pinski --- https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm512_shuffle_epi32_expand=6414,6000 Specifically uses _MM_PERM_ENUM here too.
[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #5 from Andrew Pinski --- I see clang does not implement this intrinsics this way. They accept int.
[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #4 from Wenzel Jakob--- Aha, interesting -- that breaks it: test.cpp(9): error: argument of type "int" is incompatible with parameter of type "_MM_PERM_ENUM={_MM_PERM_ENUM}" _mm512_shuffle_epi32(_mm512_setzero_epi32(), _MM_SHUFFLE(0, 3, 0, 1)); Definitely not a very nice API design! I assume the right course of action then will be to mark this issue INVALID and change my code to cast to _MM_PERM_ENUM?
[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #3 from Jakub Jelinek --- Does it work even if you #define __INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES 1 before including immintrin.h?
[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #2 from Wenzel Jakob--- I just tried compiling this snippet with ICC 17.0.0. It accepts it without warnings (-Wall -Wconversion -Wextra). So even if the signature is different, ICC seems to be more relaxed about passing an integer value to an enum parameter.
[Bug target/77633] AVX512: shuffle intrinsic has incorrect signature when optimizations are enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77633 --- Comment #1 from Jakub Jelinek --- Looking at ICC 16.0.2, it uses the same prototypes though, again with _MM_PERM_ENUM as the type of this argument. It is true the AVX512 manual states int rather than _MM_PERM_ENUM, so I don't know what is right. The reason it "works" with -O0 is that for -O0 it uses preprocessor macros rather than inline functions, so there is no type checking whatsoever in that case.