Skip to content

JIT: Fix ARM64 emitter tests #117768

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

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

Conversation

amanasifkhalid
Copy link
Member

Follow-up to discussion in #117660. This disables tests for unsupported encodings, and fixes a few incorrect branches in the SVE emitter. cc @dotnet/arm64-contrib

@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 15:48
@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 Jul 17, 2025
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 disables unit tests for unsupported SVE encodings and corrects incorrect branch conditions in the ARM64 SVE emitter.

  • Wrap unsupported encoding tests in codegenarm64test.cpp with ALL_ARM64_EMITTER_UNIT_TESTS_SVE_UNSUPPORTED guards.
  • Fix conditional checks in emitarm64sve.cpp to use INS_OPTS_SCALABLE_S and INS_OPTS_SCALABLE_D in the correct branches.

Reviewed Changes

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

File Description
src/coreclr/jit/emitarm64sve.cpp Corrected conditional checks for INS_OPTS_SCALABLE_S/_D in SVE emitter format logic
src/coreclr/jit/codegenarm64test.cpp Wrapped unsupported SVE encoding tests in #ifdef ALL_ARM64_EMITTER_UNIT_TESTS_SVE_UNSUPPORTED

@@ -4685,11 +4685,13 @@ void CodeGen::genArm64EmitterUnitTestsSve()
theEmitter->emitIns_R_R_R(INS_sve_urshlr, EA_SCALABLE, REG_V15, REG_P2, REG_V20,
INS_OPTS_SCALABLE_D); // URSHLR <Zdn>.<T>, <Pg>/M, <Zdn>.<T>, <Zm>.<T>

#ifdef ALL_ARM64_EMITTER_UNIT_TESTS_SVE_UNSUPPORTED
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider grouping the multiple unsupported encoding test blocks under a single #ifdef ALL_ARM64_EMITTER_UNIT_TESTS_SVE_UNSUPPORTED region to improve readability and reduce repetitive macro guards.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

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

@amanasifkhalid
Copy link
Member Author

@dotnet/jit-contrib PTAL, thanks

Copy link
Contributor

@a74nh a74nh left a comment

Choose a reason for hiding this comment

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

This LGTM. Revert of a recent change plus some fixups.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants