diff --git a/crates/core_simd/src/intrinsics.rs b/crates/core_simd/src/intrinsics.rs index a1de8474fb2..6047890a093 100644 --- a/crates/core_simd/src/intrinsics.rs +++ b/crates/core_simd/src/intrinsics.rs @@ -62,7 +62,6 @@ pub(crate) fn simd_xor(x: T, y: T) -> T; /// getelementptr (without inbounds) - #[cfg(not(bootstrap))] pub(crate) fn simd_arith_offset(ptrs: T, offsets: U) -> T; /// fptoui/fptosi/uitofp/sitofp diff --git a/crates/core_simd/src/vector/ptr.rs b/crates/core_simd/src/vector/ptr.rs index 68a9c67f795..fa756344db9 100644 --- a/crates/core_simd/src/vector/ptr.rs +++ b/crates/core_simd/src/vector/ptr.rs @@ -1,9 +1,6 @@ //! Private implementation details of public gather/scatter APIs. -#[cfg(not(bootstrap))] use crate::simd::intrinsics; use crate::simd::{LaneCount, Simd, SupportedLaneCount}; -#[cfg(bootstrap)] -use core::mem; /// A vector of *const T. #[derive(Debug, Copy, Clone)] @@ -24,14 +21,6 @@ pub fn splat(ptr: *const T) -> Self { #[inline] #[must_use] pub fn wrapping_add(self, addend: Simd) -> Self { - #[cfg(bootstrap)] - // Safety: converting pointers to usize and vice-versa is safe - // (even if using that pointer is not) - unsafe { - let x: Simd = mem::transmute_copy(&self); - mem::transmute_copy(&{ x + (addend * Simd::splat(mem::size_of::())) }) - } - #[cfg(not(bootstrap))] // Safety: this intrinsic doesn't have a precondition unsafe { intrinsics::simd_arith_offset(self, addend) } } @@ -56,14 +45,6 @@ pub fn splat(ptr: *mut T) -> Self { #[inline] #[must_use] pub fn wrapping_add(self, addend: Simd) -> Self { - #[cfg(bootstrap)] - // Safety: converting pointers to usize and vice-versa is safe - // (even if using that pointer is not) - unsafe { - let x: Simd = mem::transmute_copy(&self); - mem::transmute_copy(&{ x + (addend * Simd::splat(mem::size_of::())) }) - } - #[cfg(not(bootstrap))] // Safety: this intrinsic doesn't have a precondition unsafe { intrinsics::simd_arith_offset(self, addend) } }