[PATCH] D55562: Atomics: support min/max orthogonally
Tim Northover via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 11 09:20:25 PST 2018
t.p.northover created this revision.
t.p.northover added reviewers: delena, yaxunl.
Herald added subscribers: jfb, mcrosier.
We seem to have been gradually growing support for atomic min/max operations (exposing longstanding IR atomicrmw instructions). But until now there have been gaps in the expected intrinsics. This adds support for the C11-style intrinsics (i.e. taking _Atomic, rather than individually blessed by C11 standard), and the variants that return the new value instead of the original one.
That way, people won't be misled by trying one form and it not working, and the front-end is more friendly to people using _Atomic types, as we recommend.
Repository:
rC Clang
https://reviews.llvm.org/D55562
Files:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/Builtins.def
clang/lib/AST/Expr.cpp
clang/lib/CodeGen/CGAtomic.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/atomic-ops-libcall.c
clang/test/CodeGen/atomic-ops.c
clang/test/Sema/atomic-ops.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55562.177731.patch
Type: text/x-patch
Size: 17061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181211/0befe846/attachment.bin>
More information about the cfe-commits
mailing list