diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs index 94ed44928d28ee..0cad8c6e045460 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs @@ -694,8 +694,7 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri static bool ISimdVector, T>.AnyMatches(Vector128 vector) { - uint mask = vector.ExtractMostSignificantBits(); - return (mask != 0); + return (vector != Vector128.Zero); } static int ISimdVector, T>.IndexOfLastMatch(Vector128 vector) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs index 8e7850f267d4b1..d840f756d4eaaf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs @@ -684,8 +684,7 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri static bool ISimdVector, T>.AnyMatches(Vector256 vector) { - uint mask = vector.ExtractMostSignificantBits(); - return (mask != 0); + return (vector != Vector256.Zero); } static int ISimdVector, T>.IndexOfLastMatch(Vector256 vector) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs index 062c4bd2ecbe0f..83aa03d328763f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs @@ -684,8 +684,7 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri static bool ISimdVector, T>.AnyMatches(Vector512 vector) { - ulong mask = vector.ExtractMostSignificantBits(); - return (mask != 0); + return (vector != Vector512.Zero); } static int ISimdVector, T>.IndexOfLastMatch(Vector512 vector) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs index 2334bab1035b21..7525a16fad5820 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs @@ -759,8 +759,7 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri static bool ISimdVector, T>.AnyMatches(Vector64 vector) { - uint mask = vector.ExtractMostSignificantBits(); - return (mask != 0); + return (vector != Vector64.Zero); } static int ISimdVector, T>.IndexOfLastMatch(Vector64 vector) diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs index 937d4de9f85369..ffd230918c36d9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs @@ -2204,7 +2204,7 @@ private static unsafe bool HasMatch(TVectorByte vector) { return VectorContainsNonAsciiChar((Vector128)(object)vector); } - return TVectorByte.AnyMatches(vector); + return ((vector & TVectorByte.Create((byte)0b1000_0000)) != TVectorByte.Zero); }