rust icon indicating copy to clipboard operation
rust copied to clipboard

Mark const SIMD intrinsics as indirectly stable

Open sayantn opened this issue 1 month ago • 6 comments

recently most SIMD intrinsics were made available in const contexts in rust-lang/rust#147521. This PR makes the indirectly stable to use in const contexts.

cc @RalfJung @rust-lang/lang @rust-lang/wg-const-eval

sayantn avatar Dec 04 '25 17:12 sayantn

⚠️ #[rustc_intrinsic_const_stable_indirect] controls whether intrinsics can be exposed to stable const code; adding it needs t-lang approval.

cc @rust-lang/wg-const-eval

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

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

rustbot avatar Dec 04 '25 17:12 rustbot

r? @joboet

rustbot has assigned @joboet. 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 avatar Dec 04 '25 17:12 rustbot

So you plan to soon const-stabilize functions using these intrinsics?

RalfJung avatar Dec 04 '25 22:12 RalfJung

I won't say soon (it would require t-libs-api approval), but yes the plan is eventually to stabilize them

sayantn avatar Dec 04 '25 22:12 sayantn

Usually we do the t-lang FCP for const intrinsics as part of that stabilization, not preemptively.

RalfJung avatar Dec 05 '25 06:12 RalfJung

r? @RalfJung I'm really not sure who normally handles these PRs, feel free to reassign as necessary.

joboet avatar Dec 05 '25 14:12 joboet