Skip to content

Conversation

@folkertdev
Copy link
Contributor

For use in stdarch. We currently use an equivalent of the fallback body here, but on some targets the intrinsic generate better code.

r? RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

Some changes occurred to the platform-builtins intrinsics. Make sure the
LLVM backend as well as portable-simd gets adapted for the changes.

cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 21, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

RalfJung is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member

What about support in Miri? Miri doesn't use fallback bodies automatically, they need to be marked to promise that if there is any UB-checking to do, it will be done.

And in fact the implementation here looks like it doesn't do full UB checking, since the implementation will work fine if idx is outside the bounds of the vector as long as there is other memory there that can be dereferenced at the given type.

@RalfJung
Copy link
Member

The intrinsics are exactly like the non-dyn variants, right? So they can probably be implemented for const-eval and Miri by just adding | sym::simd_insert_dyn etc around here.

The fallback body still needs to be const due to #150961.

@folkertdev
Copy link
Contributor Author

At that point all backends have custom implementations, so the fallback body could be dropped?

@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@RalfJung
Copy link
Member

If that's the case then yeah, it can be dropped.

@RalfJung
Copy link
Member

Looks great, thanks!
r=me when CI is green.
@bors delegate+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

✌️ @folkertdev, you can now approve this pull request!

If @RalfJung told you to "r=me" after making some further change, then please make that change and post @bors r=RalfJung.

@folkertdev
Copy link
Contributor Author

@bors r=RalfJung rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

📌 Commit b4220ec has been approved by RalfJung

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-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 21, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #147426 ( tests/debuginfo/basic-stepping.rs: Add revisions `default-mir-passes`, `no-SingleUseConsts-mir-pass`)
 - #150880 (Remove old error emitter)
 - #151432 (use `deny(missing_docs)` for non-mir intrinsics)
 - #151444 (Move UI tests)
 - #151445 (Derive `Default` for `QueryArenas`)
 - #151453 (make `simd_insert_dyn` and `simd_extract_dyn` const)

r? @ghost
@rust-bors rust-bors bot merged commit 530eeff into rust-lang:main Jan 21, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Jan 21, 2026
Rollup merge of #151453 - folkertdev:simd-dyn-const, r=RalfJung

make `simd_insert_dyn` and `simd_extract_dyn` const

For use in `stdarch`. We currently use an equivalent of the fallback body here, but on some targets the intrinsic generate better code.

r? RalfJung
@rustbot rustbot added this to the 1.95.0 milestone Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

4 participants