brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · bfa7d37 Raw
62 lines · plain
1; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1250 < %s | FileCheck -check-prefix=PAL %s2 3; GFX1250 supports upto 320 KB configurable LDS memory.4; This test checks the min and max size of LDS that can be allocated.5 6; PAL: .shader_functions:7; PAL: test_lds_array_i16:8; PAL: .lds_size:       0x500009; PAL: test_lds_array_i32:10; PAL: .lds_size:       0x5000011; PAL: test_lds_array_i8:12; PAL: .lds_size:       0x5000013; PAL: test_lds_i16:14; PAL: .lds_size:       0x215; PAL: test_lds_i32:16; PAL: .lds_size:       0x417; PAL: test_lds_i8:18; PAL: .lds_size:       0x119 20@lds.i8 = addrspace(3) global i8 undef21@lds.array.i8 = addrspace(3) global [327679 x i8] undef22@lds.i16 = addrspace(3) global i16 undef23@lds.array.i16 = addrspace(3) global [163839 x i16] undef24@lds.i32 = addrspace(3) global i32 undef25@lds.array.i32 = addrspace(3) global [81919 x i32] undef26 27define amdgpu_gfx void @test_lds_i8(i8 %val) {28  store i8 %val, ptr addrspace(3) @lds.i829  ret void30}31 32define amdgpu_gfx void @test_lds_i16(i16 %val) {33  store i16 %val, ptr addrspace(3) @lds.i1634  ret void35}36 37define amdgpu_gfx void @test_lds_i32(i32 %val) {38  store i32 %val, ptr addrspace(3) @lds.i3239  ret void40}41 42define amdgpu_gfx void @test_lds_array_i8() {43  %gep = getelementptr inbounds [327679 x i8], ptr addrspace(3) @lds.array.i8, i32 0, i32 544  %val = load i8, ptr addrspace(3) %gep45  store i8 %val, ptr addrspace(3) @lds.i846  ret void47}48 49define amdgpu_gfx void @test_lds_array_i16() {50  %gep = getelementptr inbounds [163839 x i16], ptr addrspace(3) @lds.array.i16, i32 0, i32 1051  %val = load i16, ptr addrspace(3) %gep52  store i16 %val, ptr addrspace(3) @lds.i1653  ret void54}55 56define amdgpu_gfx void @test_lds_array_i32() {57  %gep = getelementptr inbounds [81919 x i32], ptr addrspace(3) @lds.array.i32, i32 0, i32 2058  %val = load i32, ptr addrspace(3) %gep59  store i32 %val, ptr addrspace(3) @lds.i3260  ret void61}62