Split 16-byte SIMD store around GC struct fields into two 8-byte SIMD stores (x86...
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Tue, 15 Jun 2021 17:59:28 +0000 (10:59 -0700)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 17:59:28 +0000 (10:59 -0700)
commitddae375636ca6cdbdf781fcb748d4b160dbfcfc4
treec7b7271b1813ba36b641644a43b8d228fabaa9d9
parent56727d58ac649723e8807fea6f1882f8972e7ea1
Split 16-byte SIMD store around GC struct fields into two 8-byte SIMD stores (x86)/ two 8-byte mov-s (x64) (#53116)

Fixes #51638 by using

1) Constructing `ASG(OBJ(addr), 0)` for structs that have GC fields and keeping the current IR (i.e. `ASG(BLK(addr), 0)`) for other types. Such bookkeeping would allow the JIT to maintain information about the class layout.

2a) Emitting a sequence of `mov [m64],r64` instead of `movdqu [m128],xmm` when zeroing structs with GC fields that are not guaranteed to be on the stack on win-x64 or linux-x64.

2b) Emitting a sequence of `movq [m64],xmm` when zeroing such structs on win-x86.
src/coreclr/jit/codegenxarch.cpp
src/coreclr/jit/gentree.h
src/coreclr/jit/importer.cpp
src/coreclr/jit/lowerxarch.cpp
src/coreclr/jit/lsraxarch.cpp