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

[RyuJIT] Implement Interlocked.And and Interlocked.Or for arm64-v8.1 #46253

Merged
merged 14 commits into from
Feb 10, 2021

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Dec 19, 2020

Implements #32239 for Arm64-v8.1 (and newer)

For reference: https://godbolt.org/z/hn6cfE

public static long XAnd64(ref long a, long b) => Interlocked.And(ref a, b);
public static void XAnd64_noret(ref long a, long b) => Interlocked.And(ref a, b);

public static long XOr64(ref long a, long b) => Interlocked.Or(ref a, b);
public static void XOr64_noret(ref long a, long b) => Interlocked.Or(ref a, b);

Current codegen: https://gist.github.com/EgorBo/d8a643cd67e7347c7744183f9e2b9cff
New codegen: https://gist.github.com/EgorBo/4f10fa524996b4821f38189ad8424524 (redundant dmb is handled in #45970)

Tested locally on a Mac Mini M1.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 19, 2020
@EgorBo EgorBo marked this pull request as ready for review December 20, 2020 17:28
@EgorBo
Copy link
Member Author

EgorBo commented Dec 20, 2020

/azp list

@AndyAyersMS
Copy link
Member

cc @echesakovMSFT

Copy link
Contributor

@echesakov echesakov left a comment

Choose a reason for hiding this comment

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

Overall, changes look good. Left some questions and minor feedback on test project files.

src/coreclr/jit/gtlist.h Outdated Show resolved Hide resolved
@echesakov echesakov mentioned this pull request Jan 28, 2021
29 tasks
Copy link
Contributor

@echesakov echesakov left a comment

Choose a reason for hiding this comment

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

Looks Good

@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Feb 8, 2021
@EgorBo EgorBo merged commit af25fe6 into dotnet:master Feb 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Consider making Interlocked.And and friends into JIT intrinsics
5 participants