[AMDGPU] Add a test for setting EXTRA_LDS_SIZE in pixel shaders

This commit is contained in:
Jay Foad 2022-04-06 10:49:43 +01:00
parent 060ff66337
commit aa1b22db0f
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10-PAL %s
; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10-MESA %s
; Check EXTRA_LDS_SIZE in SPI_SHADER_PGM_RSRC2_PS.
; GFX10-PAL: 0x2c0b (SPI_SHADER_PGM_RSRC2_PS): 0x800
; GFX10-MESA: .long 45100
; GFX10-MESA-NEXT: .long 2048
@lds = internal addrspace(3) global [4096 x i8] undef
define amdgpu_ps void @global_store_saddr_uniform_ptr_in_vgprs(i32 %voffset) {
%ptr = getelementptr [4096 x i8], [4096 x i8] addrspace(3)* @lds, i32 0, i32 %voffset
store i8 0, i8 addrspace(3)* %ptr
ret void
}