[llvm] [RISCV] Support isel for Zacas for 2*XLen types. (PR #77814)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 09:29:44 PST 2024


jyknight wrote:

The intent is that linking together code with differing max atomic widths should not cause ABI incompatibility, under the assumption that libatomic always knows how to use lock-free atomics for a given size if _any_ code linked against it might do so. Which effectively implies that it must know about all microarchitecture levels the compiler knows how to build, and potentially dynamically dispatch to the right implementation. 

This ensures that one TU using a libcall, and another using a native operation will work.

However, we don't yet implement a compliant libatomic in LLVM, though @Logikable is going to work on that. GCC libatomic does do this.

https://github.com/llvm/llvm-project/pull/77814


More information about the llvm-commits mailing list