1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-HSA -check-prefix=SI -check-prefix=FUNC %s
3 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=VI -check-prefix=FUNC %s
4 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
7 ; FUNC-LABEL: {{^}}constant_load_i64:
8 ; GCN: s_load_dwordx2 {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0x0{{$}}
10 define amdgpu_kernel void @constant_load_i64(i64 addrspace(1)* %out, i64 addrspace(4)* %in) #0 {
11 %ld = load i64, i64 addrspace(4)* %in
12 store i64 %ld, i64 addrspace(1)* %out
16 ; FUNC-LABEL: {{^}}constant_load_v2i64:
20 define amdgpu_kernel void @constant_load_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> addrspace(4)* %in) #0 {
22 %ld = load <2 x i64>, <2 x i64> addrspace(4)* %in
23 store <2 x i64> %ld, <2 x i64> addrspace(1)* %out
27 ; FUNC-LABEL: {{^}}constant_load_v3i64:
28 ; GCN: s_load_dwordx8 {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0x0{{$}}
30 ; EG-DAG: VTX_READ_128
31 ; EG-DAG: VTX_READ_128
32 define amdgpu_kernel void @constant_load_v3i64(<3 x i64> addrspace(1)* %out, <3 x i64> addrspace(4)* %in) #0 {
34 %ld = load <3 x i64>, <3 x i64> addrspace(4)* %in
35 store <3 x i64> %ld, <3 x i64> addrspace(1)* %out
39 ; FUNC-LABEL: {{^}}constant_load_v4i64
44 define amdgpu_kernel void @constant_load_v4i64(<4 x i64> addrspace(1)* %out, <4 x i64> addrspace(4)* %in) #0 {
46 %ld = load <4 x i64>, <4 x i64> addrspace(4)* %in
47 store <4 x i64> %ld, <4 x i64> addrspace(1)* %out
51 ; FUNC-LABEL: {{^}}constant_load_v8i64:
52 ; GCN: s_load_dwordx16
58 define amdgpu_kernel void @constant_load_v8i64(<8 x i64> addrspace(1)* %out, <8 x i64> addrspace(4)* %in) #0 {
60 %ld = load <8 x i64>, <8 x i64> addrspace(4)* %in
61 store <8 x i64> %ld, <8 x i64> addrspace(1)* %out
65 ; FUNC-LABEL: {{^}}constant_load_v16i64:
66 ; GCN: s_load_dwordx16
67 ; GCN: s_load_dwordx16
77 define amdgpu_kernel void @constant_load_v16i64(<16 x i64> addrspace(1)* %out, <16 x i64> addrspace(4)* %in) #0 {
79 %ld = load <16 x i64>, <16 x i64> addrspace(4)* %in
80 store <16 x i64> %ld, <16 x i64> addrspace(1)* %out
84 attributes #0 = { nounwind }