diff options
author | Shilei Tian <i@tianshilei.me> | 2022-07-06 10:57:24 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2022-07-06 10:57:53 -0400 |
commit | 1023ddaf779015a991cc02d4e61fb29efb767327 (patch) | |
tree | 802ef9fa2455ffc3b10254ebe1dcdaf7713e0c99 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | f8e026457e5100a9144b5864d17e8c8b3ae7cd24 (diff) | |
download | llvm-1023ddaf779015a991cc02d4e61fb29efb767327.zip llvm-1023ddaf779015a991cc02d4e61fb29efb767327.tar.gz llvm-1023ddaf779015a991cc02d4e61fb29efb767327.tar.bz2 |
[LLVM] Add the support for fmax and fmin in atomicrmw instruction
This patch adds the support for `fmax` and `fmin` operations in `atomicrmw`
instruction. For now (at least in this patch), the instruction will be expanded
to CAS loop. There are already a couple of targets supporting the feature. I'll
create another patch(es) to enable them accordingly.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D127041
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index fa798a4..c4ef8b5 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -577,6 +577,8 @@ static unsigned getEncodedRMWOperation(AtomicRMWInst::BinOp Op) { case AtomicRMWInst::UMin: return bitc::RMW_UMIN; case AtomicRMWInst::FAdd: return bitc::RMW_FADD; case AtomicRMWInst::FSub: return bitc::RMW_FSUB; + case AtomicRMWInst::FMax: return bitc::RMW_FMAX; + case AtomicRMWInst::FMin: return bitc::RMW_FMIN; } } |