tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments.
================ Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5775-5802 +static void emitOMPAtomicCompareExpr(CodeGenFunction &CGF, + llvm::AtomicOrdering AO, const Expr *X, + const Expr *E, const Expr *D, + const Expr *CE, bool IsXLHSInRHSPart, + SourceLocation Loc) { + assert(X->isLValue() && "X of 'omp atomic compare' is not lvalue"); + assert(isa<BinaryOperator>(CE->IgnoreImpCasts()) && ---------------- ABataev wrote: > I would think about moving most of the atomic codegen functionality to common > runtime/OMPBuilder part to be able to override implementation for different > targets. It may help to avoid codegen problems with Nvidia/AMD GPUs. Not > directly related to this patch though. yeah, actually IIRC the `OMPIRBuilder` already supports atomic operations. Not sure if it supports the `compare` clause but I'll take a look. If not, I also think it's a better place to sit them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102449/new/ https://reviews.llvm.org/D102449 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits