[PATCH] D98995: [CGAtomic] Lift stronger requirements on cmpxch and add support for acquire failure mode
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 11:18:34 PDT 2021
yln added inline comments.
================
Comment at: clang/lib/CodeGen/CGAtomic.cpp:444-447
+ // Prior to c++17, "the failure argument shall be no stronger than the
+ // success argument". This condition has been lifted and the only
+ // precondition is 31.7.2.18. Effectively treat this as a DR and skip
+ // language version checks.
----------------
yln wrote:
> Should the following assert in `AtomicCmpXchgInst::Init()` have been changed as well?
> ```
> assert(!isStrongerThan(FailureOrdering, SuccessOrdering) &&
> "AtomicCmpXchg failure argument shall be no stronger than the success "
> "argument");
> ```
> https://github.com/llvm/llvm-project/blob/dad5caa59e6b2bde8d6cf5b64a972c393c526c82/llvm/lib/IR/Instructions.cpp#L1561
>
> I am observing a crash on an internal code base most likely caused by this.
//friendly ping// @bruno
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98995/new/
https://reviews.llvm.org/D98995
More information about the llvm-commits
mailing list