diff options
author | anjenner <161845516+anjenner@users.noreply.github.com> | 2024-09-06 16:19:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 16:19:20 +0100 |
commit | 4af249fe6e81abd137c95bc25f5060ae305134ca (patch) | |
tree | 3cac4128f1db8c7e5dacab690448d3f4e12178e6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 109cd11dc4aea6b3596f8b2cb5a719f35b190cfa (diff) | |
download | llvm-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.cpp | 4 |
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; } } |