annotate test/CodeGen/AMDGPU/memory-legalizer-store.ll @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents
children 3a76565eade5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llc -mtriple=amdgcn-amd- -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX8 %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX8 %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; RUN: llc -mtriple=amdgcn-amd- -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX9 %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX9 %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 declare i32 @llvm.amdgcn.workitem.id.x()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; GCN-LABEL: {{^}}system_unordered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 define amdgpu_kernel void @system_unordered(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 store atomic i32 %in, i32 addrspace(4)* %out unordered, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ; GCN-LABEL: {{^}}system_monotonic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 define amdgpu_kernel void @system_monotonic(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 store atomic i32 %in, i32 addrspace(4)* %out monotonic, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 ; GCN-LABEL: {{^}}system_release
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 ; GCN: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 ; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 define amdgpu_kernel void @system_release(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 store atomic i32 %in, i32 addrspace(4)* %out release, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 ; GCN-LABEL: {{^}}system_seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 ; GCN: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 ; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 define amdgpu_kernel void @system_seq_cst(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 store atomic i32 %in, i32 addrspace(4)* %out seq_cst, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 ; GCN-LABEL: {{^}}singlethread_unordered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 define amdgpu_kernel void @singlethread_unordered(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 store atomic i32 %in, i32 addrspace(4)* %out syncscope("singlethread") unordered, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 ; GCN-LABEL: {{^}}singlethread_monotonic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 define amdgpu_kernel void @singlethread_monotonic(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 store atomic i32 %in, i32 addrspace(4)* %out syncscope("singlethread") monotonic, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 ; GCN-LABEL: {{^}}singlethread_release
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 define amdgpu_kernel void @singlethread_release(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74 store atomic i32 %in, i32 addrspace(4)* %out syncscope("singlethread") release, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78 ; GCN-LABEL: {{^}}singlethread_seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81 define amdgpu_kernel void @singlethread_seq_cst(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 store atomic i32 %in, i32 addrspace(4)* %out syncscope("singlethread") seq_cst, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
85 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
86 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
87
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
88 ; GCN-LABEL: {{^}}agent_unordered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
89 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
90 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
91 define amdgpu_kernel void @agent_unordered(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
92 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
93 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
94 store atomic i32 %in, i32 addrspace(4)* %out syncscope("agent") unordered, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
95 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
96 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
97
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
98 ; GCN-LABEL: {{^}}agent_monotonic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
99 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
100 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
101 define amdgpu_kernel void @agent_monotonic(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
102 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
103 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
104 store atomic i32 %in, i32 addrspace(4)* %out syncscope("agent") monotonic, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
105 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
106 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
107
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
108 ; GCN-LABEL: {{^}}agent_release
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
109 ; GCN: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
110 ; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
111 define amdgpu_kernel void @agent_release(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
112 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
113 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
114 store atomic i32 %in, i32 addrspace(4)* %out syncscope("agent") release, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
115 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
116 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
117
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
118 ; GCN-LABEL: {{^}}agent_seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
119 ; GCN: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
120 ; GCN-NEXT: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
121 define amdgpu_kernel void @agent_seq_cst(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
122 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
123 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
124 store atomic i32 %in, i32 addrspace(4)* %out syncscope("agent") seq_cst, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
125 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
126 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
127
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
128 ; GCN-LABEL: {{^}}workgroup_unordered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
129 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
130 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
131 define amdgpu_kernel void @workgroup_unordered(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
132 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
133 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
134 store atomic i32 %in, i32 addrspace(4)* %out syncscope("workgroup") unordered, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
135 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
136 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
137
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
138 ; GCN-LABEL: {{^}}workgroup_monotonic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
139 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
140 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
141 define amdgpu_kernel void @workgroup_monotonic(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
142 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
143 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
144 store atomic i32 %in, i32 addrspace(4)* %out syncscope("workgroup") monotonic, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
145 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
146 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
147
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
148 ; GCN-LABEL: {{^}}workgroup_release
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
149 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
150 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
151 define amdgpu_kernel void @workgroup_release(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
152 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
153 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
154 store atomic i32 %in, i32 addrspace(4)* %out syncscope("workgroup") release, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
155 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
156 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
157
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
158 ; GCN-LABEL: {{^}}workgroup_seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
159 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
160 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
161 define amdgpu_kernel void @workgroup_seq_cst(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
162 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
163 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
164 store atomic i32 %in, i32 addrspace(4)* %out syncscope("workgroup") seq_cst, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
165 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
166 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
167
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
168 ; GCN-LABEL: {{^}}wavefront_unordered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
169 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
170 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
171 define amdgpu_kernel void @wavefront_unordered(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
172 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
173 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
174 store atomic i32 %in, i32 addrspace(4)* %out syncscope("wavefront") unordered, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
175 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
176 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
177
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
178 ; GCN-LABEL: {{^}}wavefront_monotonic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
179 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
180 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
181 define amdgpu_kernel void @wavefront_monotonic(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
182 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
183 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
184 store atomic i32 %in, i32 addrspace(4)* %out syncscope("wavefront") monotonic, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
185 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
186 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
187
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
188 ; GCN-LABEL: {{^}}wavefront_release
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
189 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
190 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
191 define amdgpu_kernel void @wavefront_release(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
192 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
193 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
194 store atomic i32 %in, i32 addrspace(4)* %out syncscope("wavefront") release, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
195 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
196 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
197
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
198 ; GCN-LABEL: {{^}}wavefront_seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
199 ; GCN-NOT: s_waitcnt vmcnt(0){{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
200 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], {{v[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
201 define amdgpu_kernel void @wavefront_seq_cst(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
202 i32 %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
203 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
204 store atomic i32 %in, i32 addrspace(4)* %out syncscope("wavefront") seq_cst, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
205 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
206 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
207
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
208 ; GCN-LABEL: {{^}}nontemporal_private_0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
209 ; GCN: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], s{{[0-9]+}} offen glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
210 define amdgpu_kernel void @nontemporal_private_0(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
211 i32 addrspace(4)* %in, i32* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
212 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
213 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
214 store i32 %val, i32* %out, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
215 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
216 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
217
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
218 ; GCN-LABEL: {{^}}nontemporal_private_1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
219 ; GCN: buffer_store_dword v{{[0-9]+}}, v{{[0-9]+}}, s[{{[0-9]+}}:{{[0-9]+}}], s{{[0-9]+}} offen glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
220 define amdgpu_kernel void @nontemporal_private_1(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
221 i32 addrspace(4)* %in, i32* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
222 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
223 %tid = call i32 @llvm.amdgcn.workitem.id.x()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
224 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
225 %out.gep = getelementptr inbounds i32, i32* %out, i32 %tid
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
226 store i32 %val, i32* %out.gep, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
227 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
228 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
229
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
230 ; GCN-LABEL: {{^}}nontemporal_global_0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
231 ; GFX8: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
232 ; GFX9: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, off glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
233 define amdgpu_kernel void @nontemporal_global_0(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
234 i32 addrspace(4)* %in, i32 addrspace(1)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
235 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
236 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
237 store i32 %val, i32 addrspace(1)* %out, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
238 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
239 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
240
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
241 ; GCN-LABEL: {{^}}nontemporal_global_1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
242 ; GFX8: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
243 ; GFX9: global_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, off glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
244 define amdgpu_kernel void @nontemporal_global_1(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
245 i32 addrspace(4)* %in, i32 addrspace(1)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
246 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
247 %tid = call i32 @llvm.amdgcn.workitem.id.x()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
248 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
249 %out.gep = getelementptr inbounds i32, i32 addrspace(1)* %out, i32 %tid
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
250 store i32 %val, i32 addrspace(1)* %out.gep, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
251 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
252 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
253
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
254 ; GCN-LABEL: {{^}}nontemporal_local_0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
255 ; GCN: ds_write_b32 v{{[0-9]+}}, v{{[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
256 define amdgpu_kernel void @nontemporal_local_0(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
257 i32 addrspace(4)* %in, i32 addrspace(3)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
258 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
259 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
260 store i32 %val, i32 addrspace(3)* %out, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
261 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
262 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
263
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
264 ; GCN-LABEL: {{^}}nontemporal_local_1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
265 ; GCN: ds_write_b32 v{{[0-9]+}}, v{{[0-9]+}}{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
266 define amdgpu_kernel void @nontemporal_local_1(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
267 i32 addrspace(4)* %in, i32 addrspace(3)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
268 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
269 %tid = call i32 @llvm.amdgcn.workitem.id.x()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
270 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
271 %out.gep = getelementptr inbounds i32, i32 addrspace(3)* %out, i32 %tid
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
272 store i32 %val, i32 addrspace(3)* %out.gep, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
273 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
274 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
275
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
276 ; GCN-LABEL: {{^}}nontemporal_flat_0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
277 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
278 define amdgpu_kernel void @nontemporal_flat_0(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
279 i32 addrspace(4)* %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
280 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
281 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
282 store i32 %val, i32 addrspace(4)* %out, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
283 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
284 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
285
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
286 ; GCN-LABEL: {{^}}nontemporal_flat_1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
287 ; GCN: flat_store_dword v[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}} glc slc{{$}}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
288 define amdgpu_kernel void @nontemporal_flat_1(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
289 i32 addrspace(4)* %in, i32 addrspace(4)* %out) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
290 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
291 %tid = call i32 @llvm.amdgcn.workitem.id.x()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
292 %val = load i32, i32 addrspace(4)* %in, align 4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
293 %out.gep = getelementptr inbounds i32, i32 addrspace(4)* %out, i32 %tid
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
294 store i32 %val, i32 addrspace(4)* %out.gep, !nontemporal !0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
295 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
296 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
297
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
298 !0 = !{i32 1}