2018-08-31 07:49:54 +02:00
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SICIVI,FUNC %s
|
2020-04-01 22:46:10 +02:00
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SICIVI,VI,FUNC %s
|
2018-08-31 07:49:54 +02:00
|
|
|
; RUN: llc -march=amdgcn -mtriple=amdgcn-- -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX9,FUNC %s
|
|
|
|
; RUN: llc -march=r600 -mtriple=r600-- -mcpu=redwood < %s | FileCheck -check-prefixes=EG,FUNC %s
|
|
|
|
; RUN: llc -march=r600 -mtriple=r600-- -mcpu=cayman < %s | FileCheck -check-prefixes=CM,FUNC %s
|
2016-09-02 20:52:28 +02:00
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_i1:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_BYTE_WRITE
|
2016-09-02 21:07:06 +02:00
|
|
|
|
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; GCN: ds_write_b8
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_i1(i1 addrspace(3)* %out) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store i1 true, i1 addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_i8:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
|
2016-09-02 21:07:06 +02:00
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; GCN: ds_write_b8
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_i8(i8 addrspace(3)* %out, i8 %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
store i8 %in, i8 addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_i16:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_SHORT_WRITE
|
|
|
|
|
2016-09-02 21:07:06 +02:00
|
|
|
; CM: LDS_SHORT_WRITE
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; GCN: ds_write_b16
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_i16(i16 addrspace(3)* %out, i16 %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
store i16 %in, i16 addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_v2i16:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
|
|
|
|
; GCN: ds_write_b32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v2i16(<2 x i16> addrspace(3)* %out, <2 x i16> %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store <2 x i16> %in, <2 x i16> addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_v4i8:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
|
|
|
|
; GCN: ds_write_b32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v4i8(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store <4 x i8> %in, <4 x i8> addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-09-02 21:07:06 +02:00
|
|
|
; FUNC-LABEL: {{^}}store_local_v4i8_unaligned:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 21:07:06 +02:00
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
; EG-NOT: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
; CM: LDS_BYTE_WRITE
|
|
|
|
; CM-NOT: LDS_WRITE
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v4i8_unaligned(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
|
2016-09-02 21:07:06 +02:00
|
|
|
entry:
|
|
|
|
store <4 x i8> %in, <4 x i8> addrspace(3)* %out, align 1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_v4i8_halfaligned:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 21:07:06 +02:00
|
|
|
; EG: LDS_SHORT_WRITE
|
|
|
|
; EG: LDS_SHORT_WRITE
|
|
|
|
; EG-NOT: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_SHORT_WRITE
|
|
|
|
; CM: LDS_SHORT_WRITE
|
|
|
|
; CM-NOT: LDS_WRITE
|
|
|
|
|
|
|
|
; GCN: ds_write_b16
|
|
|
|
; GCN: ds_write_b16
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v4i8_halfaligned(<4 x i8> addrspace(3)* %out, <4 x i8> %in) {
|
2016-09-02 21:07:06 +02:00
|
|
|
entry:
|
|
|
|
store <4 x i8> %in, <4 x i8> addrspace(3)* %out, align 2
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; FUNC-LABEL: {{^}}store_local_v2i32:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
2016-09-02 21:07:06 +02:00
|
|
|
; EG-NOT: LDS_WRITE
|
2016-09-02 20:52:28 +02:00
|
|
|
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
2016-09-02 21:07:06 +02:00
|
|
|
; CM-NOT: LDS_WRITE
|
2016-09-02 20:52:28 +02:00
|
|
|
|
|
|
|
; GCN: ds_write_b64
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v2i32(<2 x i32> addrspace(3)* %out, <2 x i32> %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store <2 x i32> %in, <2 x i32> addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_v4i32:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
|
2020-04-01 22:46:10 +02:00
|
|
|
; SI: ds_write2_b32
|
|
|
|
; VI: ds_write_b128
|
|
|
|
; GFX9: ds_write_b128
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v4i32(<4 x i32> addrspace(3)* %out, <4 x i32> %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store <4 x i32> %in, <4 x i32> addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_v4i32_align4:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
; EG: LDS_WRITE
|
|
|
|
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
; CM: LDS_WRITE
|
|
|
|
|
2020-09-18 15:19:54 +02:00
|
|
|
; GCN: ds_write2_b32
|
|
|
|
; GCN: ds_write2_b32
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_v4i32_align4(<4 x i32> addrspace(3)* %out, <4 x i32> %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
store <4 x i32> %in, <4 x i32> addrspace(3)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_i64_i8:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_BYTE_WRITE
|
|
|
|
; GCN: ds_write_b8
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_i64_i8(i8 addrspace(3)* %out, i64 %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
%0 = trunc i64 %in to i8
|
|
|
|
store i8 %0, i8 addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: {{^}}store_local_i64_i16:
|
2017-11-29 01:55:57 +01:00
|
|
|
; SICIVI: s_mov_b32 m0
|
|
|
|
; GFX9-NOT: m0
|
|
|
|
|
2016-09-02 20:52:28 +02:00
|
|
|
; EG: LDS_SHORT_WRITE
|
|
|
|
; GCN: ds_write_b16
|
2017-03-21 22:39:51 +01:00
|
|
|
define amdgpu_kernel void @store_local_i64_i16(i16 addrspace(3)* %out, i64 %in) {
|
2016-09-02 20:52:28 +02:00
|
|
|
entry:
|
|
|
|
%0 = trunc i64 %in to i16
|
|
|
|
store i16 %0, i16 addrspace(3)* %out
|
|
|
|
ret void
|
|
|
|
}
|