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

disambiguate vector type to avoid errors depending on lax conversion … #614

Merged
merged 1 commit into from Oct 4, 2023

Conversation

JoachimSchurig
Copy link
Contributor

@JoachimSchurig JoachimSchurig commented Oct 4, 2023

…settings

Typecast explicitly to __m128d * to avoid compiler errors depending on platform and compiler, and the settings of -flax-vector-conversions or its different defaults

The test suite will fail to compile on AppleClang/aarch64 with at least AppleClang 14 and 15 if you add the compiler option -flax-vector-conversions to the makefile. There are projects that include sse2neon.h that have this option set.

Also, the option has differing defaults depending on compiler make and version, therefore it makes sense to not depend on it for the code to be compiled.

See discussions here: llvm and here gcc

@jserv
Copy link
Member

jserv commented Oct 4, 2023

Thank @JoachimSchurig for contributing. Can you check #571 as well?

@JoachimSchurig
Copy link
Contributor Author

Thank you for this wonderful project!

As for #571, all tests compile and pass on AppleClang when compiled with -flax-vector-conversions or -flax-vector-conversions=none or -flax-vector-conversions=integer or -fno-lax-vector-conversions (or without any of those).
I think the difference to the above is that they operate on value types and not on pointers, and not through the __builtin_nontemporal_store builtin. That may trigger the error at _mm_stream_pd.

@jserv jserv merged commit 2c0face into DLTcollab:master Oct 4, 2023
14 checks passed
@JoachimSchurig JoachimSchurig deleted the fix-vector-conversion branch October 4, 2023 17:25
@jserv jserv mentioned this pull request Jan 5, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants