1; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a < %s
2
3define protected amdgpu_kernel void @foo(i64 addrspace(1)* %arg, i64 addrspace(1)* %arg1) {
4bb:
5  %tmp = addrspacecast i64* addrspace(5)* null to i64**
6  %tmp2 = call i64 @eggs(i64* undef) #1
7  %tmp3 = load i64*, i64** %tmp, align 8
8  %tmp4 = getelementptr inbounds i64, i64* %tmp3, i64 undef
9  store i64 %tmp2, i64* %tmp4, align 8
10  ret void
11}
12
13declare hidden i64 @eggs(i64*)
14