@@ -622,12 +622,13 @@ AMDGPUAsmPrinter::getAmdhsaKernelDescriptor(const MachineFunction &MF,
622
622
623
623
int64_t PGRM_Rsrc3 = 1 ;
624
624
bool EvaluatableRsrc3 =
625
- CurrentProgramInfo.ComputePGMRSrc3GFX90A ->evaluateAsAbsolute (PGRM_Rsrc3);
625
+ CurrentProgramInfo.ComputePGMRSrc3 ->evaluateAsAbsolute (PGRM_Rsrc3);
626
626
(void )PGRM_Rsrc3;
627
627
(void )EvaluatableRsrc3;
628
- assert (STM.hasGFX90AInsts () || !EvaluatableRsrc3 ||
628
+ assert (STM.getGeneration () >= AMDGPUSubtarget::GFX10 ||
629
+ STM.hasGFX90AInsts () || !EvaluatableRsrc3 ||
629
630
static_cast <uint64_t >(PGRM_Rsrc3) == 0 );
630
- KernelDescriptor.compute_pgm_rsrc3 = CurrentProgramInfo.ComputePGMRSrc3GFX90A ;
631
+ KernelDescriptor.compute_pgm_rsrc3 = CurrentProgramInfo.ComputePGMRSrc3 ;
631
632
632
633
KernelDescriptor.kernarg_preload = MCConstantExpr::create (
633
634
AMDGPU::hasKernargPreload (STM) ? Info->getNumKernargPreloadedSGPRs () : 0 ,
@@ -822,22 +823,22 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
822
823
false );
823
824
824
825
[[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) &&
828
829
static_cast <uint64_t >(PGMRSrc3) == 0 ));
829
830
if (STM.hasGFX90AInsts ()) {
830
831
OutStreamer->emitRawComment (
831
832
" COMPUTE_PGM_RSRC3_GFX90A:ACCUM_OFFSET: " +
832
833
getMCExprStr (MCKernelDescriptor::bits_get (
833
- CurrentProgramInfo.ComputePGMRSrc3GFX90A ,
834
+ CurrentProgramInfo.ComputePGMRSrc3 ,
834
835
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET_SHIFT,
835
836
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET, Ctx)),
836
837
false );
837
838
OutStreamer->emitRawComment (
838
839
" COMPUTE_PGM_RSRC3_GFX90A:TG_SPLIT: " +
839
840
getMCExprStr (MCKernelDescriptor::bits_get (
840
- CurrentProgramInfo.ComputePGMRSrc3GFX90A ,
841
+ CurrentProgramInfo.ComputePGMRSrc3 ,
841
842
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT_SHIFT,
842
843
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT, Ctx)),
843
844
false );
@@ -1241,12 +1242,12 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
1241
1242
return Dst;
1242
1243
};
1243
1244
1244
- ProgInfo.ComputePGMRSrc3GFX90A =
1245
- SetBits (ProgInfo.ComputePGMRSrc3GFX90A , ProgInfo.AccumOffset ,
1245
+ ProgInfo.ComputePGMRSrc3 =
1246
+ SetBits (ProgInfo.ComputePGMRSrc3 , ProgInfo.AccumOffset ,
1246
1247
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_ACCUM_OFFSET,
1247
1248
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 ),
1250
1251
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT,
1251
1252
amdhsa::COMPUTE_PGM_RSRC3_GFX90A_TG_SPLIT_SHIFT);
1252
1253
}
0 commit comments