Skip to content

Commit

Permalink
Omit Simd::cast during bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jan 27, 2022
1 parent 7072c22 commit 03f6fbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/core_simd/src/intrinsics.rs
Expand Up @@ -41,6 +41,7 @@ extern "platform-intrinsic" {
pub(crate) fn simd_cast<T, U>(x: T) -> U;
/// follows Rust's `T as U` semantics, including saturating float casts
/// which amounts to the same as `simd_cast` for many cases
#[cfg(not(bootstrap))]
pub(crate) fn simd_as<T, U>(x: T) -> U;

/// neg/fneg
Expand Down
1 change: 1 addition & 0 deletions crates/core_simd/src/vector.rs
Expand Up @@ -100,6 +100,7 @@ where
/// ```
#[must_use]
#[inline]
#[cfg(not(bootstrap))]
pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
unsafe { intrinsics::simd_as(self) }
}
Expand Down

0 comments on commit 03f6fbb

Please sign in to comment.