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/Reader/BitcodeReader.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/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 7be440a..47c79cdb 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1243,6 +1243,8 @@ static AtomicRMWInst::BinOp getDecodedRMWOperation(unsigned Val) { case bitc::RMW_UMIN: return AtomicRMWInst::UMin; case bitc::RMW_FADD: return AtomicRMWInst::FAdd; case bitc::RMW_FSUB: return AtomicRMWInst::FSub; + case bitc::RMW_FMAX: return AtomicRMWInst::FMax; + case bitc::RMW_FMIN: return AtomicRMWInst::FMin; } } |