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