1 ; RUN: llc -mtriple=amdgcn -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefix=GCN -check-prefix=SI %s
2 ; RUN: llc -mtriple=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefix=GCN -check-prefix=CI %s
3 ; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefix=GCN -check-prefix=VI %s
5 ; GCN-LABEL: {{^}}global_store_v3i64:
6 ; GCN-DAG: buffer_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:16
7 ; GCN-DAG: buffer_store_dwordx4 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0{{$}}
8 define amdgpu_kernel void @global_store_v3i64(ptr addrspace(1) %out, <3 x i64> %x) {
9 store <3 x i64> %x, ptr addrspace(1) %out, align 32
13 ; GCN-LABEL: {{^}}global_store_v3i64_unaligned:
14 ; GCN: buffer_store_byte
15 ; GCN: buffer_store_byte
16 ; GCN: buffer_store_byte
17 ; GCN: buffer_store_byte
19 ; GCN: buffer_store_byte
20 ; GCN: buffer_store_byte
21 ; GCN: buffer_store_byte
22 ; GCN: buffer_store_byte
24 ; GCN: buffer_store_byte
25 ; GCN: buffer_store_byte
26 ; GCN: buffer_store_byte
27 ; GCN: buffer_store_byte
29 ; GCN: buffer_store_byte
30 ; GCN: buffer_store_byte
31 ; GCN: buffer_store_byte
32 ; GCN: buffer_store_byte
34 ; GCN: buffer_store_byte
35 ; GCN: buffer_store_byte
36 ; GCN: buffer_store_byte
37 ; GCN: buffer_store_byte
39 ; GCN: buffer_store_byte
40 ; GCN: buffer_store_byte
41 ; GCN: buffer_store_byte
42 ; GCN: buffer_store_byte
43 define amdgpu_kernel void @global_store_v3i64_unaligned(ptr addrspace(1) %out, <3 x i64> %x) {
44 store <3 x i64> %x, ptr addrspace(1) %out, align 1
48 ; GCN-LABEL: {{^}}local_store_v3i64:
57 define amdgpu_kernel void @local_store_v3i64(ptr addrspace(3) %out, <3 x i64> %x) {
58 store <3 x i64> %x, ptr addrspace(3) %out, align 32
62 ; GCN-LABEL: {{^}}local_store_v3i64_unaligned:
92 define amdgpu_kernel void @local_store_v3i64_unaligned(ptr addrspace(3) %out, <3 x i64> %x) {
93 store <3 x i64> %x, ptr addrspace(3) %out, align 1
97 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i32:
98 ; SI-DAG: buffer_store_dwordx2
99 ; SI-DAG: buffer_store_dword v
100 ; VI-DAG: buffer_store_dwordx3
101 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i32(ptr addrspace(1) %out, <3 x i64> %x) {
102 %trunc = trunc <3 x i64> %x to <3 x i32>
103 store <3 x i32> %trunc, ptr addrspace(1) %out
107 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i16:
108 ; GCN-DAG: buffer_store_short
109 ; GCN-DAG: buffer_store_dword v
110 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i16(ptr addrspace(1) %out, <3 x i64> %x) {
111 %trunc = trunc <3 x i64> %x to <3 x i16>
112 store <3 x i16> %trunc, ptr addrspace(1) %out
117 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i8:
118 ; GCN-DAG: buffer_store_short
119 ; GCN-DAG: buffer_store_byte v
120 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i8(ptr addrspace(1) %out, <3 x i64> %x) {
121 %trunc = trunc <3 x i64> %x to <3 x i8>
122 store <3 x i8> %trunc, ptr addrspace(1) %out
126 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i1:
127 ; GCN-DAG: buffer_store_byte v
128 ; GCN-DAG: buffer_store_byte v
129 ; GCN-DAG: buffer_store_byte v
130 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i1(ptr addrspace(1) %out, <3 x i64> %x) {
131 %trunc = trunc <3 x i64> %x to <3 x i1>
132 store <3 x i1> %trunc, ptr addrspace(1) %out