Skip to content

[APX] Make sure KMOV is not encoded in EVEX when JitStressEvexEncoding is set. #113854

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

Ruihan-Yin
Copy link
Member

Fix #113814

KMOV instructions will be able to be encoded in EVEX on APX enabled machine to address EGPRs, but on Avx512 machine, they can only be encoded in VEX.

we should ensure KMOV has the right prefix under different cases, essentially in the bug, we are stressing original EVEX encoding by JitStressEvexEncoding. So KMOV should not be impacted and stay VEX-encoded.

@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 Mar 24, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 24, 2025
@Ruihan-Yin
Copy link
Member Author

All failures look related to some timeout issue, I presume this is not related to my changes. PR is ready for review.

@Ruihan-Yin Ruihan-Yin marked this pull request as ready for review March 24, 2025 23:15
{
// KMOV should not be encoded in EVEX when stressing EVEX, as they are supposed to encded in EVEX only
// when APX is available, only stressing EVEX is not enough making the encoding valid.
return false;
Copy link
Member Author

Choose a reason for hiding this comment

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

Or we can return UsePromotedEVEXEncoding() here. Make sure KMOV can be stressed when APX is available.

@Ruihan-Yin
Copy link
Member Author

Hi @BruceForstall, please also review this bug fix, thanks!

@BruceForstall
Copy link
Member

/azp run runtime-coreclr jitstress-isas-avx512

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BruceForstall
Copy link
Member

/ba-g unrelated azurelinux3 timeouts

@BruceForstall BruceForstall merged commit 251e6be into dotnet:main Mar 27, 2025
116 of 118 checks passed
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.

Test failure: profiler/elt/slowpatheltenter/slowpatheltenter.cmd
2 participants