@@ -622,12 +622,13 @@ AMDGPUAsmPrinter::getAmdhsaKernelDescriptor(const MachineFunction &MF,
622622
623623 int64_t PGRM_Rsrc3 = 1 ;
624624 bool EvaluatableRsrc3 =
625- CurrentProgramInfo.ComputePGMRSrc3GFX90A ->evaluateAsAbsolute (PGRM_Rsrc3);
625+ CurrentProgramInfo.ComputePGMRSrc3 ->evaluateAsAbsolute (PGRM_Rsrc3);
626626 (void )PGRM_Rsrc3;
627627 (void )EvaluatableRsrc3;
628- assert (STM.hasGFX90AInsts () || !EvaluatableRsrc3 ||
628+ assert (STM.getGeneration () >= AMDGPUSubtarget::GFX10 ||
629+ STM.hasGFX90AInsts () || !EvaluatableRsrc3 ||
629630 static_cast <uint64_t >(PGRM_Rsrc3) == 0 );
630- KernelDescriptor.compute_pgm_rsrc3 = CurrentProgramInfo.ComputePGMRSrc3GFX90A ;
631+ KernelDescriptor.compute_pgm_rsrc3 = CurrentProgramInfo.ComputePGMRSrc3 ;
631632
632633 KernelDescriptor.kernarg_preload = MCConstantExpr::create (
633634 AMDGPU::hasKernargPreload (STM) ? Info->getNumKernargPreloadedSGPRs () : 0 ,
@@ -822,22 +823,22 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
822823 false );
823824
824825 [[maybe_unused]] int64_t PGMRSrc3;
825- assert (STM.hasGFX90AInsts () ||
826- (CurrentProgramInfo. ComputePGMRSrc3GFX90A -> evaluateAsAbsolute (
827- PGMRSrc3) &&
826+ assert (STM.getGeneration () >= AMDGPUSubtarget::GFX10 ||
827+ STM. hasGFX90AInsts () ||
828+ (CurrentProgramInfo. ComputePGMRSrc3 -> evaluateAsAbsolute ( PGMRSrc3) &&
828829 static_cast <uint64_t >(PGMRSrc3) == 0 ));
829830 if (STM.hasGFX90AInsts ()) {
830831 OutStreamer->emitRawComment (
831832 " COMPUTE_PGM_RSRC3_GFX90A:ACCUM_OFFSET: " +
832833 getMCExprStr (MCKernelDescriptor::bits_get (
833- CurrentProgramInfo.ComputePGMRSrc3GFX90A ,
834+ CurrentProgramInfo.ComputePGMRSrc3 ,
834835 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET_SHIFT,
835836 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET, Ctx)),
836837 false );
837838 OutStreamer->emitRawComment (
838839 " COMPUTE_PGM_RSRC3_GFX90A:TG_SPLIT: " +
839840 getMCExprStr (MCKernelDescriptor::bits_get (
840- CurrentProgramInfo.ComputePGMRSrc3GFX90A ,
841+ CurrentProgramInfo.ComputePGMRSrc3 ,
841842 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT_SHIFT,
842843 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT, Ctx)),
843844 false );
@@ -1241,12 +1242,12 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
12411242 return Dst;
12421243 };
12431244
1244- ProgInfo.ComputePGMRSrc3GFX90A =
1245- SetBits (ProgInfo.ComputePGMRSrc3GFX90A , ProgInfo.AccumOffset ,
1245+ ProgInfo.ComputePGMRSrc3 =
1246+ SetBits (ProgInfo.ComputePGMRSrc3 , ProgInfo.AccumOffset ,
12461247 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET,
12471248 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET_SHIFT);
1248- ProgInfo.ComputePGMRSrc3GFX90A =
1249- SetBits (ProgInfo.ComputePGMRSrc3GFX90A , CreateExpr (ProgInfo.TgSplit ),
1249+ ProgInfo.ComputePGMRSrc3 =
1250+ SetBits (ProgInfo.ComputePGMRSrc3 , CreateExpr (ProgInfo.TgSplit ),
12501251 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT,
12511252 amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT_SHIFT);
12521253 }
0 commit comments