Skip to content

How to handle missing SIMD support with a future rustup component #1289

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

Closed
bjorn3 opened this issue Oct 12, 2022 · 3 comments
Closed

How to handle missing SIMD support with a future rustup component #1289

bjorn3 opened this issue Oct 12, 2022 · 3 comments
Labels
A-core-arch Area: Necessary for full core::arch support O-x86_64 Target: x64 processors

Comments

@bjorn3
Copy link
Member

bjorn3 commented Oct 12, 2022

Cg_clif is missing support for a lot of SIMD intrinsics. To reduce the impact of this on user code cg_clif currently replaces the cpuid call used by is_x86_feature_detected! to return only the bare minimum supported features. This works just fine when the standard library is compiled by cg_clif, but once cg_clif gets shipped as rustup component it will have to work with a cg_llvm compiled standard library which doesn't have this workaround. As it is unrealistic to implement all those SIMD intrinsics in the immediate future, I will need to find a way to make is_x86_feature_detected! return false where necessary when using cg_clif even if the standard library is compiled with cg_llvm.

@bjorn3 bjorn3 added A-core-arch Area: Necessary for full core::arch support O-x86_64 Target: x64 processors labels Oct 12, 2022
@bjorn3 bjorn3 added this to the Distribute as rustup component milestone Oct 12, 2022
@bjorn3
Copy link
Member Author

bjorn3 commented Jun 23, 2023

https://github.com/bjorn3/rustc_codegen_cranelift/pull/1378 implemented enough vendor intrinsics to compile cg_clif's test suite with a standard library compiled using LLVM.

@bjorn3
Copy link
Member Author

bjorn3 commented Oct 10, 2023

As of https://github.com/bjorn3/rustc_codegen_cranelift/pull/1397 is_x86_feature_detected!() now returns all actual cpu features when inline asm support is enabled. I haven't got any reports of programs crashing with this, so I assume all actually important vendor intrinsics are now supported.

@bjorn3 bjorn3 closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core-arch Area: Necessary for full core::arch support O-x86_64 Target: x64 processors
Projects
None yet
Development

No branches or pull requests

1 participant