Skip to content

Remove emitter unit tests which are not supported and add MoveScalar … #115952

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 4 commits into from
Jun 4, 2025

Conversation

khushal1996
Copy link
Member

@khushal1996 khushal1996 commented May 23, 2025

Instruction format which are supported in JIT -->
image

Emitter unit tests which are failing -->

    theEmitter->emitIns_Mov(INS_movq, EA_8BYTE, REG_R16, REG_XMM0, false);
    theEmitter->emitIns_Mov(INS_movq, EA_8BYTE, REG_R16, REG_XMM16, false);

These tests fail since following is not supported in JIT
image

@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 May 23, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 23, 2025
Copy link
Contributor

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

@khushal1996 khushal1996 marked this pull request as ready for review May 27, 2025 01:31
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 01:31
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 removes emitter unit tests that invoke unsupported instructions and adds new MoveScalar and StoreScalar tests for vector operations on 64‐bit integers.

  • Removed failing emitter unit tests that use INS_movq with 8-byte operations.
  • Added new tests for MoveScalar (SimpleUnOpTest.template) and StoreScalar (StoreUnOpTest.template) for Int64 and UInt64 types.

Reviewed Changes

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

File Description
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs Added new MoveScalar and StoreScalar test cases to verify vector operations on 64-bit integers.
src/coreclr/jit/codegenxarch.cpp Removed two emitter calls using INS_movq that are unsupported in JIT.
Comments suppressed due to low confidence (2)

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

  • The test validation 'result[0] != result[0]' will always evaluate to false. Please update it to a meaningful check that verifies the correctness of the MoveScalar operation.
 ("SimpleUnOpTest.template",         new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MoveScalar",                               ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",  ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ... ["ValidateFirstResult"] = "result[0] != result[0]", ... })

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

  • The test validation 'result[0] != result[0]' is ineffective as a check and will always fail. Consider replacing it with a proper assertion that verifies the expected outcome of the MoveScalar operation.
 ("SimpleUnOpTest.template",         new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MoveScalar",                               ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ... ["ValidateFirstResult"] = "result[0] != result[0]", ... })

@khushal1996
Copy link
Member Author

@dotnet/intel for review.

@tannergooding tannergooding merged commit 6fa4227 into dotnet:main Jun 4, 2025
115 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.

2 participants