diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp --- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -1045,10 +1045,6 @@ MD->setRsrc2(CC, S_00B84C_SCRATCH_EN(1)); } } else { - // Priority? - MD->setHwStage(CC, ".float_mode", CurrentProgramInfo.FloatMode); - // Priv? - // DX10Clamp? MD->setHwStage(CC, ".debug_mode", (bool)CurrentProgramInfo.DebugMode); MD->setHwStage(CC, ".ieee_mode", (bool)CurrentProgramInfo.IEEEMode); MD->setHwStage(CC, ".wgp_mode", (bool)CurrentProgramInfo.WgpMode); @@ -1082,7 +1078,12 @@ MD->setSpiPsInputAddr(MFI->getPSInputAddr()); } else { // Graphics registers - MD->setGraphicsRegisters(".ps_extra_lds_size", ExtraLDSSize); + const unsigned ExtraLdsDwGranularity = + STM.getGeneration() >= AMDGPUSubtarget::GFX11 ? 256 : 128; + MD->setGraphicsRegisters( + ".ps_extra_lds_size", + (unsigned)(ExtraLDSSize * ExtraLdsDwGranularity * sizeof(uint32_t))); + // Set PsInputEna and PsInputAddr .spi_ps_input_ena and .spi_ps_input_addr static StringLiteral const PsInputFields[] = { ".persp_sample_ena", ".persp_center_ena",