Disable JIT xarch asserts on gcref/byref computation (#56192)
authorBruce Forstall <brucefo@microsoft.com>
Fri, 23 Jul 2021 05:36:51 +0000 (22:36 -0700)
committerGitHub <noreply@github.com>
Fri, 23 Jul 2021 05:36:51 +0000 (22:36 -0700)
commitd148c34bdfbd49e3d820eaa4dcbc47832d52d0d2
treed3aff123a421e66fc508b20894d4f3c3867e8b2e
parentaa0cf93324f7faa5216d08fc8a76a3819f958ead
Disable JIT xarch asserts on gcref/byref computation (#56192)

The emitter has asserts that an xarch RMW inc/dec/add/sub of a byref
must have an incoming gcref/byref to be legal. This is (no longer)
true due to extensive use of Span and Unsafe constructs, where we
often see lclheap or other integer typed values cast to byref. Also,
the emitter only updates its GC info when an instruction is generated.
When one of these casts from integer to byref ends up getting the same
register allocated, and its instruction is thus omitted, the emitter
doesn't get the appropriate gcref update (this problem is being
attempted to be solved elsewhere).

For now, disable these asserts.

Re-enable the tests disabled in #54207

Fixes #51728, #54007
src/coreclr/jit/emitxarch.cpp
src/libraries/System.IO.Hashing/tests/Crc32Tests.cs
src/libraries/System.IO.Hashing/tests/Crc64Tests.cs
src/libraries/System.IO.Hashing/tests/XxHash32Tests.007.cs
src/libraries/System.IO.Hashing/tests/XxHash32Tests.cs
src/libraries/System.IO.Hashing/tests/XxHash32Tests.f00d.cs
src/libraries/System.IO.Hashing/tests/XxHash64Tests.007.cs
src/libraries/System.IO.Hashing/tests/XxHash64Tests.cs
src/libraries/System.IO.Hashing/tests/XxHash64Tests.f00d.cs