-
Notifications
You must be signed in to change notification settings - Fork 273
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
Fix generated Neon simd_test features. #1367
Conversation
r? @Amanieu (rustbot has picked a reviewer for you, use r? to override) |
64ef5ac
to
5af8e01
Compare
Hmm... |
I accidentally added an invisble space in this line. CI passed in the PR because rustfmt-preview was missing. Lines 5 to 9 in 368ba1a
Is the single space worth a PR? 😂 |
As @Nugine said, just remove the extra space in this PR. |
"arm" and "aarch64" support different sets of `target_feature` and `simd_test` arguments, and for "arm", the set of features that can be dynamically detected is different again. Restructure the generator code to allow this to be expressed accurately (in future patches). This implementation preserves the way that target features are specified for shared intrinsics, because this has an impact on the generated documentation. In particular, rustdoc cannot look inside `cfg_attr(target_arch = ...)` tests, so we use unconditional `target_feature` attributes where possible.
The tests can run if and only if the target_features for the corresponding intrinsics are detected at run-time, so make sure that the tests have an appropriate `simd_test()`. This fixes some failures due to tests running when they shouldn't. For example, some tests would fail on hardware that lacks "fcma".
5af8e01
to
1d47fa7
Compare
Done. Sorry about the force-push; the whitespace fix wouldn't apply otherwise. |
The tests can run if and only if the target_features for the corresponding intrinsics are detected at run-time, so make sure that the tests have an appropriate
simd_test()
.This fixes some failures due to tests running when they shouldn't. For example, some tests would fail on hardware that lacks "fcma".
This decouples the feature names in the generator, since "arm" and "arm64" use different names, and for "arm" the dynamic
simd_test
features don't match the statictarget_feature
names.There are several changes to the tests, but changes to the generated intrinsics themselves are minimal, and cosmetic.