[PATCH] D16614: Use "long long int" when checking whether atomics are supported.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 05:25:28 PST 2016
> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> Of Vasileios Kalintiris via llvm-commits
> Sent: 27 January 2016 10:37
> To: Joerg Sonnenberger; llvm-commits at lists.llvm.org
> Subject: RE: [PATCH] D16614: Use "long long int" when checking whether
> atomics are supported.
> > Why is this relevant for LLVM? I would call using 64bit atomics on 32bit
> > architectures a bug waiting to happen.
> > Joerg
> Doesn't libatomic provide software implementation of atomic ops whose size
> isn't supported natively by using barriers, locks, etc.?
> - Vasileios
Just to add to this, it came up during the LLVM 3.8 testing since quite a few libcxx tests depend on 64-bit atomics. The compiler is using a builtin for <=32-bit atomics and an external library for the >=64-bit ones the architecture doesn't support directly.
More information about the llvm-commits