Omit Simd::cast during bootstrap

This commit is contained in:
Jubilee Young 2022-01-27 09:07:15 -08:00 committed by Jubilee
parent 7072c2278e
commit 03f6fbb21e
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ extern "platform-intrinsic" {
pub(crate) fn simd_cast<T, U>(x: T) -> U; pub(crate) fn simd_cast<T, U>(x: T) -> U;
/// follows Rust's `T as U` semantics, including saturating float casts /// follows Rust's `T as U` semantics, including saturating float casts
/// which amounts to the same as `simd_cast` for many cases /// which amounts to the same as `simd_cast` for many cases
#[cfg(not(bootstrap))]
pub(crate) fn simd_as<T, U>(x: T) -> U; pub(crate) fn simd_as<T, U>(x: T) -> U;
/// neg/fneg /// neg/fneg

View File

@ -100,6 +100,7 @@ where
/// ``` /// ```
#[must_use] #[must_use]
#[inline] #[inline]
#[cfg(not(bootstrap))]
pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> { pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
unsafe { intrinsics::simd_as(self) } unsafe { intrinsics::simd_as(self) }
} }