I am using Ubuntu 21.04 on Intel® Core™ i3-6157U CPU @ 2.40GHz × 4 on CHUWI core book. I made this source code and compiled.
#include <immintrin.h>
__m512i test__mm512_add_epi8 (__m512i a, __m512i b)
{
return _mm512_add_epi8 (a,b);
}
but cannot compile
$ gcc test.c
test.c: In function ‘test__mm512_add_epi8’:
test.c:4:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
4 | {
| ^
test.c:3:9: note: the ABI for passing parameters with 64-byte alignment has changed in GCC 4.6
3 | __m512i test__mm512_add_epi8 (__m512i a, __m512i b)
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:65,
from test.c:1:
/usr/lib/gcc/x86_64-linux-gnu/10/include/avx512bwintrin.h:924:1: error: inlining failed in call to ‘always_inline’ ‘_mm512_add_epi8’: target specific option mismatch
924 | _mm512_add_epi8 (__m512i __A, __m512i __B)
| ^~~~~~~~~~~~~~~
test.c:5:9: note: called from here
5 | return _mm512_add_epi8 (a,b);
| ^~~~~~~~~~~~~~~~~~~~~
How to solve this? Please teach me.