26 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GCN %s2; RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx1100 < %s 2>&1 | FileCheck -check-prefix=ERR %s3 4; ERR: LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.s.memrealtime5 6declare i64 @llvm.amdgcn.s.memrealtime() #07 8; GCN-LABEL: {{^}}test_s_memrealtime:9; GCN-DAG: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}10; GCN-DAG: s_load_dwordx211; GCN: lgkmcnt12; GCN: _store_dwordx213; GCN-NOT: lgkmcnt14; GCN: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}15; GCN: _store_dwordx216define amdgpu_kernel void @test_s_memrealtime(ptr addrspace(1) %out) #0 {17 %cycle0 = call i64 @llvm.amdgcn.s.memrealtime()18 store volatile i64 %cycle0, ptr addrspace(1) %out19 20 %cycle1 = call i64 @llvm.amdgcn.s.memrealtime()21 store volatile i64 %cycle1, ptr addrspace(1) %out22 ret void23}24 25attributes #0 = { nounwind }26