This commit is contained in:
Miha Zupan 2025-07-30 15:57:13 +02:00 committed by GitHub
commit a912b7c2c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -211,7 +211,7 @@ namespace System.Buffers
// On X86, characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[CompExactlyDependsOn(typeof(Sse2))]
[CompExactlyDependsOn(typeof(AdvSimd))]
[CompExactlyDependsOn(typeof(AdvSimd.Arm64))]
public static Vector128<byte> LoadAndPack16AsciiChars(ref char source)
{
Vector128<ushort> source0 = Vector128.LoadUnsafe(ref source);
@ -221,9 +221,9 @@ namespace System.Buffers
{
return Sse2.PackUnsignedSaturate(source0.AsInt16(), source1.AsInt16());
}
else if (AdvSimd.IsSupported)
else if (AdvSimd.Arm64.IsSupported)
{
return AdvSimd.ExtractNarrowingSaturateUpper(AdvSimd.ExtractNarrowingSaturateLower(source0), source1);
return AdvSimd.Arm64.UnzipEven(source0.AsByte(), source1.AsByte());
}
else
{