[PATCH] D98995: [CGAtomic] Lift stronger requirements on cmpxch and add support for acquire failure mode

Bruno Cardoso Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 17:31:52 PDT 2021


bruno created this revision.
bruno added reviewers: rjmccall, jfb, t.p.northover.
Herald added subscribers: hoy, modimo, wenlei, lxfind, jdoerfert, jkorous.
bruno requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

- Fix `emitAtomicCmpXchgFailureSet` to support release/acquire (succ/fail) memory order.
- Remove stronger checks for cmpxch.

This is motivated by https://github.com/google/sanitizers/issues/970, based on discussions in https://groups.google.com/g/thread-sanitizer/c/bTOVyLAo8p4/m/Y-2yks6ZLAAJ

A follow patch should attempt to implement the TSAN side of failure mode support.


https://reviews.llvm.org/D98995

Files:
  clang/lib/CodeGen/CGAtomic.cpp
  clang/test/CodeGen/atomic-ops.c
  llvm/docs/LangRef.rst

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98995.332036.patch
Type: text/x-patch
Size: 5142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210320/a906fcd0/attachment.bin>


More information about the llvm-commits mailing list