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

Fix 7f17639803fdc73f9ab9bd60a315596ea8881af9 #38

Closed
wants to merge 4 commits into from

Conversation

Zentrik
Copy link
Member

@Zentrik Zentrik commented Nov 18, 2024

This should hopefully fix issues with 7f17639 (some context at llvm#101213 (comment)), at the very least Julia tests pass.
Feel free to do any git history rewriting you wish for.

alexey-bataev and others added 4 commits November 3, 2024 23:32
…omes before new vector value.

When trying to reuse extractelement instruction, need to check that it
is inserted into proper position. Its original vector operand should
come before new vector value, otherwise new extractelement instruction
must be generated.

Fixes llvm#101213

(cherry picked from commit f70f122)
Fix R_386_32 and other relocations by correcting Addend computations.

(cherry picked from commit 5716f83)
Originally opened as https://reviews.llvm.org/D129947

LLVM currently emits `mfence` for `__atomic_thread_fence(seq_cst)`. On
modern CPUs lock or is more efficient and provides the same sequential
consistency. GCC 11 made this switch as well (see https://gcc.gnu.org/pipermail/gcc-cvs/2020-July/314418.html)
and https://reviews.llvm.org/D61863 and https://reviews.llvm.org/D58632
moved into this direction as well, but didn't touch fence seq_cst.

Amusingly this came up elsewhere: https://www.reddit.com/r/cpp_questions/comments/16uer2g/how_do_i_stop_clang_generating_mfence/

After another 2 years it doesn't look like anyone complained about the
GCC switch. And there is still `__builtin_ia32_mfence` for folks who
want this precise instruction.

(cherry picked from commit 4d502dd)

(cherry picked from commit 707ca0e)
This should hopefully fix issues with 7f17639, at the very least Julia tests pass.
@giordano
Copy link

To understand, this could be squashed with 7f17639 because it "fixes" the backport?

@Zentrik
Copy link
Member Author

Zentrik commented Nov 18, 2024

Yes

@giordano
Copy link

Sorry, took me a bit longer than I wanted, but I finally squashed this PR with that commit, which is now df73ee6. Thanks for tracking this down!

@giordano giordano closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants