-
Notifications
You must be signed in to change notification settings - Fork 253
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
gcc-9 + power9: x86/sse4.1.h:1025:60: error: ‘SIMDE_SHUFFLE_VECTOR_’ was not declared in this scope #691
Comments
I can't reproduce this without knowing which flags were used; GCC 9 + POWER 9 works fine here. The basic fix for this is pretty straightforward: diff --git a/simde/x86/sse4.1.h b/simde/x86/sse4.1.h
index 21c9c0b..cd413e8 100644
--- a/simde/x86/sse4.1.h
+++ b/simde/x86/sse4.1.h
@@ -1020,7 +1020,7 @@ simde_mm_cvtepu32_epi64 (simde__m128i a) {
#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u64 = vmovl_u32(vget_low_u32(a_.neon_u32));
- #elif defined(SIMDE_VECTOR_SCALAR) && (SIMDE_ENDIAN_ORDER == SIMDE_ENDIAN_LITTLE)
+ #elif defined(SIMDE_VECTOR_SCALAR) && defined(SIMDE_SHUFFLE_VECTOR_) && (SIMDE_ENDIAN_ORDER == SIMDE_ENDIAN_LITTLE)
__typeof__(r_.u32) z = { 0, };
r_.i64 = HEDLEY_REINTERPRET_CAST(__typeof__(r_.i64), SIMDE_SHUFFLE_VECTOR_(32, 16, a_.u32, z, 0, 4, 1, 6));
#elif defined(SIMDE_CONVERT_VECTOR_) That said, if |
@nemequ Okay, I manually updated the simde-no-tests repo for the post v0.7.0 commits and redid the PR to MMSeqs2 with a commit that enabled verbose builds The new power9 cross build is running now at https://dev.azure.com/themartinsteinegger/mmseqs2/_build/results?buildId=814&view=logs&j=b6ebde74-a63b-50c4-676d-2e6c6772f234 |
Here is the compile line:
|
Thanks! I still can't reproduce it by just adding those flags to a SIMDe build, but I can by building with MMseqs2. That should be enough to identify the issue. BTW, all those other warnings can be cleaned up by passing -Wno-psabi. Unfortunately it's not something we can fix in SIMDe since it is emitted on the caller side :( |
Okay, I figured it out. It's because of this: https://github.com/soedinglab/MMseqs2/blob/bad16c765aac60d84a8fde3548adbb06b34980bd/src/commons/Util.h#L50-L52 MMseqs2 is defining #if defined(__has_builtin)
#if __has_builtin(__builtin_shuffle)
#define HAVE_BUILTIN_SHUFFLE 1
#endif
#elif defined(__GNUC__) && (__GNUC__ > 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
#define HAVE_BUILTIN_SHUFFLE 1
#endif The most straightforward solution is to use a namespaced version, for example: #if defined(__has_builtin)
#define MMSEQS2_HAS_BUILTIN(x) __has_builtin(x)
#else
#define MMSEQS2_HAS_BUILTIN(x) (0)
#endif Note that MMSeqs2 also does something similar for I'm obviously biased, but IMHO a better solution would be to just use Hedley. Hedley already has Also, for I'm going to go ahead and fix the bug in SIMDe which revealed this problem (we should be checking if Avoiding this in the future is an interesting problem. Clang still uses code like this in their manual; I filed a bug about it a while back, but they don't seem to care, so I wouldn't be surprised to see this more in the future… The only thing I can think of would be to check #if defined(__has_builtin) && defined(HEDLEY_GCC_VERSION) && !HEDLEY_GCC_VERSION_CHECK(11,0,0)
HEDLEY_WARNING("__has_builtin has been improperly defined by user code")
#endif But that has a few problems. First off, We would also have to keep bumping that version every so often as new versions of GCC which don't support Finally, this obviously relies on maintaining a list of compilers which we know don't support |
https://dev.azure.com/themartinsteinegger/mmseqs2/_build/results?buildId=813&view=logs&j=b6ebde74-a63b-50c4-676d-2e6c6772f234&t=c2a39823-bf84-5acf-9756-8c6ab4c824a2&l=351
The text was updated successfully, but these errors were encountered: