Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<atomic>: Fix ARM64EC and CHPE codegen #4222

Merged

Conversation

StephanTLavavej
Copy link
Member

This mirrors @mcfi's MSVC-PR-511288 as of Iteration 10, fixing VSO-1918426 which tracks the following issues reported internally by Geoffrey Antos:

  1. std::atomic<T>::load() is still generating the original/slow ldr+barrier instructions and not the lda[p]r instructions intended by MSVC-PR-449792 / <atomic>: Improve ARM64 performance #3399.
  2. Neither overload of std::atomic<T>::load() appears to guarantee sequential consistency when requested for ARM64 CHPE builds.
  3. std::atomic_thread_fence() does not appear to guarantee the requested ordering for CHPE builds (other than for std::memory_order_seq_cst).
  4. (Performance) On CHPE builds, std::atomic<T>::exchange(), std::atomic<T>::compare_exchange_*() and std::atomic<T>::fetch_*() appear to force sequentially consistent behavior.

@StephanTLavavej StephanTLavavej added bug Something isn't working ARM64 Related to the ARM64 architecture labels Dec 1, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner December 1, 2023 00:54
@StephanTLavavej StephanTLavavej merged commit 8a8dda8 into microsoft:main Dec 1, 2023
37 checks passed
@StephanTLavavej StephanTLavavej deleted the dev/beniu/atomicfixes branch December 1, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM64 Related to the ARM64 architecture bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants