Skip to content

Commit f79911d

Browse files
committed
[AMDGPU] Support double type in atomic optimizer.
1 parent 55a02d1 commit f79911d

File tree

7 files changed

+19513
-110
lines changed

7 files changed

+19513
-110
lines changed

llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,9 @@ void AMDGPUAtomicOptimizerImpl::visitAtomicRMWInst(AtomicRMWInst &I) {
209209
break;
210210
}
211211

212-
// Only 32-bit floating point atomic ops are supported.
213-
if (AtomicRMWInst::isFPOperation(Op) && !I.getType()->isFloatTy()) {
212+
// Only 32 and 64 bit floating point atomic ops are supported.
213+
if (AtomicRMWInst::isFPOperation(Op) &&
214+
!(I.getType()->isFloatTy() || I.getType()->isDoubleTy())) {
214215
return;
215216
}
216217

llvm/test/CodeGen/AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll

Lines changed: 223 additions & 51 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll

Lines changed: 213 additions & 57 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fadd.ll

Lines changed: 5578 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmax.ll

Lines changed: 3960 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll

Lines changed: 3960 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fsub.ll

Lines changed: 5576 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)