diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/TeddyHelper.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/TeddyHelper.cs index c2e190026c0c4..b7e84dac0980e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/TeddyHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/TeddyHelper.cs @@ -196,10 +196,7 @@ private static (Vector128 Low, Vector128 High) GetNibbles(Vector128< ? input : input & Vector128.Create((byte)0xF); - // X86 doesn't have a logical right shift intrinsic for bytes: https://github.com/dotnet/runtime/issues/82564 - Vector128 high = AdvSimd.IsSupported - ? AdvSimd.ShiftRightLogical(input, 4) - : (input.AsInt32() >>> 4).AsByte() & Vector128.Create((byte)0xF); + Vector128 high = input >>> 4; return (low, high); } @@ -211,8 +208,7 @@ private static (Vector256 Low, Vector256 High) GetNibbles(Vector256< // of doing an implicit 'AND 0xF' in order to skip the redundant AND. Vector256 low = input; - // X86 doesn't have a logical right shift intrinsic for bytes: https://github.com/dotnet/runtime/issues/82564 - Vector256 high = (input.AsInt32() >>> 4).AsByte() & Vector256.Create((byte)0xF); + Vector256 high = input >>> 4; return (low, high); } @@ -224,8 +220,7 @@ private static (Vector512 Low, Vector512 High) GetNibbles(Vector512< // of doing an implicit 'AND 0xF' in order to skip the redundant AND. Vector512 low = input; - // X86 doesn't have a logical right shift intrinsic for bytes: https://github.com/dotnet/runtime/issues/82564 - Vector512 high = (input.AsInt32() >>> 4).AsByte() & Vector512.Create((byte)0xF); + Vector512 high = input >>> 4; return (low, high); }