From 4af249fe6e81abd137c95bc25f5060ae305134ca Mon Sep 17 00:00:00 2001 From: anjenner <161845516+anjenner@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:19:20 +0100 Subject: Add usub_cond and usub_sat operations to atomicrmw (#105568) These both perform conditional subtraction, returning the minuend and zero respectively, if the difference is negative. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 1cd9ec6..f887c9b 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1349,6 +1349,10 @@ static AtomicRMWInst::BinOp getDecodedRMWOperation(unsigned Val) { return AtomicRMWInst::UIncWrap; case bitc::RMW_UDEC_WRAP: return AtomicRMWInst::UDecWrap; + case bitc::RMW_USUB_COND: + return AtomicRMWInst::USubCond; + case bitc::RMW_USUB_SAT: + return AtomicRMWInst::USubSat; } } -- cgit v1.1