Skip to content

Commit db2f64e

Browse files
committed
AMDGPU: Fix not handling atomicrmw fadd in exotic address spaces correctly
We try to interpret unknown address space numbers as aliases of global, but this wasn't applied here. Also improve test coverage for the buffer fat pointer address space.
1 parent 1460b49 commit db2f64e

File tree

2 files changed

+415
-1
lines changed

2 files changed

+415
-1
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16062,7 +16062,7 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
1606216062
if (HasSystemScope)
1606316063
return AtomicExpansionKind::CmpXChg;
1606416064

16065-
if ((AS == AMDGPUAS::GLOBAL_ADDRESS ||
16065+
if ((AMDGPU::isExtendedGlobalAddrSpace(AS) ||
1606616066
AS == AMDGPUAS::BUFFER_FAT_POINTER) &&
1606716067
Ty->isFloatTy()) {
1606816068
// global/buffer atomic fadd f32 no-rtn: gfx908, gfx90a, gfx940, gfx11+.

0 commit comments

Comments
 (0)