1 ; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2 ; RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=ERR %s
4 ; ERR: LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.s.memrealtime
6 declare i64 @llvm.amdgcn.s.memrealtime() #0
8 ; GCN-LABEL: {{^}}test_s_memrealtime:
9 ; GCN-DAG: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
10 ; GCN-DAG: s_load_dwordx2
14 ; GCN: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
16 define 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) %out
20 %cycle1 = call i64 @llvm.amdgcn.s.memrealtime()
21 store volatile i64 %cycle1, ptr addrspace(1) %out
25 attributes #0 = { nounwind }