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/CodeGen/AtomicExpandPass.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/CodeGen/AtomicExpandPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AtomicExpandPass.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp index 5ce6fbb..ad9dc51 100644 --- a/llvm/lib/CodeGen/AtomicExpandPass.cpp +++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp @@ -1646,6 +1646,8 @@ static ArrayRef<RTLIB::Libcall> GetRMWLibcall(AtomicRMWInst::BinOp Op) { case AtomicRMWInst::Min: case AtomicRMWInst::UMax: case AtomicRMWInst::UMin: + case AtomicRMWInst::FMax: + case AtomicRMWInst::FMin: case AtomicRMWInst::FAdd: case AtomicRMWInst::FSub: // No atomic libcalls are available for max/min/umax/umin. |