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

Why do we require passing -msimd128 when passing -msse and related flags? #14032

Closed
ngzhian opened this issue Apr 27, 2021 · 3 comments
Closed

Comments

@ngzhian
Copy link
Collaborator

ngzhian commented Apr 27, 2021

Right now, if we pass -msse without passing -msimd128 we get a compile error.

-msse looks like a clear signal that we should enable SIMD, maybe the presence of -msse should enable the -msimd128 flag?

Seems like @juj added this when implementing the SSE compatibility headers.

@sbc100
Copy link
Collaborator

sbc100 commented Apr 27, 2021

I believe this has been discusses at length in the past.. I can't remember exactly why this path was chosen.. but I do think this was the decided on best approach.

@RReverser and @surma I believe were also involved with the discussion.

@RReverser
Copy link
Collaborator

Yeah I'm tempted to close this as duplicate of #12714 unless @ngzhian thinks this is a separate issue?

@ngzhian
Copy link
Collaborator Author

ngzhian commented Apr 27, 2021

Ah, I should have searched! Thanks!

From that issue:

While this works fine for Wasm-specific projects, it adds friction to building existing projects relying on SSE intrinsics. For example, CMake checks that try to use those flags, error out by default, and the only ways to fix it are either 1) modify CFLAGS / CXXFLAGS / etc. on the caller side to include -msimd128, which will now affect all targets in CMake and not only those that used -msse2 or 2) selectively modify CMakeFiles to include this extra flag only in places where -msse2 is used too and only on Emscripten target.

This was exactly what I faced :)

Closing as duplicate.

@ngzhian ngzhian closed this as completed Apr 27, 2021
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