summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-22 03:32:36 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-22 03:32:36 +0000
commitbfdba5e4fc351d3de15d5536a1d4e04a16573ddf (patch)
tree0d1dff23cf739d81409b302850eea4d890fd16b9 /llvm/lib/Target/RISCV/RISCVISelLowering.cpp
parent1eaa04d682d684f7e83c263aa40e78ae8faab378 (diff)
downloadbcm5719-llvm-bfdba5e4fc351d3de15d5536a1d4e04a16573ddf.tar.gz
bcm5719-llvm-bfdba5e4fc351d3de15d5536a1d4e04a16573ddf.zip
IR: Add fp operations to atomicrmw
Add just fadd/fsub for now. llvm-svn: 351778
Diffstat (limited to 'llvm/lib/Target/RISCV/RISCVISelLowering.cpp')
-rw-r--r--llvm/lib/Target/RISCV/RISCVISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 8a32d957ec5..f70ffaab0c1 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1823,6 +1823,9 @@ Value *RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(
TargetLowering::AtomicExpansionKind
RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(
AtomicCmpXchgInst *CI) const {
+ if (CI->isFloatingPointOperation())
+ return AtomicExpansionKind::CmpXChg;
+
unsigned Size = CI->getCompareOperand()->getType()->getPrimitiveSizeInBits();
if (Size == 8 || Size == 16)
return AtomicExpansionKind::MaskedIntrinsic;
OpenPOWER on IntegriCloud