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

tests: Fix the SIMD FFI tests with certain x86 configuration #133053

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

liushuyu
Copy link
Contributor

This pull request fixes the SIMD FFI tests with certain x86 configurations by gating the SSE2 intrinsic behind the sse2 feature gate. A generic LLVM intrinsic that is easy to un-fuse on those platforms is added to compensate for those platforms.

... that do not have SSE2 support (e.g. i586)
@rustbot
Copy link
Collaborator

rustbot commented Nov 14, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Nov 14, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2024
@liushuyu
Copy link
Contributor Author

@rustbot label A-SIMD O-x86_32

@rustbot rustbot added A-SIMD Area: SIMD (Single Instruction Multiple Data) O-x86_32 Target: x86 processors, 32 bit (like i686-*) labels Nov 14, 2024
@workingjubilee
Copy link
Member

I see.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 14, 2024

📌 Commit 143ffc3 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2024
@liushuyu liushuyu force-pushed the simd-test-x86-baseline-fix branch from 143ffc3 to a0329d6 Compare November 14, 2024 21:31
@liushuyu
Copy link
Contributor Author

Sorry, I had some skill issues ™️ managing the git stash; now I have pushed the correct changes.

@workingjubilee
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 14, 2024
@workingjubilee
Copy link
Member

@liushuyu Your previous revision seems more correct, some x86-64 targets do not enable sse2

@workingjubilee
Copy link
Member

workingjubilee commented Nov 14, 2024

granted, we don't run tests on most bare metal targets, but still

@liushuyu
Copy link
Contributor Author

granted, we don't run tests on most bare metal targets, but still

According to https://gitlab.com/x86-psABIs/x86-64-ABI, at least on Linux, "x86_64 (baseline)" means SSE + SSE2. I could not find information for Windows, but according to https://en.wikipedia.org/wiki/X86-64#AMD64 it seems like SSE registers are a standard at least for AMD64.

@liushuyu
Copy link
Contributor Author

Oh, sorry, you meant freestanding implementations, my bad. I will change the test.

... to do more comprehensive type checking
@liushuyu liushuyu force-pushed the simd-test-x86-baseline-fix branch from a0329d6 to 0733ed7 Compare November 14, 2024 22:50
@liushuyu
Copy link
Contributor Author

Done. The test is updated to gate both x86 platforms behind the sse2 feature gate.

@workingjubilee
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2024

📌 Commit 0733ed7 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 15, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2024
…kingjubilee

Rollup of 8 pull requests

Successful merges:

 - rust-lang#132790 (Add as_slice/into_slice for IoSlice/IoSliceMut.)
 - rust-lang#132905 ([AIX] Add crate "unwind" to link with libunwind)
 - rust-lang#132977 (Fix compilation error on Solaris due to flock usage)
 - rust-lang#132984 ([illumos] use pipe2 to create anonymous pipes)
 - rust-lang#133019 (docs: Fix missing period and colon in methods for primitive types)
 - rust-lang#133048 (use `&raw` in `{read, write}_unaligned` documentation)
 - rust-lang#133050 (Always inline functions signatures containing `f16` or `f128`)
 - rust-lang#133053 (tests: Fix the SIMD FFI tests with certain x86 configuration)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit efe2c44 into rust-lang:master Nov 15, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2024
Rollup merge of rust-lang#133053 - liushuyu:simd-test-x86-baseline-fix, r=workingjubilee

tests: Fix the SIMD FFI tests with certain x86 configuration

This pull request fixes the SIMD FFI tests with certain x86 configurations by gating the SSE2 intrinsic behind the `sse2` feature gate. A generic LLVM intrinsic that is easy to un-fuse on those platforms is added to compensate for those platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-SIMD Area: SIMD (Single Instruction Multiple Data) O-x86_32 Target: x86 processors, 32 bit (like i686-*) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants