[clang] [OpenACC][CIR] Implement atomic update lowering (PR #164836)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 24 11:20:19 PDT 2025
================
@@ -353,6 +361,50 @@ CIRGenFunction::emitOpenACCAtomicConstruct(const OpenACCAtomicConstruct &s) {
s.clauses());
return mlir::success();
}
+ case OpenACCAtomicKind::None:
+ case OpenACCAtomicKind::Update: {
+ mlir::Value x = emitLValue(inf.X).getPointer();
+ auto op =
+ mlir::acc::AtomicUpdateOp::create(builder, start, x, /*ifCond=*/{});
+ emitOpenACCClauses(op, s.getDirectiveKind(), s.getDirectiveLoc(),
+ s.clauses());
+ mlir::LogicalResult res = mlir::success();
+ {
+ mlir::Type argTy = cast<cir::PointerType>(x.getType()).getPointee();
+ mlir::OpBuilder::InsertionGuard guardCase(builder);
----------------
erichkeane wrote:
Nope, good idea.
https://github.com/llvm/llvm-project/pull/164836
More information about the cfe-commits
mailing list