Repository navigation
Fixing the new V512 logic to properly negate the mask checks - #89522
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-memory Issue DetailsThis resolves #89512
|
There was a problem hiding this comment.
The root issue for these was that the V128/V256 path was negating the mask. That is, doing effectively NegateIfNeeded(Equals(values, current)) != Zero. Which isn't the same as negating the EqualsAny.
Consider if Equals returned 00 FF 00 00 and so negating that becomes FF 00 FF FF (or vice versa). Neither of these compare equal to Zero and so both return true. While for 00 00 00 00, we get FF FF FF FF (or vice versa). One of these would compare equal to Zero and so would return false.
So, we need the concept of HasMatch where the DontNegate case can do EqualsAny (that is Equals(x, y) != Zero) and the Negate case can do !EqualsAll (that is ~Equals(x, y) != Zero)
This resolves #89512