mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-28 05:10:05 -04:00
e536396218
------------------------------------------------------------------------ r292982 | arsenm | 2017-01-24 14:02:15 -0800 (Tue, 24 Jan 2017) | 8 lines Enable FeatureFlatForGlobal on Volcanic Islands This switches to the workaround that HSA defaults to for the mesa path. This should be applied to the 4.0 branch. Patch by Vedran Miletić <vedran@miletic.net> ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@293326 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
879 B
LLVM
26 lines
879 B
LLVM
; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
|
|
|
|
declare i64 @llvm.readcyclecounter() #0
|
|
|
|
; GCN-LABEL: {{^}}test_readcyclecounter:
|
|
; SI-DAG: s_memtime s{{\[[0-9]+:[0-9]+\]}}
|
|
; VI-DAG: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
|
|
; GCN-DAG: s_load_dwordx2
|
|
; GCN: lgkmcnt
|
|
; GCN: store_dwordx2
|
|
; GCN-NOT: lgkmcnt
|
|
; SI: s_memtime s{{\[[0-9]+:[0-9]+\]}}
|
|
; VI: s_memrealtime s{{\[[0-9]+:[0-9]+\]}}
|
|
; GCN: store_dwordx2
|
|
define void @test_readcyclecounter(i64 addrspace(1)* %out) #0 {
|
|
%cycle0 = call i64 @llvm.readcyclecounter()
|
|
store volatile i64 %cycle0, i64 addrspace(1)* %out
|
|
|
|
%cycle1 = call i64 @llvm.readcyclecounter()
|
|
store volatile i64 %cycle1, i64 addrspace(1)* %out
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|