diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index a5227a30ca615..7a81a0969b5c2 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -623,6 +623,7 @@ pub fn check_intrinsic_type( sym::simd_cast | sym::simd_as | sym::simd_cast_ptr + | sym::simd_reinterpret | sym::simd_expose_addr | sym::simd_from_exposed_addr => (2, 0, vec![param(0)], param(1)), sym::simd_bitmask => (2, 0, vec![param(0)], param(1)), diff --git a/library/core/src/intrinsics/simd.rs b/library/core/src/intrinsics/simd.rs index 427a95f4665da..b40425f02d5e9 100644 --- a/library/core/src/intrinsics/simd.rs +++ b/library/core/src/intrinsics/simd.rs @@ -122,7 +122,7 @@ extern "rust-intrinsic" { /// * Not be infinite /// * Be representable in the return type, after truncating off its fractional part #[rustc_nounwind] - pub fn simd_cast(x: T) -> U; + pub fn simd_cast(x: T) -> U; /// Numerically cast a vector, elementwise. /// @@ -138,6 +138,10 @@ extern "rust-intrinsic" { #[rustc_nounwind] pub fn simd_as(x: T) -> U; + #[cfg(not(bootstrap))] + #[rustc_nounwind] + pub fn simd_reinterpret(src: Src) -> Dst; + /// Elementwise negation of a vector. /// /// `T` must be a vector of integer or floating-point primitive types. @@ -500,7 +504,7 @@ extern "rust-intrinsic" { /// # Safety /// `mask` must only contain `0` and `!0`. #[rustc_nounwind] - pub fn simd_select(mask: M, if_true: T, if_false: T) -> T; + pub fn simd_select(mask: M, if_true: T, if_false: T) -> T; /// Select elements from a bitmask. ///