_mm256_slli_epi16 to neon failed with Clang18
Hi, I'm using SIMDe to convert AVX to neon, and there's _mm256_slli_epi16 in my original code. when compiling with gcc13.2, it's fine. When changed to Clang, it will have compile error.
Seems in gcc13.2, vshlq_n_s16() internally will use __builtin_aarch64_ashlv8hi(), and it's OK. But in Clang, vshlq_n_s16() will use __builtin_neon_vshlq_n_v(), which needs a compile stage constant for the 2nd parameter.
Is there anything I can do for this? or did I miss anything?
Hello @lijing0010 , can you share the compiler output when it doesn't work?
something like: error: argument to '__builtin_neon_vshrq_n_v' must be a constant integer 1105 | val1 = _mm256_srli_epi32(val1, iQBits);
on gcc it's fine since it called __builtin_aarch64_ashlv8hi
btw: I'm compiling it on an arm server with ubuntu 24.04 LTS
_mm256_slli_epi16 also "needs a compile stage constant for the 2nd parameter"...
related: https://github.com/simd-everywhere/simde/issues/905#issuecomment-1286352881