Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
liushuyu:simd-test-x86-baseline-fix
Nov 15, 2024
Merged

tests: Fix the SIMD FFI tests with certain x86 configuration#133053
bors merged 2 commits into
rust-lang:masterfrom
liushuyu:simd-test-x86-baseline-fix

Conversation

@liushuyu

Copy link
Copy Markdown
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

rustbot commented Nov 14, 2024

Copy link
Copy Markdown
Collaborator

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

rustbot commented Nov 14, 2024

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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-*) (also known as IA-32, i386, i586, i686) labels Nov 14, 2024
@workingjubilee

Copy link
Copy Markdown
Member

I see.

@bors r+ rollup

@bors

bors commented Nov 14, 2024

Copy link
Copy Markdown
Collaborator

📌 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
Copy Markdown
Contributor Author

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

@workingjubilee

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@workingjubilee

workingjubilee commented Nov 14, 2024

Copy link
Copy Markdown
Member

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

@liushuyu

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@workingjubilee

Copy link
Copy Markdown
Member

Thanks!

@bors r+ rollup

@bors

bors commented Nov 15, 2024

Copy link
Copy Markdown
Collaborator

📌 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
@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-*) (also known as IA-32, i386, i586, 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