Revisit the handling of SIMD types during crossgen #10152
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
design-discussion
Ongoing discussion about design without consensus
tenet-performance
Performance related issue
Milestone
See the comments on PR dotnet/coreclr#17543.
During crossgen, the JIT sets
featureSIMD
to false but continues to generate code for calls to fixed-size SIMD types. While this is correct, it means that any use of these types in crossgen'd code is quite inefficient.On x86/x64 this may have some actual benefit due to the fact that we don't know whether the JIT'd code that is generated at runtime will use AVX or SSE encodings. However, this is somewhat inconsistent, as we generate SSE encodings for other operations.
On Arm64, a change was made (#14633) to enable SIMD during crossgen. However, the importing of static field helpers is not calling
impNormStructType()
which led to #9799. Adding a call toimpNormStructType()
here: https://github.com/dotnet/coreclr/blob/master/src/jit/importer.cpp#L13570 whenlclType == TYP_STRUCT
seemed to fix that issue.We should consider whether to add support for fixed- or known- size SIMD types during crossgen, across architectures.
category:cq
theme:vector-codegen
skill-level:intermediate
cost:small
impact:medium
The text was updated successfully, but these errors were encountered: