2016-05-21 10:27:49 +08:00
|
|
|
; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=SI %s
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=CI %s
|
2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
|
2014-02-08 04:29:40 +08:00
|
|
|
|
2016-05-21 10:27:49 +08:00
|
|
|
; GCN-LABEL: {{^}}global_store_v3i64:
|
|
|
|
; GCN-DAG: buffer_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:16
|
|
|
|
; GCN-DAG: buffer_store_dwordx4 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0{{$}}
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_store_v3i64(<3 x i64> addrspace(1)* %out, <3 x i64> %x) {
|
2014-02-08 04:29:40 +08:00
|
|
|
store <3 x i64> %x, <3 x i64> addrspace(1)* %out, align 32
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-05-21 10:27:49 +08:00
|
|
|
; GCN-LABEL: {{^}}global_store_v3i64_unaligned:
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
|
|
|
; GCN: buffer_store_byte
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_store_v3i64_unaligned(<3 x i64> addrspace(1)* %out, <3 x i64> %x) {
|
2014-02-08 04:29:40 +08:00
|
|
|
store <3 x i64> %x, <3 x i64> addrspace(1)* %out, align 1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-05-21 10:27:49 +08:00
|
|
|
; GCN-LABEL: {{^}}local_store_v3i64:
|
2016-08-30 03:15:22 +08:00
|
|
|
; GCN: ds_write2_b64
|
2016-05-21 10:27:49 +08:00
|
|
|
; GCN: ds_write_b64
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @local_store_v3i64(<3 x i64> addrspace(3)* %out, <3 x i64> %x) {
|
2014-02-08 04:29:40 +08:00
|
|
|
store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 32
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-05-21 10:27:49 +08:00
|
|
|
; GCN-LABEL: {{^}}local_store_v3i64_unaligned:
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
|
|
|
; GCN: ds_write_b8
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @local_store_v3i64_unaligned(<3 x i64> addrspace(3)* %out, <3 x i64> %x) {
|
2016-05-21 10:27:49 +08:00
|
|
|
store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i32:
|
|
|
|
; GCN-DAG: buffer_store_dwordx2
|
|
|
|
; GCN-DAG: buffer_store_dword v
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_truncstore_v3i64_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i64> %x) {
|
2016-05-21 10:27:49 +08:00
|
|
|
%trunc = trunc <3 x i64> %x to <3 x i32>
|
|
|
|
store <3 x i32> %trunc, <3 x i32> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i16:
|
|
|
|
; GCN-DAG: buffer_store_short
|
|
|
|
; GCN-DAG: buffer_store_dword v
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_truncstore_v3i64_to_v3i16(<3 x i16> addrspace(1)* %out, <3 x i64> %x) {
|
2016-05-21 10:27:49 +08:00
|
|
|
%trunc = trunc <3 x i64> %x to <3 x i16>
|
|
|
|
store <3 x i16> %trunc, <3 x i16> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i8:
|
|
|
|
; GCN-DAG: buffer_store_short
|
|
|
|
; GCN-DAG: buffer_store_byte v
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_truncstore_v3i64_to_v3i8(<3 x i8> addrspace(1)* %out, <3 x i64> %x) {
|
2016-05-21 10:27:49 +08:00
|
|
|
%trunc = trunc <3 x i64> %x to <3 x i8>
|
|
|
|
store <3 x i8> %trunc, <3 x i8> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i1:
|
|
|
|
; GCN-DAG: buffer_store_byte v
|
|
|
|
; GCN-DAG: buffer_store_byte v
|
|
|
|
; GCN-DAG: buffer_store_byte v
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @global_truncstore_v3i64_to_v3i1(<3 x i1> addrspace(1)* %out, <3 x i64> %x) {
|
2016-05-21 10:27:49 +08:00
|
|
|
%trunc = trunc <3 x i64> %x to <3 x i1>
|
|
|
|
store <3 x i1> %trunc, <3 x i1> addrspace(1)* %out
|
2014-02-08 04:29:40 +08:00
|
|
|
ret void
|
|
|
|
}
|