[InstCombine] Signed saturation patterns
[llvm-core.git] / test / CodeGen / AMDGPU / llvm.amdgcn.s.memrealtime.ll
blob66041037168a7cfdb5e8156ec03ab9c33b14c358
1 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
3 declare i64 @llvm.amdgcn.s.memrealtime() #0
5 ; GCN-LABEL: {{^}}test_s_memrealtime:
6 ; GCN-DAG: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
7 ; GCN-DAG: s_load_dwordx2
8 ; GCN: lgkmcnt
9 ; GCN: _store_dwordx2
10 ; GCN-NOT: lgkmcnt
11 ; GCN: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
12 ; GCN: _store_dwordx2
13 define amdgpu_kernel void @test_s_memrealtime(i64 addrspace(1)* %out) #0 {
14   %cycle0 = call i64 @llvm.amdgcn.s.memrealtime()
15   store volatile i64 %cycle0, i64 addrspace(1)* %out
17   %cycle1 = call i64 @llvm.amdgcn.s.memrealtime()
18   store volatile i64 %cycle1, i64 addrspace(1)* %out
19   ret void
22 attributes #0 = { nounwind }