diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs index 8fb3436cf3cf8..7ceaa7b57d173 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs @@ -106,11 +106,7 @@ public static Vector128 As(this Vector128 vector) ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); -#if MONO - return Unsafe.As, Vector128>(ref vector); -#else return Unsafe.BitCast, Vector128>(vector); -#endif } /// Reinterprets a as a new . @@ -174,27 +170,13 @@ public static Vector128 As(this Vector128 vector) /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - internal static Plane AsPlane(this Vector128 value) - { -#if MONO - return Unsafe.As, Plane>(ref value); -#else - return Unsafe.BitCast, Plane>(value); -#endif - } + internal static Plane AsPlane(this Vector128 value) => Unsafe.BitCast, Plane>(value); /// Reinterprets a as a new . /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - internal static Quaternion AsQuaternion(this Vector128 value) - { -#if MONO - return Unsafe.As, Quaternion>(ref value); -#else - return Unsafe.BitCast, Quaternion>(value); -#endif - } + internal static Quaternion AsQuaternion(this Vector128 value) => Unsafe.BitCast, Quaternion>(value); /// Reinterprets a as a new . /// The type of the elements in the vector. @@ -244,27 +226,13 @@ internal static Quaternion AsQuaternion(this Vector128 value) /// The plane to reinterpret. /// reinterpreted as a new . [Intrinsic] - internal static Vector128 AsVector128(this Plane value) - { -#if MONO - return Unsafe.As>(ref value); -#else - return Unsafe.BitCast>(value); -#endif - } + internal static Vector128 AsVector128(this Plane value) => Unsafe.BitCast>(value); /// Reinterprets a as a new . /// The quaternion to reinterpret. /// reinterpreted as a new . [Intrinsic] - internal static Vector128 AsVector128(this Quaternion value) - { -#if MONO - return Unsafe.As>(ref value); -#else - return Unsafe.BitCast>(value); -#endif - } + internal static Vector128 AsVector128(this Quaternion value) => Unsafe.BitCast>(value); /// Reinterprets a as a new with the new elements zeroed. /// The vector to reinterpret. @@ -282,14 +250,7 @@ internal static Vector128 AsVector128(this Quaternion value) /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - public static Vector128 AsVector128(this Vector4 value) - { -#if MONO - return Unsafe.As>(ref value); -#else - return Unsafe.BitCast>(value); -#endif - } + public static Vector128 AsVector128(this Vector4 value) => Unsafe.BitCast>(value); /// Reinterprets a as a new . /// The type of the elements in the vector. @@ -361,14 +322,7 @@ public static Vector3 AsVector3(this Vector128 value) /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - public static Vector4 AsVector4(this Vector128 value) - { -#if MONO - return Unsafe.As, Vector4>(ref value); -#else - return Unsafe.BitCast, Vector4>(value); -#endif - } + public static Vector4 AsVector4(this Vector128 value) => Unsafe.BitCast, Vector4>(value); /// Reinterprets a as a new . /// The type of the elements in the vector.