@@ -6720,17 +6720,9 @@ bool AMDGPULegalizerInfo::legalizeImageIntrinsic(
67206720 // We are only processing the operands of d16 image operations on subtargets
67216721 // that use the unpacked register layout, or need to repack the TFE result.
67226722
6723- unsigned IntrOpcode = Intr->BaseOpcode ;
6724- // For image atomic: use no-return opcode if result is unused.
6725- if (Intr->AtomicNoRetBaseOpcode != Intr->BaseOpcode ) {
6726- const MachineRegisterInfo &MRI = MF.getRegInfo ();
6727- Register ResultDef = MI.getOperand (0 ).getReg ();
6728- if (MRI.use_nodbg_empty (ResultDef))
6729- IntrOpcode = Intr->AtomicNoRetBaseOpcode ;
6730- }
67316723 // TODO: Do we need to guard against already legalized intrinsics?
67326724 const AMDGPU::MIMGBaseOpcodeInfo *BaseOpcode =
6733- AMDGPU::getMIMGBaseOpcodeInfo (IntrOpcode );
6725+ AMDGPU::getMIMGBaseOpcodeInfo (Intr-> BaseOpcode );
67346726
67356727 MachineRegisterInfo *MRI = B.getMRI ();
67366728 const LLT S32 = LLT::scalar (32 );
@@ -6748,9 +6740,7 @@ bool AMDGPULegalizerInfo::legalizeImageIntrinsic(
67486740
67496741 const bool IsAtomicPacked16Bit =
67506742 (BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_F16 ||
6751- BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_F16_NORTN ||
6752- BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16 ||
6753- BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16_NORTN);
6743+ BaseOpcode->BaseOpcode == AMDGPU::IMAGE_ATOMIC_PK_ADD_BF16);
67546744
67556745 // Check for 16 bit addresses and pack if true.
67566746 LLT GradTy =
0 commit comments