-
Notifications
You must be signed in to change notification settings - Fork 11
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_srl_epi64() returns different results on LDC when -mattr=+avx2 is on #143
Comments
Hello, your unittest seems to pass here, what's your LDC version? (EDIT: and OS?) |
1.11.20 now implements I think you got trapped by an old LDC promoting your int THAT SAID, it seems newer LDC prevent such implicit conversions. As said, I don't repro your unittest, which is odd. |
Thanks for responding and implementing _mm256_srli_epi64()! Looking at the output more, I realized while my application was being compiled with -mattr=+avx2, intel-intrinsics was not. After changing:
to
and also replacing _mm256_srl_epi64() with _mm256_srli_epi64(), my unittest now passes; though it does not pass when intel-intrinsics is not built with -mattr=+avx2 This is reproducible by me on debian 12 bookworm with both the repo version of LDC v1.30.0 and a freshly compiled v1.39.0 |
I still can't repro on Windows or godbolt, I'm going to left it here. Probably need your LLVM version with |
The following code fails on my machine when compiling (ldc) with -mattr=+avx2
When NOT building with -mattr=+avx2:
When building with -mattr=+avx2:
CPU information:
If _mm256_srli_epi64() was implemented I would just use that instead :)
The text was updated successfully, but these errors were encountered: