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

configure.ac: cast utest to __m128i_u* in avx2 check for _mm_loadu_si128 #362

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,10 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
__m256i mtest2;
mtest = _mm256_set1_ps((float)time(NULL));
mtest = _mm256_fmadd_ps(mtest, mtest, mtest);
mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest));
mtest1 = _mm256_set_m128i(
_mm_loadl_epi64((__m128i_u *)utest), _mm_loadl_epi64((__m128i_u *)utest));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, __m128i_u is just an internal gcc/clang thing and not something we can rely on unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution?

mtest2 =
_mm256_cvtepi16_epi32(_mm_loadu_si128(utest));
_mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u *)utest));
return _mm256_extract_epi16(_mm256_xor_si256(
_mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0);
]]
Expand Down
Loading