enum AtomicRMWInst::BinOp
Description
This enumeration lists the possible modifications atomicrmw can make. In the descriptions, 'p' is the pointer to the instruction's memory location, 'old' is the initial value of *p, and 'v' is the other value passed to the instruction. These instructions always return 'old'.
Declared at: llvm/include/llvm/IR/Instructions.h:727
Enumerators
| Name | Value | Comment |
|---|---|---|
| Xchg | 0 | *p = v |
| Add | 1 | *p = old + v |
| Sub | 2 | *p = old - v |
| And | 3 | *p = old & v |
| Nand | 4 | *p = ~(old & v) |
| Or | 5 | *p = old | v |
| Xor | 6 | *p = old ^ v |
| Max | 7 | *p = old >signed v ? old : v |
| Min | 8 | *p = old <signed v ? old : v |
| UMax | 9 | *p = old >unsigned v ? old : v |
| UMin | 10 | *p = old <unsigned v ? old : v |
| FAdd | 11 | *p = old + v |
| FSub | 12 | *p = old - v |
| FMax | 13 | *p = maxnum(old, v)\p maxnum matches the behavior of \p llvm.maxnum.*. |
| FMin | 14 | *p = minnum(old, v)\p minnum matches the behavior of \p llvm.minnum.*. |
| FIRST_BINOP | 0 | *p = minnum(old, v)\p minnum matches the behavior of \p llvm.minnum.*. |
| LAST_BINOP | 14 | *p = minnum(old, v)\p minnum matches the behavior of \p llvm.minnum.*. |
| BAD_BINOP | 15 | *p = minnum(old, v)\p minnum matches the behavior of \p llvm.minnum.*. |