[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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user