- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
128bit atomic support on non-Intel machines #18706
Comments
For power8, the right solution should be using the instructions directly since that seems to be what GCC does. For ARM, the solution is to not use atomic intrinsics and use the libatomic generic call directly. The |
So to summarize, if LLVM and GCC emit different code for the atomic, then LLVM needs to be fixed (unless it's a GCC bug). After that, we need to follow what clang does.
The only changes that we need to do are
|
For PPC https://reviews.llvm.org/rGb9c3941cd61d landed in LLVM 13 |
On non-intel machines (or machines that don't have the
cx16
feature) llvm issues call to the__sync*
libcalls. See the recent discussion in #14818, #18701 and #16066 (comment)Possible solutions
1; Use compiler-rt and revert llvm-mirror/compiler-rt@fa3eee4
2; Resolve
__sync
tojl__sync
in jitlayers and provide implementations inlibjulia
. I started doing this in https://github.com/JuliaLang/julia/tree/vc/int128_atomics, but it is a horrible hack3; Fix llvm upstream to call into libatomic. https://llvm.org/bugs/show_bug.cgi?id=30471
The text was updated successfully, but these errors were encountered: