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

Work around llvm 12's memory ordering restrictions. #98385

Merged
merged 1 commit into from
Jun 26, 2022

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jun 22, 2022

Older llvm has the pre-C++17 restriction on success and failure memory ordering, requiring the former to be at least as strong as the latter. So, for llvm 12, this upgrades the success ordering to a stronger one if necessary.

See #68464

Older llvm has the pre-C++17 restriction on success and failure memory
ordering, requiring the former to be at least as strong as the latter.
So, for llvm 12, this upgrades the success ordering to a stronger one if
necessary.
@m-ou-se m-ou-se added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 22, 2022
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2022
@m-ou-se m-ou-se added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-intrinsics Area: Intrinsics labels Jun 22, 2022
@tmiasko
Copy link
Contributor

tmiasko commented Jun 22, 2022

Could you add a codegen test using new intrinsics when they land?

@petrochenkov
Copy link
Contributor

@bors r+

Assuming #98385 (comment) applies to #98383 rather than to this PR.

@bors
Copy link
Contributor

bors commented Jun 22, 2022

📌 Commit 9033576 has been approved by petrochenkov

@bors
Copy link
Contributor

bors commented Jun 22, 2022

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 26, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#98371 (Fix printing `impl trait` under binders)
 - rust-lang#98385 (Work around llvm 12's memory ordering restrictions.)
 - rust-lang#98474 (x.py: Support systems with only `python3` not `python`)
 - rust-lang#98488 (Bump RLS to latest master on rust-lang/rls)
 - rust-lang#98491 (Fix backtrace UI test when panic=abort is used)
 - rust-lang#98502 (Fix source sidebar hover in ayu theme)
 - rust-lang#98509 (diagnostics: consider parameter count when suggesting smart pointers)
 - rust-lang#98513 (Fix LLVM rebuild with download-ci-llvm.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7c39776 into rust-lang:master Jun 26, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jun 26, 2022
@m-ou-se m-ou-se deleted the llvm-12-memory-order branch June 27, 2022 20:28
tmiasko added a commit to tmiasko/rust that referenced this pull request Jul 20, 2022
* Add a test for atomic operations introduced in rust-lang#97423 & rust-lang#98383.
* Add a test for fallback code generation strategy used on LLVM 12
  introduced in rust-lang#98385. Use a separate test case instead of a revision
  system since test will be gone once LLVM 12 is no longer supported.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2022
Test codegen of atomic compare-exchange with additional memory orderings

* Add a test for atomic operations introduced in rust-lang#97423 & rust-lang#98383.
* Add a test for fallback code generation strategy used on LLVM 12 introduced in rust-lang#98385. Use a separate test case instead of a revision system since test will be gone once LLVM 12 is no longer supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intrinsics Area: Intrinsics A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants