[Diffusion] rL244063: Add missing atomic libcall support.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 11:18:02 PST 2015


rsmith added a subscriber: rsmith.
rsmith raised a concern with this commit.

/cfe/trunk/lib/CodeGen/CGAtomic.cpp:941-943 According to the GCC documentation for libatomic:

> for i = __atomic_add_fetch (ptr, j, model) the code generated will be
>
>        tmp = __atomic_fetch_add (ptr, j, model);
>        i = tmp + j;

We shouldn't be using an undocumented part of GCC's libatomic here -- GCC doesn't use these functions, and compiler-rt's atomic.c does not provide them.

Users:
  jyknight (Author, Auditor)
  3.7-release (Auditor)
  cfe-commits (Auditor)
  tstellarAMD (Auditor)
  compnerd (Auditor)
  majnemer (Auditor)
  rsmith (Auditor)

http://reviews.llvm.org/rL244063





More information about the cfe-commits mailing list