-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[arm64] JIT: Fix IsContainableImmed for arm64 v8.1 or higher #61035
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue Detailsstatic int Test(int x) => x + 1; Current codegen on M1-arm64 is mov w1, #1
add w0, w0, w1 As you can see, add w0, w0, #1 The issue is that we always return It's not the case for AltJit or <8.0 hardware so I can't get SPMI diffs but I expect them to be quite some big. cc @dotnet/jit-contrib
|
Codegen difff example, A few regressions due to loop alignment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great catch. Thank you!
Curious, what are the regressions? |
I don't have those diffs at the moment, when diffs are large it takes an hour to process them, but I am 100% sure those are loop alignment artifacts just like in #61045 (e.g. https://www.diffchecker.com/La4x8Sgz) |
Current codegen on Apple M1 is
As you can see,
#1
was not contained.Codegen with this PR:
The issue is that we always return
false
even for normal GT_AND/GT_SUB when Atomics ISA is available (>=8.1 which is pretty much any modern arm hardware) here.Diffs are huge 😮
coreclr_tests.pmi.Linux.arm64.checked.mch:
Detail diffs
libraries.crossgen2.Linux.arm64.checked.mch:
Detail diffs
libraries.pmi.Linux.arm64.checked.mch:
Detail diffs
libraries_tests.pmi.Linux.arm64.checked.mch:
Detail diffs
cc @dotnet/jit-contrib