-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Inefficient codegen with struct consisting of 2 SIMD vectors. #83749
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsDescriptionCoreCLR emits inefficient codegen when working with structs consisting of 2 SIMD vectors, for example custom structs with 2xVector128 or Vector512 on platforms without AVX512. If you compare the codegen for methods A and B in the reproduction, you can notice the JIT spilling the custom structs instead of promoting them. ConfigurationWindows x64 .Net 8 preview 2 Regression?Probably not, checked just stack spilling and it occurs on .Net 7
|
The problem is here: runtime/src/coreclr/jit/lclvars.cpp Lines 2252 to 2270 in e43ddbf
Since |
Description
CoreCLR emits inefficient codegen when working with structs consisting of 2 SIMD vectors, for example custom structs with 2xVector128 or Vector512 on platforms without AVX512.
If you compare the codegen for methods A and B in the reproduction, you can notice the JIT spilling the custom structs instead of promoting them in B. The goal here would be to have B emit the same codegen as A does.
If you look at Memmove there, you'll notice that the JIT does not spill them, but introduces a lot of redundant adds and leas in the codegen.
Reproduction
Configuration
Windows x64 .Net 8 preview 2
Regression?
Probably not, checked just stack spilling and it occurs on .Net 7
The text was updated successfully, but these errors were encountered: