Skip to content

JIT: Correct some AVX-512 instruction timings#126555

Closed
saucecontrol wants to merge 2 commits intodotnet:mainfrom
saucecontrol:perfchar
Closed

JIT: Correct some AVX-512 instruction timings#126555
saucecontrol wants to merge 2 commits intodotnet:mainfrom
saucecontrol:perfchar

Conversation

@saucecontrol
Copy link
Copy Markdown
Member

Verified using Skylake-X timings from uops.info

Copilot AI review requested due to automatic review settings April 5, 2026 00:40
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 5, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Apr 5, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CoreCLR JIT’s xarch perf-score model to better reflect Skylake-X (uops.info) throughput/latency for several AVX-512-related instructions, improving instruction cost estimation used by JIT heuristics.

Changes:

  • Adjusts latency selection logic for several SIMD move/convert/shift instructions to account for wider (YMM/ZMM) operation sizes.
  • Refines gather instruction throughput/latency modeling across 128/256/512-bit widths.
  • Adds a new latency constant (PERFSCORE_LATENCY_17C) for updated gather modeling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/jit/emitxarch.cpp Updates instruction throughput/latency modeling for specific SIMD and gather instructions based on operand size.
src/coreclr/jit/emit.h Adds PERFSCORE_LATENCY_17C used by updated timing model.

Comment thread src/coreclr/jit/emitxarch.cpp Outdated
Copy link
Copy Markdown
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly just ensuring that TYP_SIMD64 uses the appropriate timings, as many of these were entered prior to that existing and so were assigning the TYP_SIMD16 timings instead.

@saucecontrol
Copy link
Copy Markdown
Member Author

I think everything here was covered by #127109?

@tannergooding
Copy link
Copy Markdown
Member

Ah, possibly. I had thought this was already merged when I did my PR 😅

I do think there's some throughput info that's still "off" for SIMD32/SIMD64, namely for the rare cases the wider variant takes more cycles, but it should all be generally correct now.

@tannergooding
Copy link
Copy Markdown
Member

Looks like it was indeed all handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants