Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Implement ARM32 atomic intrinsics - #97792

Closed
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked
Closed

Implement ARM32 atomic intrinsics#97792
MichalPetryka wants to merge 19 commits into
dotnet:mainfrom
MichalPetryka:arm-interlocked

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes#9982.

@ghostghost added 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 labels Jan 31, 2024
@ghost

Copy link
Copy Markdown

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

Issue Details

Implements Interlocked Exchange, Add and CompareExchange as "must expand" intrinsics on ARM32 for types equal to or smaller than pointer size.

Contributes to #86915.
Fixes #9982.

Author:MichalPetryka
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@filipnavara
filipnavara self-requested a review January 31, 2024 21:54
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-122,174 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,344
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-18,358
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,306
coreclr_tests.run.linux.arm.checked.mch321,631,208-10,726
libraries.crossgen2.linux.arm.checked.mch34,521,638-22
libraries.pmi.linux.arm.checked.mch49,769,404-7,214
libraries_tests.run.linux.arm.Release.mch243,597,272-52,352
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-29,380
realworld.run.linux.arm.checked.mch13,589,492-1,472
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-122,706 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,344
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-18,282
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,280
coreclr_tests.run.linux.arm.checked.mch109,153,620-11,140
libraries.crossgen2.linux.arm.checked.mch34,520,408-22
libraries.pmi.linux.arm.checked.mch49,663,180-7,214
libraries_tests.run.linux.arm.Release.mch122,628,140-52,572
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-29,380
realworld.run.linux.arm.checked.mch13,154,192-1,472

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.43% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.43%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch-0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,105 contexts (829,328 MinOpts, 1,408,777 FullOpts).

MISSED contexts: base: 71,274 (3.08%), diff: 72,559 (3.14%)

Overall (-141,104 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-1,954
benchmarks.run_pgo.linux.arm.checked.mch63,745,630-20,060
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-1,766
coreclr_tests.run.linux.arm.checked.mch321,631,208-13,896
libraries.crossgen2.linux.arm.checked.mch34,521,638-462
libraries.pmi.linux.arm.checked.mch49,769,404-8,650
libraries_tests.run.linux.arm.Release.mch243,597,272-61,452
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-31,006
realworld.run.linux.arm.checked.mch13,589,492-1,858
MinOpts (+532 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966-76
benchmarks.run_tiered.linux.arm.checked.mch8,653,000-26
coreclr_tests.run.linux.arm.checked.mch212,477,588+414
libraries_tests.run.linux.arm.Release.mch120,969,132+220
FullOpts (-141,636 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-1,954
benchmarks.run_pgo.linux.arm.checked.mch52,545,664-19,984
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-1,740
coreclr_tests.run.linux.arm.checked.mch109,153,620-14,310
libraries.crossgen2.linux.arm.checked.mch34,520,408-462
libraries.pmi.linux.arm.checked.mch49,663,180-8,650
libraries_tests.run.linux.arm.Release.mch122,628,140-61,672
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-31,006
realworld.run.linux.arm.checked.mch13,154,192-1,858

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.21%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.10%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.10%

Details here


@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

Just a heads up. The tests fail on device. I am looking into it with Michal to see if we can find the root cause.

@filipnavara

filipnavara commented Feb 1, 2024

Copy link
Copy Markdown
Member

1d24a02 fixed most of the failures, there's still incorrect sign extension of comparand instead of zero extension for 16-bit variant.

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.linux.arm64.checked.mch+0.01%

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.11%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


Comment threadsrc/coreclr/jit/importercalls.cpp Outdated
@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,237,693 contexts (829,328 MinOpts, 1,408,365 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-71,018 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,244,634-738
benchmarks.run_pgo.linux.arm.checked.mch63,699,020-14,426
benchmarks.run_tiered.linux.arm.checked.mch21,499,760-436
coreclr_tests.run.linux.arm.checked.mch321,580,944-6,798
libraries.crossgen2.linux.arm.checked.mch34,518,950+402
libraries.pmi.linux.arm.checked.mch49,747,738-2,996
libraries_tests.run.linux.arm.Release.mch243,491,778-42,144
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,144,284-3,184
realworld.run.linux.arm.checked.mch13,587,278-698
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,792 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,855,432-738
benchmarks.run_pgo.linux.arm.checked.mch52,499,054-14,826
benchmarks.run_tiered.linux.arm.checked.mch12,846,760-688
coreclr_tests.run.linux.arm.checked.mch109,103,356-7,580
libraries.crossgen2.linux.arm.checked.mch34,517,720+402
libraries.pmi.linux.arm.checked.mch49,641,514-2,996
libraries_tests.run.linux.arm.Release.mch122,522,646-43,484
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,073,548-3,184
realworld.run.linux.arm.checked.mch13,151,978-698

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch+0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (+0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97792

Assembly diffs

Assembly diffs for linux/arm ran on windows/x86

Diffs are based on 2,238,104 contexts (829,328 MinOpts, 1,408,776 FullOpts).

MISSED contexts: base: 71,275 (3.08%), diff: 72,560 (3.14%)

Overall (-70,778 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch15,250,208-792
benchmarks.run_pgo.linux.arm.checked.mch63,745,626-15,392
benchmarks.run_tiered.linux.arm.checked.mch21,504,686-512
coreclr_tests.run.linux.arm.checked.mch321,630,642-7,306
libraries.crossgen2.linux.arm.checked.mch34,521,638+546
libraries.pmi.linux.arm.checked.mch49,769,404-2,946
libraries_tests.run.linux.arm.Release.mch243,597,156-40,580
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch94,156,910-3,088
realworld.run.linux.arm.checked.mch13,589,492-708
MinOpts (+2,774 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm.checked.mch11,199,966+400
benchmarks.run_tiered.linux.arm.checked.mch8,653,000+252
coreclr_tests.run.linux.arm.checked.mch212,477,588+782
libraries_tests.run.linux.arm.Release.mch120,969,132+1,340
FullOpts (-73,552 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run.linux.arm.checked.mch14,861,006-792
benchmarks.run_pgo.linux.arm.checked.mch52,545,660-15,792
benchmarks.run_tiered.linux.arm.checked.mch12,851,686-764
coreclr_tests.run.linux.arm.checked.mch109,153,054-8,088
libraries.crossgen2.linux.arm.checked.mch34,520,408+546
libraries.pmi.linux.arm.checked.mch49,663,180-2,946
libraries_tests.run.linux.arm.Release.mch122,628,024-41,920
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch84,086,174-3,088
realworld.run.linux.arm.checked.mch13,154,192-708

Details here


Throughput diffs

Throughput diffs for linux/arm ran on windows/x86

Overall (-0.41% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.08%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.22%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.41%
realworld.run.linux.arm.checked.mch-0.09%
MinOpts (-0.10% to -0.06%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.08%
benchmarks.run_pgo.linux.arm.checked.mch-0.10%
benchmarks.run_tiered.linux.arm.checked.mch-0.10%
coreclr_tests.run.linux.arm.checked.mch-0.06%
libraries.crossgen2.linux.arm.checked.mch-0.06%
libraries.pmi.linux.arm.checked.mch-0.07%
libraries_tests.run.linux.arm.Release.mch-0.09%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.08%
realworld.run.linux.arm.checked.mch-0.10%
FullOpts (-0.42% to -0.04%)
CollectionPDIFF
benchmarks.run.linux.arm.checked.mch-0.13%
benchmarks.run_pgo.linux.arm.checked.mch-0.13%
benchmarks.run_tiered.linux.arm.checked.mch-0.12%
coreclr_tests.run.linux.arm.checked.mch-0.10%
libraries.crossgen2.linux.arm.checked.mch-0.04%
libraries.pmi.linux.arm.checked.mch-0.14%
libraries_tests.run.linux.arm.Release.mch-0.25%
libraries_tests_no_tiered_compilation.run.linux.arm.Release.mch-0.42%
realworld.run.linux.arm.checked.mch-0.09%

Details here


@filipnavara

Copy link
Copy Markdown
Member

Passes the tests on Raspberry Pi 5 now.

@filipnavarafilipnavara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's an unnecessary sign extension of the value parameter in CompareExchange (short):

0004e2c0 <System.Threading.Interlocked__CompareExchange_0>:
4e2c0: b508 push {r3, lr}
4e2c2: b20b sxth r3, r1
4e2c4: b212 sxth r2, r2
4e2c6: f3bf 8f5f dmb sy
4e2ca: e8d0 ef5f ldrexh lr, [r0]
4e2ce: fa0f fe8e sxth.w lr, lr
4e2d2: 4596 cmp lr, r2
4e2d4: d103 bne.n 4e2de <System.Threading.Interlocked__CompareExchange_0+0x1e>
4e2d6: e8c0 3f51 strexh r1, r3, [r0]
4e2da: 2900 cmp r1, #0
4e2dc: d1f5 bne.n 4e2ca <System.Threading.Interlocked__CompareExchange_0+0xa>
4e2de: f3bf 8f5f dmb sy
4e2e2: 4670 mov r0, lr
4e2e4: bd08 pop {r3, pc}

It's not really a correctness issue though. Otherwise, LGTM. Thanks!

@MichalPetryka

MichalPetryka commented May 29, 2024

Copy link
Copy Markdown
ContributorAuthor

Ping @MichalPetryka if you plan to work on the code review from kunalspathak.

I'll get back to working on my PRs again in June, currently I'm occupied with some other stuff.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 29, 2024
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@kunalspathak I've unified the ARM64 and ARM32 handling here, could you rereview?

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, it is ready to review again.

@JulieLeeMSFT
JulieLeeMSFT requested review from EgorBo and removed request for kunalspathakJuly 29, 2024 16:38
@JulieLeeMSFT

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

@AndyAyersMS

Copy link
Copy Markdown
Member

@MichalPetryka, we are short-staffed. Is it ok to merge this to .NET 10?

Yes, I think it is prudent to wait on this one, unless there's some key benefit to having this in .NET 9 that we're overlooking.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We don't have time to work on this for .NET 9, so we will review it in .NET 10.
If you believe this should be done in .NET 9, please ping me. We will reconsider.

@EgorBo

Copy link
Copy Markdown
Member

@MichalPetryka can you resolve the conflicts please?

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Sep 9, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@dotnet-policy-servicedotnet-policy-serviceBot removed this from the 10.0.0 milestone Oct 7, 2024
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Nov 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community memberneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] CQ: enable InterlockedCmpXchg32 intrinsic

10 participants

@MichalPetryka@ryujit-bot@filipnavara@BruceForstall@JulieLeeMSFT@AndyAyersMS@EgorBo@am11@kunalspathak@jkotas