1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -amdgpu-function-calls -amdgpu-stress-function-calls -amdgpu-enable-lower-module-lds=false < %s | FileCheck -check-prefix=GCN %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -amdgpu-enable-lower-module-lds=false < %s | FileCheck -check-prefix=GCN %s
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -amdgpu-enable-lower-module-lds=false < %s | FileCheck -check-prefix=GCN %s
5 @lds0 = addrspace(3) global i32 undef, align 4
7 ; GCN-NOT: load_lds_simple
9 define internal i32 @load_lds_simple() {
10 %load = load i32, ptr addrspace(3) @lds0, align 4
14 ; GCN-LABEL: {{^}}kernel:
15 ; GCN: v_mov_b32_e32 [[ADDR:v[0-9]+]], 0
16 ; GCN: ds_read_b32 v{{[0-9]+}}, [[ADDR]]
17 define amdgpu_kernel void @kernel(ptr addrspace(1) %out) {
18 %call = call i32 @load_lds_simple()
19 store i32 %call, ptr addrspace(1) %out