Skip to content

Sync from portable simd 2026 07 20#159582

Open
folkertdev wants to merge 21 commits into
rust-lang:mainfrom
folkertdev:sync-from-portable-simd-2026-07-20
Open

Sync from portable simd 2026 07 20#159582
folkertdev wants to merge 21 commits into
rust-lang:mainfrom
folkertdev:sync-from-portable-simd-2026-07-20

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

r? @ghost

feel free to r+ once green

folkertdev and others added 17 commits April 12, 2026 13:26
the `float-cmp` and `num-traits` libraries don't (yet) support f16. Turns out we didn't really need much from them, just the ulps check. I've adapted the ulps check from miri instead
relevant for the cranelift backend, possibly other cases/targets too
Fix pointer API to match what was stabilized
We can do swizzles for 24, 32, 48 and 64 byte vectors by stacking multiple TBL
instructions.

See https://godbolt.org/z/PE95nrqjj for a comparison of the generated assembly.
Optimize `swizzle_dyn` for AArch64 with N > 16
`From` impls were already provided for the normal AArch64 ACLE vector types, but
not for the x2,x3,x4 tuples of ACLE vectors. Rectify that.

Also provide impls for vectors of `f16`, as I noticed they were missing.
For symmetry with `Mask::first_set`
…mpls

Provide `From` impls for AArch64 ACLE tuple types.
Use `impl` restrictions over hand-sealed traits
Optimize `swizzle_dyn` for LoongArch64 with N is 16 or 32
@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

portable-simd is developed in its own repository. If possible, consider making this change to rust-lang/portable-simd instead.

cc @calebzulawski, @programmerjake

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2026
@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust.git main
    $ git push --force-with-lease
    

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 19, 2026
@folkertdev

Copy link
Copy Markdown
Contributor Author

This sync (specifically ignoring f16 tests) will help with rust-lang/rustc_codegen_cranelift#1675

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jul 20, 2026
@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

@folkertdev
folkertdev force-pushed the sync-from-portable-simd-2026-07-20 branch from e7ea91d to 7629861 Compare July 20, 2026 11:10
@rust-log-analyzer

This comment has been minimized.

@folkertdev

Copy link
Copy Markdown
Contributor Author

Hmm, blocked on rust-lang/miri#5219 (needs to be merged and synced).

@RalfJung

Copy link
Copy Markdown
Member

We can also disable that test on aarch64 for now with a FIXME, if you want to not block this sync. It's a very new test.

Comment thread src/tools/miri/tests/pass/intrinsics/portable-simd.rs Outdated
@folkertdev
folkertdev force-pushed the sync-from-portable-simd-2026-07-20 branch from 0574ce9 to f32f69b Compare July 20, 2026 16:39
@oli-obk

oli-obk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f32f69b has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 20, 2026
@folkertdev

Copy link
Copy Markdown
Contributor Author

@bors p=1

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 20, 2026
…-2026-07-20, r=oli-obk

Sync from portable simd 2026 07 20

r? @ghost

feel free to `r+` once green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-merge-commits PR has merge commits, merge with caution. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.