aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authoranjenner <161845516+anjenner@users.noreply.github.com>2024-09-06 16:19:20 +0100
committerGitHub <noreply@github.com>2024-09-06 16:19:20 +0100
commit4af249fe6e81abd137c95bc25f5060ae305134ca (patch)
tree3cac4128f1db8c7e5dacab690448d3f4e12178e6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent109cd11dc4aea6b3596f8b2cb5a719f35b190cfa (diff)
downloadllvm-4af249fe6e81abd137c95bc25f5060ae305134ca.zip
llvm-4af249fe6e81abd137c95bc25f5060ae305134ca.tar.gz
llvm-4af249fe6e81abd137c95bc25f5060ae305134ca.tar.bz2
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.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 26fd02b..bf2eea5 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -668,6 +668,10 @@ static unsigned getEncodedRMWOperation(AtomicRMWInst::BinOp Op) {
return bitc::RMW_UINC_WRAP;
case AtomicRMWInst::UDecWrap:
return bitc::RMW_UDEC_WRAP;
+ case AtomicRMWInst::USubCond:
+ return bitc::RMW_USUB_COND;
+ case AtomicRMWInst::USubSat:
+ return bitc::RMW_USUB_SAT;
}
}