]> git.lizzy.rs Git - rust.git/commitdiff
Finish bumping stage0
authorMark Rousskov <mark.simulacrum@gmail.com>
Fri, 20 May 2022 12:54:10 +0000 (08:54 -0400)
committerJubilee <46493976+workingjubilee@users.noreply.github.com>
Tue, 19 Jul 2022 23:37:34 +0000 (16:37 -0700)
It looks like the last time had left some remaining cfg's -- which made me think
that the stage0 bump was actually successful. This brings us to a released 1.62
beta though.

crates/core_simd/src/intrinsics.rs
crates/core_simd/src/vector/ptr.rs

index a1de8474fb20167d885e20161cab6467455fbe4d..6047890a09393a9ed990807f6c45981e7baebb98 100644 (file)
@@ -62,7 +62,6 @@
     pub(crate) fn simd_xor<T>(x: T, y: T) -> T;
 
     /// getelementptr (without inbounds)
-    #[cfg(not(bootstrap))]
     pub(crate) fn simd_arith_offset<T, U>(ptrs: T, offsets: U) -> T;
 
     /// fptoui/fptosi/uitofp/sitofp
index 68a9c67f795af984749230c2934564cee15bfe16..fa756344db91ae3d57b1096848849fe957e18345 100644 (file)
@@ -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<usize, LANES>) -> Self {
-        #[cfg(bootstrap)]
-        // Safety: converting pointers to usize and vice-versa is safe
-        // (even if using that pointer is not)
-        unsafe {
-            let x: Simd<usize, LANES> = mem::transmute_copy(&self);
-            mem::transmute_copy(&{ x + (addend * Simd::splat(mem::size_of::<T>())) })
-        }
-        #[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<usize, LANES>) -> Self {
-        #[cfg(bootstrap)]
-        // Safety: converting pointers to usize and vice-versa is safe
-        // (even if using that pointer is not)
-        unsafe {
-            let x: Simd<usize, LANES> = mem::transmute_copy(&self);
-            mem::transmute_copy(&{ x + (addend * Simd::splat(mem::size_of::<T>())) })
-        }
-        #[cfg(not(bootstrap))]
         // Safety: this intrinsic doesn't have a precondition
         unsafe { intrinsics::simd_arith_offset(self, addend) }
     }