Skip to content

Inefficient codegen with struct consisting of 2 SIMD vectors. #83749

@MichalPetryka

Description

@MichalPetryka

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

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions