Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_mm256_slli_epi16 to neon failed with Clang18 #1227

Open
lijing0010 opened this issue Oct 11, 2024 · 3 comments
Open

_mm256_slli_epi16 to neon failed with Clang18 #1227

lijing0010 opened this issue Oct 11, 2024 · 3 comments

Comments

@lijing0010
Copy link

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?

@mr-c
Copy link
Collaborator

mr-c commented Oct 11, 2024

Hello @lijing0010 , can you share the compiler output when it doesn't work?

@lijing0010
Copy link
Author

lijing0010 commented Oct 12, 2024

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

@aqrit
Copy link
Contributor

aqrit commented Oct 30, 2024

_mm256_slli_epi16 also "needs a compile stage constant for the 2nd parameter"...

related: #905 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants