[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

Elena Demikhovsky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 3 05:48:37 PDT 2018


delena created this revision.
delena added reviewers: igorb, t.p.northover, ABataev, jfb, rjmccall.
Herald added subscribers: cfe-commits, Anastasia.

Added __atomic_fetch_min, max, umin, umax intrinsics to clang.
These intrinsics work exactly as all other __atomic_fetch_* intrinsics and allow to create *atomicrmw* with ordering.
The similar set __sync_fetch_and_min* sets the sequentially-consistent  ordering.

We use them for OpenCL 1.2, which supports atomic operations with "relaxed" ordering.


Repository:
  rC Clang

https://reviews.llvm.org/D46386

Files:
  include/clang/Basic/Builtins.def
  lib/AST/Expr.cpp
  lib/CodeGen/CGAtomic.cpp
  lib/Sema/SemaChecking.cpp
  test/Sema/atomic-ops.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46386.145006.patch
Type: text/x-patch
Size: 7639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180503/bf3c95e7/attachment-0001.bin>


More information about the cfe-commits mailing list