Skip to content

Add VMOVD VMOVW APIs in JIT #115068

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 5 commits into from
May 2, 2025
Merged

Conversation

khushal1996
Copy link
Member

@khushal1996 khushal1996 commented Apr 25, 2025

This PR add the MoveScalar and StoreScalar APIs. With this, all instructions for Avx10.2 are now enabled in JIT.
API Issue #113090

Testing

Note1: Emitter unit tests not ran since they are added and verified along with AVX10.2 PR #111209

Encoding Correctness


No "Decode Failure" found in the superpmi log with Avx10.2 coredistools.

Superpmi run asmdiffs


image

Run JIT subtree with AVXVNNIINT* enabled / disabled


Avx10.2 Enabled (SDE)
image

Avx10.2 disabled
image

@ghost
Copy link

ghost commented Apr 25, 2025

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

1 similar comment
@ghost
Copy link

ghost commented Apr 25, 2025

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 25, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

@khushal1996
Copy link
Member Author

@dotnet/intel

@khushal1996 khushal1996 marked this pull request as ready for review April 26, 2025 21:26
@Copilot Copilot AI review requested due to automatic review settings April 26, 2025 21:26
Copy link
Contributor

@Copilot 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 adds support for the VMOVD and VMOVW instructions by introducing the MoveScalar and StoreScalar APIs for AVX10v2 in the JIT. Key updates include:

  • New MoveScalar and StoreScalar API definitions in the intrinsic reference and implementation.
  • Updates to the hardware intrinsic list to include the new MoveScalar and StoreScalar operations.
  • Addition of test templates for the new APIs in the JIT hardware intrinsics tests.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tests/JIT/HardwareIntrinsics/X86_Avx10v2/Avx10v2SampleTest.cs Added a sample test using MoveScalar API to confirm support when Avx10v2 is enabled.
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs Added test templates for MoveScalar and StoreScalar APIs to validate behavior.
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs Declared new MoveScalar and StoreScalar APIs.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx10v2.cs Implemented new MoveScalar and StoreScalar APIs (as JIT intrinsic stubs).
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx10v2.PlatformNotSupported.cs Provided PlatformNotSupported implementations for the new APIs.
src/coreclr/jit/hwintrinsiclistxarch.h Updated intrinsic list with entries for MoveScalar and StoreScalar.
Comments suppressed due to low confidence (2)

src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs:1820

  • The validation expression in the MoveScalar test template is trivially false. Consider providing a meaningful check that compares the processed scalar value to the expected result.
"ValidateFirstResult": "result[0] != result[0]"

src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs:1896

  • The validation expression in the StoreScalar test template does not effectively verify that the store operation was successful; consider updating it to explicitly compare the stored value with the expected source value.
"ValidateFirstResult": "value[0] != result[0]"

@tannergooding tannergooding merged commit 0654416 into dotnet:main May 2, 2025
155 of 157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.Intrinsics community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants