brintos

brintos / llvm-project-archived public Read only

0
0
Text · 891 B · 77f57b0 Raw
23 lines · plain
1; RUN: not llc -mtriple=amdgcn-amd-amdhsa < %s 2>&1 | FileCheck -check-prefix=ERROR %s2 3; ERROR: in function test_kernel{{.*}}: non-hsa intrinsic with hsa target4define 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_ptr7  store i32 %value, ptr addrspace(1) %out8  ret void9}10 11; ERROR: in function test_func{{.*}}: non-hsa intrinsic with hsa target12define 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_ptr15  store i32 %value, ptr addrspace(1) %out16  ret void17}18 19declare ptr addrspace(4) @llvm.amdgcn.implicit.buffer.ptr() #020 21attributes #0 = { nounwind readnone speculatable }22attributes #1 = { nounwind  }23