@@ -347,7 +347,7 @@ public static bool Equals<TValueLength>(ref char matchStart, ref readonly Single
347347 // See comments on SingleStringSearchValuesPackedThreeChars.CanSkipAnchorMatchVerification.
348348 // When running on Arm64, this helper is also used to confirm vectorized anchor matches.
349349 // We do so because we're using UnzipEven when packing inputs, which may produce false positive anchor matches.
350- Debug . Assert ( ( matchStart & 0xFF ) == state . Value [ 0 ] ) ;
350+ Debug . Assert ( TransformInput ( ( char ) ( matchStart & 0xFF ) ) == state . Value [ 0 ] ) ;
351351
352352 uint differentBits = ( Unsafe . ReadUnaligned < uint > ( ref matchByteStart ) & CaseMask ) - state . Value32_0 ;
353353 differentBits |= ( Unsafe . ReadUnaligned < uint > ( ref Unsafe . Add ( ref matchByteStart , state . SecondReadByteOffset ) ) & CaseMask ) - state . Value32_1 ;
@@ -359,7 +359,7 @@ public static bool Equals<TValueLength>(ref char matchStart, ref readonly Single
359359 // It's only used as part of the scalar search loop, which always checks that the first character matches before calling this helper.
360360 // We know that the candidate is 2 or 3 characters long, and that the first character has already been checked.
361361 // We only have to to check whether the last 2 characters also match.
362- Debug . Assert ( matchStart == state . Value [ 0 ] , "This should only be called after the first character has been checked" ) ;
362+ Debug . Assert ( TransformInput ( matchStart ) == state . Value [ 0 ] , "This should only be called after the first character has been checked" ) ;
363363
364364 return ( Unsafe . ReadUnaligned < uint > ( ref Unsafe . Add ( ref matchByteStart , state . SecondReadByteOffset ) ) & CaseMask ) == state . Value32_1 ;
365365 }
@@ -429,7 +429,6 @@ public static bool Equals<TValueLength>(ref char matchStart, ref readonly Single
429429 else
430430 {
431431 Debug . Assert ( state . Value . Length is 2 or 3 ) ;
432- Debug . Assert ( ( matchStart & ~ 0x20 ) == ( state . Value [ 0 ] & ~ 0x20 ) ) ;
433432
434433 ref byte matchByteStart = ref Unsafe . As < char , byte > ( ref matchStart ) ;
435434 uint differentBits = ( Unsafe . ReadUnaligned < uint > ( ref matchByteStart ) & state . ToUpperMask32_0 ) - state . Value32_0 ;
0 commit comments