You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inefficient codegen with struct consisting of 2 SIMD vectors. #83749
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.
Activity
jakobbotsch commentedon Mar 30, 2023
The problem is here:
runtime/src/coreclr/jit/lclvars.cpp
Lines 2252 to 2270 in e43ddbf
Since
Buses no SIMD intrinsics the JIT assumes the fields ofVector2x128are not SIMD types and we end up skipping promotion due to that.