intel / ARM_NEON_2_x86_SSE

The platform independent header allowing to compile any C/C++ code containing ARM NEON intrinsic functions for x86 target systems using SIMD up to AVX2 intrinsic functions
Other
430 stars 149 forks source link

error: inlining failed in call to always_inline ‘__m128i _mm_alignr_epi8(__m128i, __m128i, int)’: target specific option mismatch #65

Open muyuuuu opened 1 year ago

muyuuuu commented 1 year ago
/usr/lib/gcc/x86_64-linux-gnu/7/include/tmmintrin.h:185:1: error: inlining failed in call to always_inline ‘__m128i _mm_alignr_epi8(__m128i, __m128i, int)’: target specific option mismatch
 _mm_alignr_epi8(__m128i __X, __m128i __Y, const int __N)
Zvictoria commented 1 year ago

Thanks for submitting that. The reason is the particular compiler behavior - it expects N to be the an immediate (explicit) constant. While I'm unable to check ALL compilers available (versions, compilation flags) and disabling inlining by default leads to performance decrease, you may disable it yourself for your setup by modifying line 2301 in NEON_2_SSE.h: ( defined (__INTEL_COMPILER) && !defined(llvm) ) just add some check for gcc compiler you have there like &&!defined(GNUC) (you need to look up the exact macro to check in your compiler documentation) and you are done