1 ; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SICIVI,FUNC %s
2 ; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SICIVI,FUNC %s
3 ; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX9,FUNC %s
4 ; RUN: llc -march=r600 -mtriple=r600-- -mcpu=redwood < %s | FileCheck -check-prefixes=EG,FUNC %s
5 ; RUN: llc -march=r600 -mtriple=r600-- -mcpu=cayman < %s | FileCheck -check-prefixes=CM,FUNC %s
7 ; FUNC-LABEL: {{^}}store_local_i1:
16 define amdgpu_kernel void @store_local_i1(i1 addrspace(3)* %out) {
18 store i1 true, i1 addrspace(3)* %out
22 ; FUNC-LABEL: {{^}}store_local_i8:
23 ; SICIVI: s_mov_b32 m0
31 define amdgpu_kernel void @store_local_i8(i8 addrspace(3)* %out, i8 %in) {
32 store i8 %in, i8 addrspace(3)* %out
36 ; FUNC-LABEL: {{^}}store_local_i16:
37 ; SICIVI: s_mov_b32 m0
45 define amdgpu_kernel void @store_local_i16(i16 addrspace(3)* %out, i16 %in) {
46 store i16 %in, i16 addrspace(3)* %out
50 ; FUNC-LABEL: {{^}}store_local_v2i16:
51 ; SICIVI: s_mov_b32 m0
59 define amdgpu_kernel void @store_local_v2i16(<2 x i16> addrspace(3)* %out, <2 x i16> %in) {
61 store <2 x i16> %in, <2 x i16> addrspace(3)* %out
65 ; FUNC-LABEL: {{^}}store_local_v4i8:
66 ; SICIVI: s_mov_b32 m0
74 define amdgpu_kernel void @store_local_v4i8(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
76 store <4 x i8> %in, <4 x i8> addrspace(3)* %out
80 ; FUNC-LABEL: {{^}}store_local_v4i8_unaligned:
81 ; SICIVI: s_mov_b32 m0
100 define amdgpu_kernel void @store_local_v4i8_unaligned(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
102 store <4 x i8> %in, <4 x i8> addrspace(3)* %out, align 1
106 ; FUNC-LABEL: {{^}}store_local_v4i8_halfaligned:
107 ; SICIVI: s_mov_b32 m0
110 ; EG: LDS_SHORT_WRITE
111 ; EG: LDS_SHORT_WRITE
114 ; CM: LDS_SHORT_WRITE
115 ; CM: LDS_SHORT_WRITE
120 define amdgpu_kernel void @store_local_v4i8_halfaligned(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
122 store <4 x i8> %in, <4 x i8> addrspace(3)* %out, align 2
126 ; FUNC-LABEL: {{^}}store_local_v2i32:
127 ; SICIVI: s_mov_b32 m0
139 define amdgpu_kernel void @store_local_v2i32(<2 x i32> addrspace(3)* %out, <2 x i32> %in) {
141 store <2 x i32> %in, <2 x i32> addrspace(3)* %out
145 ; FUNC-LABEL: {{^}}store_local_v4i32:
146 ; SICIVI: s_mov_b32 m0
160 define amdgpu_kernel void @store_local_v4i32(<4 x i32> addrspace(3)* %out, <4 x i32> %in) {
162 store <4 x i32> %in, <4 x i32> addrspace(3)* %out
166 ; FUNC-LABEL: {{^}}store_local_v4i32_align4:
167 ; SICIVI: s_mov_b32 m0
182 define amdgpu_kernel void @store_local_v4i32_align4(<4 x i32> addrspace(3)* %out, <4 x i32> %in) {
184 store <4 x i32> %in, <4 x i32> addrspace(3)* %out, align 4
188 ; FUNC-LABEL: {{^}}store_local_i64_i8:
189 ; SICIVI: s_mov_b32 m0
194 define amdgpu_kernel void @store_local_i64_i8(i8 addrspace(3)* %out, i64 %in) {
196 %0 = trunc i64 %in to i8
197 store i8 %0, i8 addrspace(3)* %out
201 ; FUNC-LABEL: {{^}}store_local_i64_i16:
202 ; SICIVI: s_mov_b32 m0
205 ; EG: LDS_SHORT_WRITE
207 define amdgpu_kernel void @store_local_i64_i16(i16 addrspace(3)* %out, i64 %in) {
209 %0 = trunc i64 %in to i16
210 store i16 %0, i16 addrspace(3)* %out