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

JIT: ARM64 SVE format encodings, SVE_ID_2A to SVE_JH_2A #98015

Merged
merged 5 commits into from
Feb 8, 2024

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Feb 6, 2024

Contributes to #94549

Adds 4 formats

  • SVE_ID_2A
  • SVE_JG_2A
  • SVE_IE_2A
  • SVE_JH_2A

This one is pretty short.

Left: Capstone,
Right: Jit
image

@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 6, 2024
@ghost ghost assigned TIHan Feb 6, 2024
@ghost
Copy link

ghost commented Feb 6, 2024

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

Issue Details

Contributes to #94549

Adds 4 formats

  • SVE_ID_2A
  • SVE_JG_2A
  • SVE_IE_2A
  • SVE_JH_2A

This one is pretty short.

Left: Capstone,
Right: Jit
image

Author: TIHan
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@TIHan
Copy link
Contributor Author

TIHan commented Feb 6, 2024

@dotnet/jit-contrib @dotnet/arm64-contrib @a74nh @kunalspathak this is ready, and it's a short one.

@ryujit-bot
Copy link

Diff results for #98015

Throughput diffs

Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.01%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
libraries_tests.run.linux.arm64.Release.mch +0.01%
benchmarks.run.linux.arm64.checked.mch +0.01%
benchmarks.run_tiered.linux.arm64.checked.mch +0.01%
libraries.pmi.linux.arm64.checked.mch +0.01%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
realworld.run.linux.arm64.checked.mch +0.01%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
benchmarks.run_pgo.linux.arm64.checked.mch +0.01%
MinOpts (+0.01% to +0.02%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
libraries_tests.run.linux.arm64.Release.mch +0.02%
benchmarks.run.linux.arm64.checked.mch +0.02%
benchmarks.run_tiered.linux.arm64.checked.mch +0.02%
libraries.pmi.linux.arm64.checked.mch +0.02%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
realworld.run.linux.arm64.checked.mch +0.02%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
benchmarks.run_pgo.linux.arm64.checked.mch +0.02%
FullOpts (+0.01%)
Collection PDIFF
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
libraries_tests.run.linux.arm64.Release.mch +0.01%
benchmarks.run.linux.arm64.checked.mch +0.01%
benchmarks.run_tiered.linux.arm64.checked.mch +0.01%
libraries.pmi.linux.arm64.checked.mch +0.01%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
realworld.run.linux.arm64.checked.mch +0.01%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
benchmarks.run_pgo.linux.arm64.checked.mch +0.01%

Details here


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.

LGTM


// IF_SVE_IE_2A
theEmitter->emitIns_R_R_I(INS_sve_ldr, EA_SCALABLE, REG_V3, REG_R4, 0, INS_OPTS_NONE,
INS_SCALABLE_OPTS_UNPREDICATED); // LDR <Zt>, [<Xn|SP>{, #<imm>, MUL VL}]
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't exactly the right use of INS_SCALABLE_OPTS_UNPREDICATED. Currently it's used where a predicate isn't being used to mask the result. Whereas here, the predicate is being used as the result.

But, once register allocation is added, we can get rid of INS_SCALABLE_OPTS_UNPREDICATED.

Therefore, I'm happy with this change.

Copy link
Member

Choose a reason for hiding this comment

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

As per https://docsmirror.github.io/A64/2023-06/ldr_z_bi.html, this instruction is "unpredicated" and the use of INS_SCALABLE_OPTS_UNPREDICATED seems to be appropriate here, unless I am missing something.

@kunalspathak kunalspathak added the arm-sve Work related to arm64 SVE/SVE2 support label Feb 7, 2024
src/coreclr/jit/codegenarm64test.cpp Outdated Show resolved Hide resolved

// IF_SVE_IE_2A
theEmitter->emitIns_R_R_I(INS_sve_ldr, EA_SCALABLE, REG_V3, REG_R4, 0, INS_OPTS_NONE,
INS_SCALABLE_OPTS_UNPREDICATED); // LDR <Zt>, [<Xn|SP>{, #<imm>, MUL VL}]
Copy link
Member

Choose a reason for hiding this comment

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

As per https://docsmirror.github.io/A64/2023-06/ldr_z_bi.html, this instruction is "unpredicated" and the use of INS_SCALABLE_OPTS_UNPREDICATED seems to be appropriate here, unless I am missing something.

src/coreclr/jit/emitarm64.cpp Outdated Show resolved Hide resolved
@ghost ghost added needs-author-action An issue or pull request that requires more info or actions from the author. and removed needs-author-action An issue or pull request that requires more info or actions from the author. labels Feb 7, 2024
@TIHan
Copy link
Contributor Author

TIHan commented Feb 7, 2024

@kunalspathak this is ready again.

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM

@ryujit-bot
Copy link

Diff results for #98015

Throughput diffs

Throughput diffs for linux/arm64 ran on linux/x64

Overall (+0.01%)
Collection PDIFF
benchmarks.run_pgo.linux.arm64.checked.mch +0.01%
realworld.run.linux.arm64.checked.mch +0.01%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
benchmarks.run.linux.arm64.checked.mch +0.01%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
benchmarks.run_tiered.linux.arm64.checked.mch +0.01%
libraries_tests.run.linux.arm64.Release.mch +0.01%
libraries.pmi.linux.arm64.checked.mch +0.01%
MinOpts (+0.01% to +0.02%)
Collection PDIFF
benchmarks.run_pgo.linux.arm64.checked.mch +0.02%
realworld.run.linux.arm64.checked.mch +0.02%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
benchmarks.run.linux.arm64.checked.mch +0.02%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
benchmarks.run_tiered.linux.arm64.checked.mch +0.02%
libraries_tests.run.linux.arm64.Release.mch +0.02%
libraries.pmi.linux.arm64.checked.mch +0.02%
FullOpts (+0.01%)
Collection PDIFF
benchmarks.run_pgo.linux.arm64.checked.mch +0.01%
realworld.run.linux.arm64.checked.mch +0.01%
libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch +0.01%
smoke_tests.nativeaot.linux.arm64.checked.mch +0.01%
libraries.crossgen2.linux.arm64.checked.mch +0.01%
benchmarks.run.linux.arm64.checked.mch +0.01%
coreclr_tests.run.linux.arm64.checked.mch +0.01%
benchmarks.run_tiered.linux.arm64.checked.mch +0.01%
libraries_tests.run.linux.arm64.Release.mch +0.01%
libraries.pmi.linux.arm64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #98015

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch -0.01%

Details here


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI arm-sve Work related to arm64 SVE/SVE2 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants