brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1010 B · c8d03b8 Raw
26 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck --check-prefixes=SIVI,GCN %s2; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck --check-prefixes=SIVI,GCN %s3; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=-flat-for-global < %s | FileCheck -check-prefix=GCN %s4; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -mattr=-flat-for-global < %s | FileCheck -check-prefix=GCN %s5 6declare i64 @llvm.amdgcn.s.memtime() #07 8; GCN-LABEL: {{^}}test_s_memtime:9; GCN-DAG: s_memtime s{{\[[0-9]+:[0-9]+\]}}10; GCN-DAG: s_load_dwordx211; GCN: lgkmcnt12; GCN: {{buffer|global}}_store_dwordx213; SIVI-NOT: lgkmcnt14; GCN: s_memtime s{{\[[0-9]+:[0-9]+\]}}15; GCN: {{buffer|global}}_store_dwordx216define amdgpu_kernel void @test_s_memtime(ptr addrspace(1) %out) #0 {17  %cycle0 = call i64 @llvm.amdgcn.s.memtime()18  store volatile i64 %cycle0, ptr addrspace(1) %out19 20  %cycle1 = call i64 @llvm.amdgcn.s.memtime()21  store volatile i64 %cycle1, ptr addrspace(1) %out22  ret void23}24 25attributes #0 = { nounwind }26