efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/CodeGen/CGAtomic.cpp:949
     case AtomicExpr::AO__opencl_atomic_compare_exchange_strong:
     case AtomicExpr::AO__atomic_load_n:
     case AtomicExpr::AO__atomic_store_n:
----------------
rsmith wrote:
> efriedma wrote:
> > Is there any particular reason to expect that the pointer operand to 
> > __atomic_load_n can't be misaligned?  I mean, for most ABIs, integers are 
> > naturally aligned, but that isn't actually a hard rule.
> `__atomic_load_n` is, by definition, guaranteed to never call an unoptimized 
> atomic library function (see https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary). 
> [I think the purpose of the `..._n` variants is to provide builtins that 
> libatomic's unoptimized library functions can use and have a guarantee that 
> they will not be recursively re-entered.]
Oh, okay, makes sense.


Repository:
  rC Clang

https://reviews.llvm.org/D51817



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D51817: D... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D518... Eli Friedman via Phabricator via cfe-commits
    • [PATCH] D518... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D518... Eli Friedman via Phabricator via cfe-commits
    • [PATCH] D518... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D518... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to