[Mlir-commits] [mlir] [mlir][OpenACC][OpenMP] Modify atomic capture to allow update/write (PR #167963)

Erich Keane llvmlistbot at llvm.org
Mon Nov 17 09:34:19 PST 2025


erichkeane wrote:

> > it appears that atomic captured update (page 495) also requires this form
> 
> In OpenMP a `capture` is a `read` operation (capturing the value of the atomic variable in a non-atomic variable). Hence, atomic update can only contain a combination of {update, write} and read (in any order).
> 
> There is no atomic operation in OpenMP that would allow two writes to the atomic variable.
> 
> With that in mind, if OpenACC allows it, the MLIR verifier should allow it as well.

I think it is supposed to be an update + read in the cases I was concerned about in OpenACC as well, so once Razvan confirms I'll likely close this PR without merging.

https://github.com/llvm/llvm-project/pull/167963


More information about the Mlir-commits mailing list