[Mlir-commits] [llvm] [mlir] Add usub_cond and usub_sat operations to atomicrmw (PR #105568)
Matt Arsenault
llvmlistbot at llvm.org
Thu Sep 5 23:10:58 PDT 2024
================
@@ -751,8 +751,16 @@ class AtomicRMWInst : public Instruction {
/// *p = ((old == 0) || (old u> v)) ? v : (old - 1)
UDecWrap,
+ /// Subtract only if result would be positive.
+ /// *p = (old u>= v) ? old - v : old
+ USubCond,
+
+ /// Subtract with clamping of negative results to zero.
+ /// *p = (old u>= v) ? old - v : 0
----------------
arsenm wrote:
Comment in terms of the intrinsic? Also could update the phrasing to match langref
https://github.com/llvm/llvm-project/pull/105568
More information about the Mlir-commits
mailing list