[PATCH] D137361: IR: Add atomicrmw inc and dec

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 5 04:30:42 PDT 2022


foad added inline comments.


================
Comment at: llvm/docs/LangRef.rst:10524
+-  inc: ``*ptr = (old >= val) ? 0 : (*ptr + 1)``
+-  dec: ``*ptr = (*ptr == 0) || (*ptr > v)) ? val : (val - 1)``
 
----------------
nhaehnle wrote:
> jdoerfert wrote:
> > tra wrote:
> > > `v` -> `val` ?
> > Mark the comparisons as unsigned.
> Should be `*ptr - 1`
Parentheses are mismatched


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137361/new/

https://reviews.llvm.org/D137361



More information about the llvm-commits mailing list