Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ccmp logic into emitter backend. #112153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anthonycanino
Copy link
Contributor

Overview


This PR adds APX new ccmp instruction to the X86 backend.

Design

For reference, there is a unique extended evex encoding for ccmp:

image

where SC0 - SC3 encode the condition for ccmp to conditionally execute on (please see SDM Vol 1, Appendix B). If the status codes fail to satisfy the condition encoded by SC0 - SC3, no compare will be performed, and the OF, SF, ZF, and CF flags will be set to the default flag value (DFV) fields of, sf, zf and cf.

Testing

Note: The testing plan for APX work has been discussed in #106557, please refer to that PR for details, only results and comments will be posted in this PR. Results

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 4, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 4, 2025
@anthonycanino
Copy link
Contributor Author

1. Emitter unit tests

The left is output from JitDisasm, and right from JitLateDisasm.

image
image

2. Intel SDE testing

Test run with SDE:

base

3. SuperPMI results

Diffs are based on 2,623,457 contexts (1,043,127 MinOpts, 1,580,330 FullOpts).

MISSED contexts: 2,983 (0.11%)

Base JIT options: JitBypassApxCheck=1

Diff JIT options: JitBypassApxCheck=1

No diffs found.

Details

Context information

Collection Diffed contexts MinOpts FullOpts Missed, base Missed, diff
aspnet.run.windows.x64.checked.mch 126,540 63,098 63,442 2,665 (2.06%) 2,665 (2.06%)
benchmarks.run.windows.x64.checked.mch 28,757 4 28,753 0 (0.00%) 0 (0.00%)
benchmarks.run_pgo.windows.x64.checked.mch 105,618 52,679 52,939 0 (0.00%) 0 (0.00%)
benchmarks.run_tiered.windows.x64.checked.mch 55,912 38,403 17,509 0 (0.00%) 0 (0.00%)
coreclr_tests.run.windows.x64.checked.mch 582,221 349,625 232,596 0 (0.00%) 0 (0.00%)
libraries.crossgen2.windows.x64.checked.mch 280,377 16 280,361 0 (0.00%) 0 (0.00%)
libraries.pmi.windows.x64.checked.mch 295,086 6 295,080 0 (0.00%) 0 (0.00%)
libraries_tests.run.windows.x64.Release.mch 751,895 517,237 234,658 0 (0.00%) 0 (0.00%)
libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch 342,818 22,045 320,773 0 (0.00%) 0 (0.00%)
realworld.run.windows.x64.checked.mch 24,824 2 24,822 0 (0.00%) 0 (0.00%)
smoke_tests.nativeaot.windows.x64.checked.mch 29,409 12 29,397 318 (1.07%) 318 (1.07%)
2,623,457 1,043,127 1,580,330 2,983 (0.11%) 2,983 (0.11%)

Copy link
Contributor

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

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.

1 participant