Skip to content

Commit 5736553

Browse files
committed
[AMDGPU] Remove legalizer info code.
1 parent 671c49f commit 5736553

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6725,17 +6725,9 @@ bool AMDGPULegalizerInfo::legalizeImageIntrinsic(
67256725
// We are only processing the operands of d16 image operations on subtargets
67266726
// that use the unpacked register layout, or need to repack the TFE result.
67276727

6728-
unsigned IntrOpcode = Intr->BaseOpcode;
6729-
// For image atomic: use no-return opcode if result is unused.
6730-
if (Intr->AtomicNoRetBaseOpcode != Intr->BaseOpcode) {
6731-
const MachineRegisterInfo &MRI = MF.getRegInfo();
6732-
Register ResultDef = MI.getOperand(0).getReg();
6733-
if (MRI.use_nodbg_empty(ResultDef))
6734-
IntrOpcode = Intr->AtomicNoRetBaseOpcode;
6735-
}
67366728
// TODO: Do we need to guard against already legalized intrinsics?
67376729
const AMDGPU::MIMGBaseOpcodeInfo *BaseOpcode =
6738-
AMDGPU::getMIMGBaseOpcodeInfo(IntrOpcode);
6730+
AMDGPU::getMIMGBaseOpcodeInfo(Intr->BaseOpcode);
67396731

67406732
MachineRegisterInfo *MRI = B.getMRI();
67416733
const LLT S32 = LLT::scalar(32);
@@ -6753,9 +6745,7 @@ bool AMDGPULegalizerInfo::legalizeImageIntrinsic(
67536745

67546746
const bool IsAtomicPacked16Bit =
67556747
(BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_F16 ||
6756-
BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_F16_NORTN ||
6757-
BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16 ||
6758-
BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16_NORTN);
6748+
BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16);
67596749

67606750
// Check for 16 bit addresses and pack if true.
67616751
LLT GradTy =

0 commit comments

Comments
 (0)