[PATCH] D86510: [compiler-rt] Fix atomic support functions on 32-bit architectures
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 14:01:17 PDT 2020
efriedma added a comment.
In D86510#2240266 <https://reviews.llvm.org/D86510#2240266>, @efriedma wrote:
>> Therefore, this approach should be safe? And the optimization that checks the alignment and uses the atomic instructions instead of locks in the aligned case could be added later?
>
> The way the code with this patch checks for "lock-free" assumes the pointer argument is aligned the same way an a pointer to a uintN_t would be. That isn't correct in general.
Oh, wait, is the pointer argument here actually a void*? __atomic_always_lock_free will never succeed in that case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86510/new/
https://reviews.llvm.org/D86510
More information about the llvm-commits
mailing list