Skip to content

Commit 4964b7c

Browse files
committed
Update comments.
1 parent 53e48a1 commit 4964b7c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: llvm/include/llvm/IR/Instructions.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,12 @@ class AtomicRMWInst : public Instruction {
751751
/// *p = ((old == 0) || (old u> v)) ? v : (old - 1)
752752
UDecWrap,
753753

754-
/// Subtract only if result would be positive.
754+
/// Subtract only if no unsigned overflow.
755755
/// *p = (old u>= v) ? old - v : old
756756
USubCond,
757757

758-
/// Subtract with clamping of negative results to zero.
759-
/// *p = (old u>= v) ? old - v : 0
758+
/// *p = usub.sat(old, v)
759+
/// \p usub.sat matches the behavior of \p llvm.usub.sat.*.
760760
USubSat,
761761

762762
FIRST_BINOP = Xchg,

Diff for: llvm/lib/CodeGen/AtomicExpandPass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ static ArrayRef<RTLIB::Libcall> GetRMWLibcall(AtomicRMWInst::BinOp Op) {
18071807
case AtomicRMWInst::UDecWrap:
18081808
case AtomicRMWInst::USubCond:
18091809
case AtomicRMWInst::USubSat:
1810-
// No atomic libcalls are available for max/min/umax/umin.
1810+
// No atomic libcalls are available for these.
18111811
return {};
18121812
}
18131813
llvm_unreachable("Unexpected AtomicRMW operation.");

0 commit comments

Comments
 (0)