1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefix=GCN -check-prefix=SI %s
2 ; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefix=GCN -check-prefix=CI %s
3 ; RUN: llc -march=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(<3 x i64> addrspace(1)* %out, <3 x i64> %x) {
9 store <3 x i64> %x, <3 x i64> 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(<3 x i64> addrspace(1)* %out, <3 x i64> %x) {
44 store <3 x i64> %x, <3 x i64> addrspace(1)* %out, align 1
48 ; GCN-LABEL: {{^}}local_store_v3i64:
51 define amdgpu_kernel void @local_store_v3i64(<3 x i64> addrspace(3)* %out, <3 x i64> %x) {
52 store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 32
56 ; GCN-LABEL: {{^}}local_store_v3i64_unaligned:
86 define amdgpu_kernel void @local_store_v3i64_unaligned(<3 x i64> addrspace(3)* %out, <3 x i64> %x) {
87 store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 1
91 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i32:
92 ; SI-DAG: buffer_store_dwordx2
93 ; SI-DAG: buffer_store_dword v
94 ; VI-DAG: buffer_store_dwordx3
95 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i64> %x) {
96 %trunc = trunc <3 x i64> %x to <3 x i32>
97 store <3 x i32> %trunc, <3 x i32> addrspace(1)* %out
101 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i16:
102 ; GCN-DAG: buffer_store_short
103 ; GCN-DAG: buffer_store_dword v
104 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i16(<3 x i16> addrspace(1)* %out, <3 x i64> %x) {
105 %trunc = trunc <3 x i64> %x to <3 x i16>
106 store <3 x i16> %trunc, <3 x i16> addrspace(1)* %out
111 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i8:
112 ; GCN-DAG: buffer_store_short
113 ; GCN-DAG: buffer_store_byte v
114 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i8(<3 x i8> addrspace(1)* %out, <3 x i64> %x) {
115 %trunc = trunc <3 x i64> %x to <3 x i8>
116 store <3 x i8> %trunc, <3 x i8> addrspace(1)* %out
120 ; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i1:
121 ; GCN-DAG: buffer_store_byte v
122 ; GCN-DAG: buffer_store_byte v
123 ; GCN-DAG: buffer_store_byte v
124 define amdgpu_kernel void @global_truncstore_v3i64_to_v3i1(<3 x i1> addrspace(1)* %out, <3 x i64> %x) {
125 %trunc = trunc <3 x i64> %x to <3 x i1>
126 store <3 x i1> %trunc, <3 x i1> addrspace(1)* %out