; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN %s ; RUN: llvm-as -data-layout=A5 < %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs | FileCheck --check-prefix=GCN %s declare i8 addrspace(4)* @llvm.amdgcn.dispatch.ptr() declare i8 addrspace(4)* @llvm.amdgcn.implicitarg.ptr() declare i32 @llvm.amdgcn.workitem.id.x() declare i32 @llvm.amdgcn.workgroup.id.x() declare void @llvm.amdgcn.s.barrier() @test_local.temp = internal addrspace(3) global [1 x i32] undef, align 4 @test_global_local.temp = internal addrspace(3) global [1 x i32] undef, align 4 ; GCN-LABEL: {{^}}test_local ; GCN: v_mov_b32_e32 v[[VAL:[0-9]+]], 0x777 ; GCN: ds_write_b32 v{{[0-9]+}}, v[[VAL]] ; GCN: s_waitcnt lgkmcnt(0){{$}} ; GCN-NEXT: s_barrier ; GCN: flat_store_dword define amdgpu_kernel void @test_local(i32 addrspace(1)*) { %2 = alloca i32 addrspace(1)*, align 4, addrspace(5) store i32 addrspace(1)* %0, i32 addrspace(1)* addrspace(5)* %2, align 4 %3 = call i32 @llvm.amdgcn.workitem.id.x() %4 = zext i32 %3 to i64 %5 = icmp eq i64 %4, 0 br i1 %5, label %6, label %7 ;