2018-02-14 04:03:32 +08:00
|
|
|
; RUN: llc -mtriple=amdgcn-amd- -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefixes=GCN,GFX8,GFX89 %s
|
|
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefixes=GCN,GFX8,GFX89 %s
|
2018-12-01 02:29:17 +08:00
|
|
|
; RUN: llc -mtriple=amdgcn-amd- -mcpu=gfx900 -verify-machineinstrs -amdgpu-enable-global-sgpr-addr < %s | FileCheck --check-prefixes=GCN,GFX9,GFX89 %s
|
|
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -amdgpu-enable-global-sgpr-addr < %s | FileCheck --check-prefixes=GCN,GFX9,GFX89 %s
|
2019-05-07 05:57:02 +08:00
|
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -mattr=+code-object-v3 -verify-machineinstrs -amdgpu-enable-global-sgpr-addr < %s | FileCheck --check-prefixes=GCN,GFX10,GFX10WGP %s
|
|
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -mattr=+code-object-v3,+cumode -verify-machineinstrs -amdgpu-enable-global-sgpr-addr < %s | FileCheck --check-prefixes=GCN,GFX10,GFX10CU %s
|
2017-07-22 05:19:23 +08:00
|
|
|
|
2017-10-26 01:04:46 +08:00
|
|
|
declare i32 @llvm.amdgcn.workitem.id.x()
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}system_one_as_unordered:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_one_as_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_one_as_unordered(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("one-as") unordered, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}system_one_as_monotonic:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_one_as_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_one_as_monotonic(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("one-as") monotonic, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}system_one_as_release:
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_one_as_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_one_as_release(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("one-as") release, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}system_one_as_seq_cst:
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_one_as_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_one_as_seq_cst(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("one-as") seq_cst, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}singlethread_one_as_unordered:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_one_as_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_one_as_unordered(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread-one-as") unordered, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}singlethread_one_as_monotonic:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_one_as_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_one_as_monotonic(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread-one-as") monotonic, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}singlethread_one_as_release:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_one_as_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_one_as_release(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread-one-as") release, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}singlethread_one_as_seq_cst:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_one_as_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_one_as_seq_cst(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread-one-as") seq_cst, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}agent_one_as_unordered:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_one_as_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_one_as_unordered(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("agent-one-as") unordered, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}agent_one_as_monotonic:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_one_as_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_one_as_monotonic(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("agent-one-as") monotonic, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}agent_one_as_release:
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_one_as_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_one_as_release(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("agent-one-as") release, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}agent_one_as_seq_cst:
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_one_as_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_one_as_seq_cst(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("agent-one-as") seq_cst, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_one_as_unordered:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel workgroup_one_as_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_one_as_unordered(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup-one-as") unordered, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_one_as_monotonic:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel workgroup_one_as_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_one_as_monotonic(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup-one-as") monotonic, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_one_as_release:
|
|
|
|
; GFX89-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel workgroup_one_as_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_one_as_release(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup-one-as") release, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_one_as_seq_cst:
|
|
|
|
; GFX89-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel workgroup_one_as_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_one_as_seq_cst(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup-one-as") seq_cst, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}wavefront_one_as_unordered:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_one_as_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_one_as_unordered(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront-one-as") unordered, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}wavefront_one_as_monotonic:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_one_as_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_one_as_monotonic(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront-one-as") monotonic, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}wavefront_one_as_release:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_one_as_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_one_as_release(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront-one-as") release, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}wavefront_one_as_seq_cst:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_one_as_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_one_as_seq_cst(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32 %in, i32* %out) {
|
2017-07-22 05:19:23 +08:00
|
|
|
entry:
|
2019-03-26 04:50:21 +08:00
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront-one-as") seq_cst, align 4
|
2017-07-22 05:19:23 +08:00
|
|
|
ret void
|
|
|
|
}
|
2017-10-26 01:04:46 +08:00
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_private_0:
|
2020-01-22 06:27:57 +08:00
|
|
|
; GFX89: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], 0 offen glc slc{{$}}
|
|
|
|
; GFX10: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], 0 offen slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel nontemporal_private_0
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_private_0(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(5)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
|
|
|
store i32 %val, i32 addrspace(5)* %out, !nontemporal !0
|
2017-10-26 01:04:46 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_private_1:
|
2020-01-22 06:27:57 +08:00
|
|
|
; GFX89: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], 0 offen glc slc{{$}}
|
|
|
|
; GFX10: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], 0 offen slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel nontemporal_private_1
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_private_1(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(5)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
|
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
|
|
|
%out.gep = getelementptr inbounds i32, i32 addrspace(5)* %out, i32 %tid
|
|
|
|
store i32 %val, i32 addrspace(5)* %out.gep, !nontemporal !0
|
2017-10-26 01:04:46 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_global_0:
|
|
|
|
; GFX8: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
|
|
|
|
; GFX9: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, off glc slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, off slc{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel nontemporal_global_0
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_global_0(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(1)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
2017-10-26 01:04:46 +08:00
|
|
|
store i32 %val, i32 addrspace(1)* %out, !nontemporal !0
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_global_1:
|
|
|
|
; GFX8: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
|
2018-11-16 09:13:34 +08:00
|
|
|
; GFX9: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}] glc slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}] slc{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel nontemporal_global_1
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_global_1(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(1)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
|
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
2017-10-26 01:04:46 +08:00
|
|
|
%out.gep = getelementptr inbounds i32, i32 addrspace(1)* %out, i32 %tid
|
|
|
|
store i32 %val, i32 addrspace(1)* %out.gep, !nontemporal !0
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_local_0:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: ds_write_b32 v{{[0-9]+}}, v{{[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel nontemporal_local_0
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_local_0(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(3)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
2017-10-26 01:04:46 +08:00
|
|
|
store i32 %val, i32 addrspace(3)* %out, !nontemporal !0
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_local_1:
|
2017-10-26 01:04:46 +08:00
|
|
|
; GCN: ds_write_b32 v{{[0-9]+}}, v{{[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel nontemporal_local_1
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_local_1(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32 addrspace(3)* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
|
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
2017-10-26 01:04:46 +08:00
|
|
|
%out.gep = getelementptr inbounds i32, i32 addrspace(3)* %out, i32 %tid
|
|
|
|
store i32 %val, i32 addrspace(3)* %out.gep, !nontemporal !0
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_flat_0:
|
|
|
|
; GFX89: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} slc{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel nontemporal_flat_0
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_flat_0(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
|
|
|
store i32 %val, i32* %out, !nontemporal !0
|
2017-10-26 01:04:46 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-14 04:03:32 +08:00
|
|
|
; GCN-LABEL: {{^}}nontemporal_flat_1:
|
|
|
|
; GFX89: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} slc{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel nontemporal_flat_1
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2017-10-26 01:04:46 +08:00
|
|
|
define amdgpu_kernel void @nontemporal_flat_1(
|
2018-02-03 00:07:16 +08:00
|
|
|
i32* %in, i32* %out) {
|
2017-10-26 01:04:46 +08:00
|
|
|
entry:
|
|
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
2018-02-03 00:07:16 +08:00
|
|
|
%val = load i32, i32* %in, align 4
|
|
|
|
%out.gep = getelementptr inbounds i32, i32* %out, i32 %tid
|
|
|
|
store i32 %val, i32* %out.gep, !nontemporal !0
|
2017-10-26 01:04:46 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-LABEL: {{^}}system_unordered:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_unordered(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out unordered, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}system_monotonic:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_monotonic(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out monotonic, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}system_release:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX89: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt_vscnt null, 0x0{{$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_release(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out release, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}system_seq_cst:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX89: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt_vscnt null, 0x0{{$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel system_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @system_seq_cst(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out seq_cst, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}singlethread_unordered:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_unordered(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread") unordered, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}singlethread_monotonic:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_monotonic(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread") monotonic, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}singlethread_release:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_release(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread") release, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}singlethread_seq_cst:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel singlethread_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @singlethread_seq_cst(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("singlethread") seq_cst, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}agent_unordered:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_unordered(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("agent") unordered, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}agent_monotonic:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_monotonic(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("agent") monotonic, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}agent_release:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX89: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt_vscnt null, 0x0{{$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_release(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("agent") release, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}agent_seq_cst:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX89: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt lgkmcnt(0){{$}}
|
|
|
|
; GFX10: s_waitcnt_vscnt null, 0x0{{$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel agent_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @agent_seq_cst(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("agent") seq_cst, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}workgroup_unordered:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel workgroup_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_unordered(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup") unordered, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}workgroup_monotonic:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel workgroup_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_monotonic(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup") monotonic, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_release:
|
|
|
|
; GFX89-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10WGP-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel workgroup_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_release(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup") release, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-LABEL: {{^}}workgroup_seq_cst:
|
|
|
|
; GFX89-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10WGP: s_waitcnt vmcnt(0) lgkmcnt(0){{$}}
|
|
|
|
; GFX10WGP-NEXT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10CU-NOT: s_waitcnt_vscnt null, 0x0{{$}}
|
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
|
|
|
; GFX10: .amdhsa_kernel workgroup_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @workgroup_seq_cst(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("workgroup") seq_cst, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}wavefront_unordered:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_unordered
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_unordered(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront") unordered, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}wavefront_monotonic:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_monotonic
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_monotonic(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront") monotonic, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}wavefront_release:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_release
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_release(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront") release, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}wavefront_seq_cst:
|
2019-05-07 05:57:02 +08:00
|
|
|
; GCN-NOT: s_waitcnt vmcnt(0){{$}}
|
|
|
|
; GFX10-NOT: s_waitcnt_v{{[ms]}}cnt {{[^,]+, (0x)*0$}}
|
2019-03-26 04:50:21 +08:00
|
|
|
; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
|
2019-05-07 05:57:02 +08:00
|
|
|
; GFX10: .amdhsa_kernel wavefront_seq_cst
|
|
|
|
; GFX10WGP-NOT: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10CU: .amdhsa_workgroup_processor_mode 0
|
|
|
|
; GFX10-NOT: .amdhsa_memory_ordered 0
|
2019-03-26 04:50:21 +08:00
|
|
|
define amdgpu_kernel void @wavefront_seq_cst(
|
|
|
|
i32 %in, i32* %out) {
|
|
|
|
entry:
|
|
|
|
store atomic i32 %in, i32* %out syncscope("wavefront") seq_cst, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-10-26 01:04:46 +08:00
|
|
|
!0 = !{i32 1}
|