1 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa < %s 2>&1 | FileCheck -check-prefix=ERROR %s
3 ; ERROR: in function test_kernel{{.*}}: non-hsa intrinsic with hsa target
4 define amdgpu_kernel void @test_kernel(ptr addrspace(1) %out) #1 {
5 %implicit_buffer_ptr = call ptr addrspace(4) @llvm.amdgcn.implicit.buffer.ptr()
6 %value = load i32, ptr addrspace(4) %implicit_buffer_ptr
7 store i32 %value, ptr addrspace(1) %out
11 ; ERROR: in function test_func{{.*}}: non-hsa intrinsic with hsa target
12 define void @test_func(ptr addrspace(1) %out) #1 {
13 %implicit_buffer_ptr = call ptr addrspace(4) @llvm.amdgcn.implicit.buffer.ptr()
14 %value = load i32, ptr addrspace(4) %implicit_buffer_ptr
15 store i32 %value, ptr addrspace(1) %out
19 declare ptr addrspace(4) @llvm.amdgcn.implicit.buffer.ptr() #0
21 attributes #0 = { nounwind readnone speculatable }
22 attributes #1 = { nounwind }