Performance regression on .NET 9.0 when creating AVX constants inside loops via System.Numerics.Vector #110125
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
tenet-performance
Performance related issue
Description
There is a significant performance regression in the .NET 9 JIT with
System.Numerics.Vector
whenVector
constants are created inline. Run the following benchmark to reproduce. The issue occurs at FullOpts, regardless of whether Tiered compilation or PGO is enabled (according to Disasmo)Regression?
This is a regression from .NET 8.0
Data
Analysis
Looking at the x86 in Dasmo reveals the issue.
On .NET 8 the constant is loaded into
ymm0
fromreloc @RWD00
outside the loopOn .NET 9 the constant is created on the stack inside the loop:
Manually moving the constant outside the loop works around the issue in .NET 9
The text was updated successfully, but these errors were encountered: