1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=amdgcn- -mcpu=gfx900 -amdgpu-dpp-combine=false -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-O0 %s
3 ; RUN: llc -mtriple=amdgcn- -mcpu=gfx900 -amdgpu-dpp-combine=false -verify-machineinstrs < %s | FileCheck -check-prefix=GFX9-O3 %s
5 define amdgpu_gfx void @strict_wwm_no_cfg(ptr addrspace(8) inreg %tmp14) {
6 ; GFX9-O0-LABEL: strict_wwm_no_cfg:
8 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
10 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill
11 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
12 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
13 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
14 ; GFX9-O0-NEXT: s_mov_b32 s40, s6
15 ; GFX9-O0-NEXT: s_mov_b32 s34, s4
16 ; GFX9-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41
17 ; GFX9-O0-NEXT: s_mov_b32 s41, s7
18 ; GFX9-O0-NEXT: s_mov_b32 s42, s41
19 ; GFX9-O0-NEXT: s_mov_b32 s43, s40
20 ; GFX9-O0-NEXT: ; kill: def $sgpr34 killed $sgpr34 def $sgpr34_sgpr35
21 ; GFX9-O0-NEXT: s_mov_b32 s35, s5
22 ; GFX9-O0-NEXT: s_mov_b32 s44, s35
23 ; GFX9-O0-NEXT: s_mov_b32 s36, s34
24 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39
25 ; GFX9-O0-NEXT: s_mov_b32 s37, s44
26 ; GFX9-O0-NEXT: s_mov_b32 s38, s43
27 ; GFX9-O0-NEXT: s_mov_b32 s39, s42
28 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
29 ; GFX9-O0-NEXT: buffer_load_dwordx2 v[5:6], off, s[36:39], s34
30 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
31 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v5
32 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v6
33 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v4
34 ; GFX9-O0-NEXT: s_not_b64 exec, exec
35 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, s34
36 ; GFX9-O0-NEXT: s_not_b64 exec, exec
37 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v3
38 ; GFX9-O0-NEXT: s_not_b64 exec, exec
39 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s34
40 ; GFX9-O0-NEXT: s_not_b64 exec, exec
41 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[40:41], -1
42 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s34
43 ; GFX9-O0-NEXT: s_nop 1
44 ; GFX9-O0-NEXT: v_mov_b32_dpp v2, v0 row_bcast:31 row_mask:0xc bank_mask:0xf
45 ; GFX9-O0-NEXT: v_add_u32_e64 v0, v0, v2
46 ; GFX9-O0-NEXT: s_mov_b64 exec, s[40:41]
47 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v0
48 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[40:41], -1
49 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, s34
50 ; GFX9-O0-NEXT: s_nop 1
51 ; GFX9-O0-NEXT: v_mov_b32_dpp v0, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
52 ; GFX9-O0-NEXT: v_add_u32_e64 v0, v1, v0
53 ; GFX9-O0-NEXT: s_mov_b64 exec, s[40:41]
54 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v0
55 ; GFX9-O0-NEXT: v_cmp_eq_u32_e64 s[40:41], v3, v4
56 ; GFX9-O0-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[40:41]
57 ; GFX9-O0-NEXT: s_mov_b32 s35, 1
58 ; GFX9-O0-NEXT: v_lshlrev_b32_e64 v3, s35, v3
59 ; GFX9-O0-NEXT: s_mov_b32 s35, 2
60 ; GFX9-O0-NEXT: v_and_b32_e64 v3, v3, s35
61 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[36:39], s34 offset:4
62 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
63 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload
64 ; GFX9-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
65 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
66 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
67 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
68 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
70 ; GFX9-O3-LABEL: strict_wwm_no_cfg:
72 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
73 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
74 ; GFX9-O3-NEXT: buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill
75 ; GFX9-O3-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
76 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
77 ; GFX9-O3-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
78 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
79 ; GFX9-O3-NEXT: buffer_load_dwordx2 v[4:5], off, s[4:7], 0
80 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
81 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, 0
82 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, 0
83 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
84 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
85 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, v4
86 ; GFX9-O3-NEXT: s_not_b64 exec, exec
87 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, 0
88 ; GFX9-O3-NEXT: s_not_b64 exec, exec
89 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, v5
90 ; GFX9-O3-NEXT: s_not_b64 exec, exec
91 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, 0
92 ; GFX9-O3-NEXT: s_not_b64 exec, exec
93 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
94 ; GFX9-O3-NEXT: v_mov_b32_dpp v1, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
95 ; GFX9-O3-NEXT: v_mov_b32_dpp v0, v3 row_bcast:31 row_mask:0xc bank_mask:0xf
96 ; GFX9-O3-NEXT: v_add_u32_e32 v1, v2, v1
97 ; GFX9-O3-NEXT: v_add_u32_e32 v0, v3, v0
98 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
99 ; GFX9-O3-NEXT: v_mov_b32_e32 v4, v1
100 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, v0
101 ; GFX9-O3-NEXT: v_cmp_eq_u32_e32 vcc, v4, v5
102 ; GFX9-O3-NEXT: v_cndmask_b32_e64 v4, 0, 1, vcc
103 ; GFX9-O3-NEXT: v_lshlrev_b32_e32 v4, 1, v4
104 ; GFX9-O3-NEXT: v_and_b32_e32 v4, 2, v4
105 ; GFX9-O3-NEXT: buffer_store_dword v4, off, s[4:7], 0 offset:4
106 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
107 ; GFX9-O3-NEXT: buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload
108 ; GFX9-O3-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
109 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
110 ; GFX9-O3-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
111 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
112 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
113 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
114 %tmp100 = call <2 x float> @llvm.amdgcn.raw.ptr.buffer.load.v2f32(ptr addrspace(8) %tmp14, i32 0, i32 0, i32 0)
115 %tmp101 = bitcast <2 x float> %tmp100 to <2 x i32>
116 %tmp102 = extractelement <2 x i32> %tmp101, i32 0
117 %tmp103 = extractelement <2 x i32> %tmp101, i32 1
118 %tmp105 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 %tmp102, i32 0)
119 %tmp107 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 %tmp103, i32 0)
122 %tmp120 = tail call i32 @llvm.amdgcn.update.dpp.i32(i32 0, i32 %tmp105, i32 323, i32 12, i32 15, i1 false)
123 %tmp121 = add i32 %tmp105, %tmp120
124 %tmp122 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp121)
126 %tmp135 = tail call i32 @llvm.amdgcn.update.dpp.i32(i32 0, i32 %tmp107, i32 323, i32 12, i32 15, i1 false)
127 %tmp136 = add i32 %tmp107, %tmp135
128 %tmp137 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp136)
130 %tmp138 = icmp eq i32 %tmp122, %tmp137
131 %tmp139 = sext i1 %tmp138 to i32
132 %tmp140 = shl nsw i32 %tmp139, 1
133 %tmp141 = and i32 %tmp140, 2
134 %tmp145 = bitcast i32 %tmp141 to float
135 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %tmp145, ptr addrspace(8) %tmp14, i32 4, i32 0, i32 0)
139 define amdgpu_gfx void @strict_wwm_cfg(ptr addrspace(8) inreg %tmp14, i32 %arg) {
140 ; GFX9-O0-LABEL: strict_wwm_cfg:
141 ; GFX9-O0: ; %bb.0: ; %entry
142 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
143 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
144 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
145 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
146 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
147 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
148 ; GFX9-O0-NEXT: ; implicit-def: $vgpr3 : SGPR spill to VGPR lane
149 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v0
150 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
151 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload
152 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
153 ; GFX9-O0-NEXT: s_mov_b32 s40, s6
154 ; GFX9-O0-NEXT: s_mov_b32 s34, s4
155 ; GFX9-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41
156 ; GFX9-O0-NEXT: s_mov_b32 s41, s7
157 ; GFX9-O0-NEXT: s_mov_b32 s42, s41
158 ; GFX9-O0-NEXT: s_mov_b32 s43, s40
159 ; GFX9-O0-NEXT: ; kill: def $sgpr34 killed $sgpr34 def $sgpr34_sgpr35
160 ; GFX9-O0-NEXT: s_mov_b32 s35, s5
161 ; GFX9-O0-NEXT: s_mov_b32 s44, s35
162 ; GFX9-O0-NEXT: s_mov_b32 s36, s34
163 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39
164 ; GFX9-O0-NEXT: s_mov_b32 s37, s44
165 ; GFX9-O0-NEXT: s_mov_b32 s38, s43
166 ; GFX9-O0-NEXT: s_mov_b32 s39, s42
167 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
168 ; GFX9-O0-NEXT: v_writelane_b32 v0, s40, 0
169 ; GFX9-O0-NEXT: v_writelane_b32 v0, s41, 1
170 ; GFX9-O0-NEXT: v_writelane_b32 v0, s34, 2
171 ; GFX9-O0-NEXT: v_writelane_b32 v0, s35, 3
172 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
173 ; GFX9-O0-NEXT: s_nop 2
174 ; GFX9-O0-NEXT: buffer_load_dwordx2 v[4:5], off, s[36:39], s34
175 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
176 ; GFX9-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
177 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
178 ; GFX9-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
179 ; GFX9-O0-NEXT: ; implicit-def: $sgpr36_sgpr37
180 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v4
181 ; GFX9-O0-NEXT: s_not_b64 exec, exec
182 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s34
183 ; GFX9-O0-NEXT: s_not_b64 exec, exec
184 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[36:37], -1
185 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s34
186 ; GFX9-O0-NEXT: s_nop 1
187 ; GFX9-O0-NEXT: v_mov_b32_dpp v2, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
188 ; GFX9-O0-NEXT: v_add_u32_e64 v1, v1, v2
189 ; GFX9-O0-NEXT: s_mov_b64 exec, s[36:37]
190 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v1
191 ; GFX9-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
192 ; GFX9-O0-NEXT: v_cmp_eq_u32_e64 s[36:37], v3, s34
193 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, s34
194 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
195 ; GFX9-O0-NEXT: s_mov_b64 s[34:35], exec
196 ; GFX9-O0-NEXT: v_writelane_b32 v0, s34, 4
197 ; GFX9-O0-NEXT: v_writelane_b32 v0, s35, 5
198 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
199 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill
200 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
201 ; GFX9-O0-NEXT: s_and_b64 s[34:35], s[34:35], s[36:37]
202 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
203 ; GFX9-O0-NEXT: s_cbranch_execz .LBB1_2
204 ; GFX9-O0-NEXT: ; %bb.1: ; %if
205 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
206 ; GFX9-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
207 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
208 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v4
209 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[34:35], -1
210 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, 0
211 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
212 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v0
213 ; GFX9-O0-NEXT: s_not_b64 exec, exec
214 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v1
215 ; GFX9-O0-NEXT: s_not_b64 exec, exec
216 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[34:35], -1
217 ; GFX9-O0-NEXT: v_mov_b32_dpp v1, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
218 ; GFX9-O0-NEXT: v_add_u32_e64 v1, v2, v1
219 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
220 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v1
221 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
222 ; GFX9-O0-NEXT: .LBB1_2: ; %merge
223 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
224 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload
225 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
226 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
227 ; GFX9-O0-NEXT: v_readlane_b32 s36, v0, 4
228 ; GFX9-O0-NEXT: v_readlane_b32 s37, v0, 5
229 ; GFX9-O0-NEXT: s_or_b64 exec, exec, s[36:37]
230 ; GFX9-O0-NEXT: v_readlane_b32 s38, v0, 0
231 ; GFX9-O0-NEXT: v_readlane_b32 s39, v0, 1
232 ; GFX9-O0-NEXT: v_readlane_b32 s34, v0, 2
233 ; GFX9-O0-NEXT: v_readlane_b32 s35, v0, 3
234 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
235 ; GFX9-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
236 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
237 ; GFX9-O0-NEXT: v_cmp_eq_u32_e64 s[36:37], v3, v4
238 ; GFX9-O0-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[36:37]
239 ; GFX9-O0-NEXT: s_mov_b32 s36, 1
240 ; GFX9-O0-NEXT: v_lshlrev_b32_e64 v3, s36, v3
241 ; GFX9-O0-NEXT: s_mov_b32 s36, 2
242 ; GFX9-O0-NEXT: v_and_b32_e64 v3, v3, s36
243 ; GFX9-O0-NEXT: s_mov_b32 s40, s35
244 ; GFX9-O0-NEXT: s_mov_b32 s36, s34
245 ; GFX9-O0-NEXT: s_mov_b32 s34, s39
246 ; GFX9-O0-NEXT: s_mov_b32 s35, s38
247 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39
248 ; GFX9-O0-NEXT: s_mov_b32 s37, s40
249 ; GFX9-O0-NEXT: s_mov_b32 s38, s35
250 ; GFX9-O0-NEXT: s_mov_b32 s39, s34
251 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
252 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[36:39], s34 offset:4
253 ; GFX9-O0-NEXT: ; kill: killed $vgpr0
254 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
255 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
256 ; GFX9-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
257 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
258 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
259 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
260 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
262 ; GFX9-O3-LABEL: strict_wwm_cfg:
263 ; GFX9-O3: ; %bb.0: ; %entry
264 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
265 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
266 ; GFX9-O3-NEXT: buffer_store_dword v1, off, s[0:3], s32 ; 4-byte Folded Spill
267 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
268 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
269 ; GFX9-O3-NEXT: buffer_load_dwordx2 v[3:4], off, s[4:7], 0
270 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, 0
271 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
272 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, 0
273 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
274 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
275 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, v3
276 ; GFX9-O3-NEXT: s_not_b64 exec, exec
277 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, 0
278 ; GFX9-O3-NEXT: s_not_b64 exec, exec
279 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
280 ; GFX9-O3-NEXT: v_mov_b32_dpp v1, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
281 ; GFX9-O3-NEXT: v_add_u32_e32 v1, v2, v1
282 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
283 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, v1
284 ; GFX9-O3-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
285 ; GFX9-O3-NEXT: s_and_saveexec_b64 s[34:35], vcc
286 ; GFX9-O3-NEXT: s_cbranch_execz .LBB1_2
287 ; GFX9-O3-NEXT: ; %bb.1: ; %if
288 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[36:37], -1
289 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, 0
290 ; GFX9-O3-NEXT: s_mov_b64 exec, s[36:37]
291 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, v4
292 ; GFX9-O3-NEXT: s_not_b64 exec, exec
293 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, 0
294 ; GFX9-O3-NEXT: s_not_b64 exec, exec
295 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[36:37], -1
296 ; GFX9-O3-NEXT: v_mov_b32_dpp v1, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
297 ; GFX9-O3-NEXT: v_add_u32_e32 v1, v2, v1
298 ; GFX9-O3-NEXT: s_mov_b64 exec, s[36:37]
299 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, v1
300 ; GFX9-O3-NEXT: .LBB1_2: ; %merge
301 ; GFX9-O3-NEXT: s_or_b64 exec, exec, s[34:35]
302 ; GFX9-O3-NEXT: v_cmp_eq_u32_e32 vcc, v3, v5
303 ; GFX9-O3-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
304 ; GFX9-O3-NEXT: v_lshlrev_b32_e32 v0, 1, v0
305 ; GFX9-O3-NEXT: v_and_b32_e32 v0, 2, v0
306 ; GFX9-O3-NEXT: buffer_store_dword v0, off, s[4:7], 0 offset:4
307 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
308 ; GFX9-O3-NEXT: buffer_load_dword v1, off, s[0:3], s32 ; 4-byte Folded Reload
309 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
310 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
311 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
312 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
314 %tmp100 = call <2 x float> @llvm.amdgcn.raw.ptr.buffer.load.v2f32(ptr addrspace(8) %tmp14, i32 0, i32 0, i32 0)
315 %tmp101 = bitcast <2 x float> %tmp100 to <2 x i32>
316 %tmp102 = extractelement <2 x i32> %tmp101, i32 0
317 %tmp105 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 %tmp102, i32 0)
319 %tmp120 = tail call i32 @llvm.amdgcn.update.dpp.i32(i32 0, i32 %tmp105, i32 323, i32 12, i32 15, i1 false)
320 %tmp121 = add i32 %tmp105, %tmp120
321 %tmp122 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp121)
323 %cond = icmp eq i32 %arg, 0
324 br i1 %cond, label %if, label %merge
326 %tmp103 = extractelement <2 x i32> %tmp101, i32 1
327 %tmp107 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 %tmp103, i32 0)
329 %tmp135 = tail call i32 @llvm.amdgcn.update.dpp.i32(i32 0, i32 %tmp107, i32 323, i32 12, i32 15, i1 false)
330 %tmp136 = add i32 %tmp107, %tmp135
331 %tmp137 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp136)
335 %merge_value = phi i32 [ 0, %entry ], [%tmp137, %if ]
336 %tmp138 = icmp eq i32 %tmp122, %merge_value
337 %tmp139 = sext i1 %tmp138 to i32
338 %tmp140 = shl nsw i32 %tmp139, 1
339 %tmp141 = and i32 %tmp140, 2
340 %tmp145 = bitcast i32 %tmp141 to float
341 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %tmp145, ptr addrspace(8) %tmp14, i32 4, i32 0, i32 0)
345 define hidden amdgpu_gfx i32 @strict_wwm_called(i32 %a) noinline {
346 ; GFX9-O0-LABEL: strict_wwm_called:
348 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
349 ; GFX9-O0-NEXT: v_add_u32_e64 v1, v0, v0
350 ; GFX9-O0-NEXT: v_mul_lo_u32 v0, v1, v0
351 ; GFX9-O0-NEXT: v_sub_u32_e64 v0, v0, v1
352 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
354 ; GFX9-O3-LABEL: strict_wwm_called:
356 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
357 ; GFX9-O3-NEXT: v_add_u32_e32 v1, v0, v0
358 ; GFX9-O3-NEXT: v_mul_lo_u32 v0, v1, v0
359 ; GFX9-O3-NEXT: v_sub_u32_e32 v0, v0, v1
360 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
361 %add = add i32 %a, %a
362 %mul = mul i32 %add, %a
363 %sub = sub i32 %mul, %add
367 define amdgpu_gfx void @strict_wwm_call(ptr addrspace(8) inreg %tmp14, i32 inreg %arg) {
368 ; GFX9-O0-LABEL: strict_wwm_call:
370 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
371 ; GFX9-O0-NEXT: s_mov_b32 s48, s33
372 ; GFX9-O0-NEXT: s_mov_b32 s33, s32
373 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
374 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s33 ; 4-byte Folded Spill
375 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
376 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
377 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
378 ; GFX9-O0-NEXT: s_add_i32 s32, s32, 0x400
379 ; GFX9-O0-NEXT: v_writelane_b32 v3, s30, 0
380 ; GFX9-O0-NEXT: v_writelane_b32 v3, s31, 1
381 ; GFX9-O0-NEXT: s_mov_b32 s40, s6
382 ; GFX9-O0-NEXT: s_mov_b32 s34, s4
383 ; GFX9-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41
384 ; GFX9-O0-NEXT: s_mov_b32 s41, s7
385 ; GFX9-O0-NEXT: s_mov_b32 s42, s41
386 ; GFX9-O0-NEXT: s_mov_b32 s43, s40
387 ; GFX9-O0-NEXT: ; kill: def $sgpr34 killed $sgpr34 def $sgpr34_sgpr35
388 ; GFX9-O0-NEXT: s_mov_b32 s35, s5
389 ; GFX9-O0-NEXT: s_mov_b32 s44, s35
390 ; GFX9-O0-NEXT: s_mov_b32 s36, s34
391 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39
392 ; GFX9-O0-NEXT: s_mov_b32 s37, s44
393 ; GFX9-O0-NEXT: s_mov_b32 s38, s43
394 ; GFX9-O0-NEXT: s_mov_b32 s39, s42
395 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
396 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s8
397 ; GFX9-O0-NEXT: s_not_b64 exec, exec
398 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s34
399 ; GFX9-O0-NEXT: s_not_b64 exec, exec
400 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[40:41], -1
401 ; GFX9-O0-NEXT: s_getpc_b64 s[42:43]
402 ; GFX9-O0-NEXT: s_add_u32 s42, s42, strict_wwm_called@rel32@lo+4
403 ; GFX9-O0-NEXT: s_addc_u32 s43, s43, strict_wwm_called@rel32@hi+12
404 ; GFX9-O0-NEXT: s_mov_b64 s[46:47], s[2:3]
405 ; GFX9-O0-NEXT: s_mov_b64 s[44:45], s[0:1]
406 ; GFX9-O0-NEXT: s_mov_b64 s[0:1], s[44:45]
407 ; GFX9-O0-NEXT: s_mov_b64 s[2:3], s[46:47]
408 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v2
409 ; GFX9-O0-NEXT: s_swappc_b64 s[30:31], s[42:43]
410 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v0
411 ; GFX9-O0-NEXT: v_add_u32_e64 v1, v1, v2
412 ; GFX9-O0-NEXT: s_mov_b64 exec, s[40:41]
413 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v1
414 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[36:39], s34 offset:4
415 ; GFX9-O0-NEXT: v_readlane_b32 s31, v3, 1
416 ; GFX9-O0-NEXT: v_readlane_b32 s30, v3, 0
417 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
418 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s33 ; 4-byte Folded Reload
419 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
420 ; GFX9-O0-NEXT: buffer_load_dword v1, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
421 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
422 ; GFX9-O0-NEXT: s_add_i32 s32, s32, 0xfffffc00
423 ; GFX9-O0-NEXT: s_mov_b32 s33, s48
424 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
425 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
427 ; GFX9-O3-LABEL: strict_wwm_call:
429 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
430 ; GFX9-O3-NEXT: s_mov_b32 s38, s33
431 ; GFX9-O3-NEXT: s_mov_b32 s33, s32
432 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
433 ; GFX9-O3-NEXT: buffer_store_dword v3, off, s[0:3], s33 ; 4-byte Folded Spill
434 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
435 ; GFX9-O3-NEXT: buffer_store_dword v1, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
436 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
437 ; GFX9-O3-NEXT: v_writelane_b32 v3, s30, 0
438 ; GFX9-O3-NEXT: s_addk_i32 s32, 0x400
439 ; GFX9-O3-NEXT: v_writelane_b32 v3, s31, 1
440 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, s8
441 ; GFX9-O3-NEXT: s_not_b64 exec, exec
442 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, 0
443 ; GFX9-O3-NEXT: s_not_b64 exec, exec
444 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
445 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, v2
446 ; GFX9-O3-NEXT: s_getpc_b64 s[36:37]
447 ; GFX9-O3-NEXT: s_add_u32 s36, s36, strict_wwm_called@rel32@lo+4
448 ; GFX9-O3-NEXT: s_addc_u32 s37, s37, strict_wwm_called@rel32@hi+12
449 ; GFX9-O3-NEXT: s_swappc_b64 s[30:31], s[36:37]
450 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, v0
451 ; GFX9-O3-NEXT: v_add_u32_e32 v1, v1, v2
452 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
453 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, v1
454 ; GFX9-O3-NEXT: buffer_store_dword v0, off, s[4:7], 0 offset:4
455 ; GFX9-O3-NEXT: v_readlane_b32 s31, v3, 1
456 ; GFX9-O3-NEXT: v_readlane_b32 s30, v3, 0
457 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
458 ; GFX9-O3-NEXT: buffer_load_dword v3, off, s[0:3], s33 ; 4-byte Folded Reload
459 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
460 ; GFX9-O3-NEXT: buffer_load_dword v1, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
461 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
462 ; GFX9-O3-NEXT: s_addk_i32 s32, 0xfc00
463 ; GFX9-O3-NEXT: s_mov_b32 s33, s38
464 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
465 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
466 %tmp107 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 %arg, i32 0)
467 %tmp134 = call amdgpu_gfx i32 @strict_wwm_called(i32 %tmp107)
468 %tmp136 = add i32 %tmp134, %tmp107
469 %tmp137 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp136)
470 call void @llvm.amdgcn.raw.ptr.buffer.store.i32(i32 %tmp137, ptr addrspace(8) %tmp14, i32 4, i32 0, i32 0)
474 define amdgpu_gfx i64 @strict_wwm_called_i64(i64 %a) noinline {
475 ; GFX9-O0-LABEL: strict_wwm_called_i64:
477 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
478 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v0
479 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
480 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
481 ; GFX9-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
482 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v1
483 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
484 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v2
485 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v2
486 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v3
487 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v3
488 ; GFX9-O0-NEXT: v_add_co_u32_e64 v4, s[34:35], v4, v5
489 ; GFX9-O0-NEXT: v_addc_co_u32_e64 v0, s[34:35], v0, v1, s[34:35]
490 ; GFX9-O0-NEXT: ; kill: def $vgpr4 killed $vgpr4 def $vgpr4_vgpr5 killed $exec
491 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v0
492 ; GFX9-O0-NEXT: s_mov_b32 s34, 32
493 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v2
494 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v3
495 ; GFX9-O0-NEXT: v_lshrrev_b64 v[0:1], s34, v[0:1]
496 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v0
497 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v4
498 ; GFX9-O0-NEXT: v_mul_lo_u32 v1, v0, v1
499 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v2
500 ; GFX9-O0-NEXT: v_lshrrev_b64 v[6:7], s34, v[4:5]
501 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v6
502 ; GFX9-O0-NEXT: v_mul_lo_u32 v2, v2, v3
503 ; GFX9-O0-NEXT: v_mad_u64_u32 v[6:7], s[36:37], v0, v3, 0
504 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v7
505 ; GFX9-O0-NEXT: v_add3_u32 v0, v0, v1, v2
506 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
507 ; GFX9-O0-NEXT: ; implicit-def: $sgpr36
508 ; GFX9-O0-NEXT: ; implicit-def: $sgpr36
509 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s35
510 ; GFX9-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1 killed $exec
511 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v2
512 ; GFX9-O0-NEXT: v_lshlrev_b64 v[1:2], s34, v[0:1]
513 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v2
514 ; GFX9-O0-NEXT: ; kill: def $vgpr6 killed $vgpr6 killed $vgpr6_vgpr7 killed $exec
515 ; GFX9-O0-NEXT: s_mov_b32 s35, 0
516 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
517 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, 0
518 ; GFX9-O0-NEXT: ; kill: def $vgpr6 killed $vgpr6 def $vgpr6_vgpr7 killed $exec
519 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v0
520 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v7
521 ; GFX9-O0-NEXT: v_or_b32_e64 v0, v0, v3
522 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v1
523 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v6
524 ; GFX9-O0-NEXT: v_or_b32_e64 v6, v1, v2
525 ; GFX9-O0-NEXT: ; kill: def $vgpr6 killed $vgpr6 def $vgpr6_vgpr7 killed $exec
526 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v0
527 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v6
528 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v4
529 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v7
530 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v5
531 ; GFX9-O0-NEXT: v_sub_co_u32_e64 v1, s[36:37], v1, v3
532 ; GFX9-O0-NEXT: v_subb_co_u32_e64 v0, s[36:37], v0, v2, s[36:37]
533 ; GFX9-O0-NEXT: ; kill: def $vgpr1 killed $vgpr1 def $vgpr1_vgpr2 killed $exec
534 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v0
535 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v1
536 ; GFX9-O0-NEXT: v_lshrrev_b64 v[1:2], s34, v[1:2]
537 ; GFX9-O0-NEXT: ; kill: def $vgpr1 killed $vgpr1 killed $vgpr1_vgpr2 killed $exec
538 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
540 ; GFX9-O3-LABEL: strict_wwm_called_i64:
542 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
543 ; GFX9-O3-NEXT: v_add_co_u32_e32 v2, vcc, v0, v0
544 ; GFX9-O3-NEXT: v_addc_co_u32_e32 v3, vcc, v1, v1, vcc
545 ; GFX9-O3-NEXT: v_mul_lo_u32 v4, v3, v0
546 ; GFX9-O3-NEXT: v_mul_lo_u32 v5, v2, v1
547 ; GFX9-O3-NEXT: v_mad_u64_u32 v[0:1], s[34:35], v2, v0, 0
548 ; GFX9-O3-NEXT: v_add3_u32 v1, v1, v5, v4
549 ; GFX9-O3-NEXT: v_sub_co_u32_e32 v0, vcc, v0, v2
550 ; GFX9-O3-NEXT: v_subb_co_u32_e32 v1, vcc, v1, v3, vcc
551 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
552 %add = add i64 %a, %a
553 %mul = mul i64 %add, %a
554 %sub = sub i64 %mul, %add
558 define amdgpu_gfx void @strict_wwm_call_i64(ptr addrspace(8) inreg %tmp14, i64 inreg %arg) {
559 ; GFX9-O0-LABEL: strict_wwm_call_i64:
561 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
562 ; GFX9-O0-NEXT: s_mov_b32 s48, s33
563 ; GFX9-O0-NEXT: s_mov_b32 s33, s32
564 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
565 ; GFX9-O0-NEXT: buffer_store_dword v10, off, s[0:3], s33 ; 4-byte Folded Spill
566 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
567 ; GFX9-O0-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill
568 ; GFX9-O0-NEXT: buffer_store_dword v8, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill
569 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
570 ; GFX9-O0-NEXT: buffer_store_dword v9, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill
571 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:24 ; 4-byte Folded Spill
572 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:28 ; 4-byte Folded Spill
573 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
574 ; GFX9-O0-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:32 ; 4-byte Folded Spill
575 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:36 ; 4-byte Folded Spill
576 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:40 ; 4-byte Folded Spill
577 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
578 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:44 ; 4-byte Folded Spill
579 ; GFX9-O0-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:48 ; 4-byte Folded Spill
580 ; GFX9-O0-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:52 ; 4-byte Folded Spill
581 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
582 ; GFX9-O0-NEXT: s_add_i32 s32, s32, 0x1000
583 ; GFX9-O0-NEXT: ; implicit-def: $vgpr0 : SGPR spill to VGPR lane
584 ; GFX9-O0-NEXT: v_writelane_b32 v10, s30, 0
585 ; GFX9-O0-NEXT: v_writelane_b32 v10, s31, 1
586 ; GFX9-O0-NEXT: s_mov_b32 s34, s8
587 ; GFX9-O0-NEXT: s_mov_b32 s38, s6
588 ; GFX9-O0-NEXT: s_mov_b32 s36, s4
589 ; GFX9-O0-NEXT: ; kill: def $sgpr38 killed $sgpr38 def $sgpr38_sgpr39
590 ; GFX9-O0-NEXT: s_mov_b32 s39, s7
591 ; GFX9-O0-NEXT: s_mov_b32 s35, s39
592 ; GFX9-O0-NEXT: s_mov_b32 s44, s38
593 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37
594 ; GFX9-O0-NEXT: s_mov_b32 s37, s5
595 ; GFX9-O0-NEXT: s_mov_b32 s45, s37
596 ; GFX9-O0-NEXT: s_mov_b32 s40, s36
597 ; GFX9-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41_sgpr42_sgpr43
598 ; GFX9-O0-NEXT: s_mov_b32 s41, s45
599 ; GFX9-O0-NEXT: s_mov_b32 s42, s44
600 ; GFX9-O0-NEXT: s_mov_b32 s43, s35
601 ; GFX9-O0-NEXT: v_writelane_b32 v0, s40, 0
602 ; GFX9-O0-NEXT: v_writelane_b32 v0, s41, 1
603 ; GFX9-O0-NEXT: v_writelane_b32 v0, s42, 2
604 ; GFX9-O0-NEXT: v_writelane_b32 v0, s43, 3
605 ; GFX9-O0-NEXT: ; kill: def $sgpr34 killed $sgpr34 def $sgpr34_sgpr35
606 ; GFX9-O0-NEXT: s_mov_b32 s35, s9
607 ; GFX9-O0-NEXT: ; kill: def $sgpr36_sgpr37 killed $sgpr34_sgpr35
608 ; GFX9-O0-NEXT: s_mov_b64 s[36:37], 0
609 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, s34
610 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, s35
611 ; GFX9-O0-NEXT: s_not_b64 exec, exec
612 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, s36
613 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, s37
614 ; GFX9-O0-NEXT: s_not_b64 exec, exec
615 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[34:35], -1
616 ; GFX9-O0-NEXT: v_writelane_b32 v0, s34, 4
617 ; GFX9-O0-NEXT: v_writelane_b32 v0, s35, 5
618 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
619 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
620 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
621 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v8
622 ; GFX9-O0-NEXT: s_mov_b32 s34, 32
623 ; GFX9-O0-NEXT: ; implicit-def: $sgpr36_sgpr37
624 ; GFX9-O0-NEXT: v_lshrrev_b64 v[3:4], s34, v[8:9]
625 ; GFX9-O0-NEXT: s_getpc_b64 s[34:35]
626 ; GFX9-O0-NEXT: s_add_u32 s34, s34, strict_wwm_called_i64@gotpcrel32@lo+4
627 ; GFX9-O0-NEXT: s_addc_u32 s35, s35, strict_wwm_called_i64@gotpcrel32@hi+12
628 ; GFX9-O0-NEXT: s_load_dwordx2 s[34:35], s[34:35], 0x0
629 ; GFX9-O0-NEXT: s_mov_b64 s[38:39], s[2:3]
630 ; GFX9-O0-NEXT: s_mov_b64 s[36:37], s[0:1]
631 ; GFX9-O0-NEXT: s_mov_b64 s[0:1], s[36:37]
632 ; GFX9-O0-NEXT: s_mov_b64 s[2:3], s[38:39]
633 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v2
634 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v3
635 ; GFX9-O0-NEXT: s_waitcnt lgkmcnt(0)
636 ; GFX9-O0-NEXT: s_swappc_b64 s[30:31], s[34:35]
637 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
638 ; GFX9-O0-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
639 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
640 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
641 ; GFX9-O0-NEXT: v_readlane_b32 s34, v6, 4
642 ; GFX9-O0-NEXT: v_readlane_b32 s35, v6, 5
643 ; GFX9-O0-NEXT: v_readlane_b32 s36, v6, 0
644 ; GFX9-O0-NEXT: v_readlane_b32 s37, v6, 1
645 ; GFX9-O0-NEXT: v_readlane_b32 s38, v6, 2
646 ; GFX9-O0-NEXT: v_readlane_b32 s39, v6, 3
647 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v0
648 ; GFX9-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
649 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
650 ; GFX9-O0-NEXT: s_mov_b64 exec, s[46:47]
651 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v1
652 ; GFX9-O0-NEXT: ; implicit-def: $sgpr40
653 ; GFX9-O0-NEXT: ; implicit-def: $sgpr40
654 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v8
655 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v9
656 ; GFX9-O0-NEXT: v_add_co_u32_e64 v2, s[40:41], v2, v4
657 ; GFX9-O0-NEXT: v_addc_co_u32_e64 v3, s[40:41], v3, v5, s[40:41]
658 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
659 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v2
660 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v3
661 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
662 ; GFX9-O0-NEXT: buffer_store_dwordx2 v[6:7], off, s[36:39], s34 offset:4
663 ; GFX9-O0-NEXT: v_readlane_b32 s31, v10, 1
664 ; GFX9-O0-NEXT: v_readlane_b32 s30, v10, 0
665 ; GFX9-O0-NEXT: ; kill: killed $vgpr0
666 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
667 ; GFX9-O0-NEXT: buffer_load_dword v10, off, s[0:3], s33 ; 4-byte Folded Reload
668 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
669 ; GFX9-O0-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload
670 ; GFX9-O0-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload
671 ; GFX9-O0-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload
672 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:24 ; 4-byte Folded Reload
673 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:28 ; 4-byte Folded Reload
674 ; GFX9-O0-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:32 ; 4-byte Folded Reload
675 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:36 ; 4-byte Folded Reload
676 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:40 ; 4-byte Folded Reload
677 ; GFX9-O0-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:44 ; 4-byte Folded Reload
678 ; GFX9-O0-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:48 ; 4-byte Folded Reload
679 ; GFX9-O0-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:52 ; 4-byte Folded Reload
680 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
681 ; GFX9-O0-NEXT: s_add_i32 s32, s32, 0xfffff000
682 ; GFX9-O0-NEXT: s_mov_b32 s33, s48
683 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
684 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
686 ; GFX9-O3-LABEL: strict_wwm_call_i64:
688 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
689 ; GFX9-O3-NEXT: s_mov_b32 s40, s33
690 ; GFX9-O3-NEXT: s_mov_b32 s33, s32
691 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
692 ; GFX9-O3-NEXT: buffer_store_dword v8, off, s[0:3], s33 ; 4-byte Folded Spill
693 ; GFX9-O3-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
694 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
695 ; GFX9-O3-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
696 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill
697 ; GFX9-O3-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill
698 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill
699 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
700 ; GFX9-O3-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:24 ; 4-byte Folded Spill
701 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
702 ; GFX9-O3-NEXT: v_writelane_b32 v8, s30, 0
703 ; GFX9-O3-NEXT: s_addk_i32 s32, 0x800
704 ; GFX9-O3-NEXT: v_writelane_b32 v8, s31, 1
705 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[34:35], -1
706 ; GFX9-O3-NEXT: s_getpc_b64 s[36:37]
707 ; GFX9-O3-NEXT: s_add_u32 s36, s36, strict_wwm_called_i64@gotpcrel32@lo+4
708 ; GFX9-O3-NEXT: s_addc_u32 s37, s37, strict_wwm_called_i64@gotpcrel32@hi+12
709 ; GFX9-O3-NEXT: s_load_dwordx2 s[36:37], s[36:37], 0x0
710 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
711 ; GFX9-O3-NEXT: v_mov_b32_e32 v6, s8
712 ; GFX9-O3-NEXT: v_mov_b32_e32 v7, s9
713 ; GFX9-O3-NEXT: s_not_b64 exec, exec
714 ; GFX9-O3-NEXT: v_mov_b32_e32 v6, 0
715 ; GFX9-O3-NEXT: v_mov_b32_e32 v7, 0
716 ; GFX9-O3-NEXT: s_not_b64 exec, exec
717 ; GFX9-O3-NEXT: s_or_saveexec_b64 s[38:39], -1
718 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, v6
719 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, v7
720 ; GFX9-O3-NEXT: s_waitcnt lgkmcnt(0)
721 ; GFX9-O3-NEXT: s_swappc_b64 s[30:31], s[36:37]
722 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, v0
723 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, v1
724 ; GFX9-O3-NEXT: v_add_co_u32_e32 v2, vcc, v2, v6
725 ; GFX9-O3-NEXT: v_addc_co_u32_e32 v3, vcc, v3, v7, vcc
726 ; GFX9-O3-NEXT: s_mov_b64 exec, s[38:39]
727 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, v2
728 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, v3
729 ; GFX9-O3-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 offset:4
730 ; GFX9-O3-NEXT: v_readlane_b32 s31, v8, 1
731 ; GFX9-O3-NEXT: v_readlane_b32 s30, v8, 0
732 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
733 ; GFX9-O3-NEXT: buffer_load_dword v8, off, s[0:3], s33 ; 4-byte Folded Reload
734 ; GFX9-O3-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
735 ; GFX9-O3-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
736 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload
737 ; GFX9-O3-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload
738 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload
739 ; GFX9-O3-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:24 ; 4-byte Folded Reload
740 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
741 ; GFX9-O3-NEXT: s_addk_i32 s32, 0xf800
742 ; GFX9-O3-NEXT: s_mov_b32 s33, s40
743 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
744 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
745 %tmp107 = tail call i64 @llvm.amdgcn.set.inactive.i64(i64 %arg, i64 0)
746 %tmp134 = call amdgpu_gfx i64 @strict_wwm_called_i64(i64 %tmp107)
747 %tmp136 = add i64 %tmp134, %tmp107
748 %tmp137 = tail call i64 @llvm.amdgcn.strict.wwm.i64(i64 %tmp136)
749 %tmp138 = bitcast i64 %tmp137 to <2 x i32>
750 call void @llvm.amdgcn.raw.ptr.buffer.store.v2i32(<2 x i32> %tmp138, ptr addrspace(8) %tmp14, i32 4, i32 0, i32 0)
754 define amdgpu_gfx void @strict_wwm_amdgpu_cs_main(<4 x i32> inreg %desc, i32 %index) {
755 ; GFX9-O0-LABEL: strict_wwm_amdgpu_cs_main:
757 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
758 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
759 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 ; 4-byte Folded Spill
760 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
761 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
762 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
763 ; GFX9-O0-NEXT: s_mov_b32 s36, s4
764 ; GFX9-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39
765 ; GFX9-O0-NEXT: s_mov_b32 s37, s5
766 ; GFX9-O0-NEXT: s_mov_b32 s38, s6
767 ; GFX9-O0-NEXT: s_mov_b32 s39, s7
768 ; GFX9-O0-NEXT: ; kill: def $sgpr40_sgpr41_sgpr42_sgpr43 killed $sgpr36_sgpr37_sgpr38_sgpr39
769 ; GFX9-O0-NEXT: s_mov_b32 s34, 5
770 ; GFX9-O0-NEXT: v_lshlrev_b32_e64 v0, s34, v0
771 ; GFX9-O0-NEXT: s_mov_b32 s34, 0
772 ; GFX9-O0-NEXT: buffer_load_dwordx4 v[10:13], v0, s[36:39], s34 offen
773 ; GFX9-O0-NEXT: buffer_load_dwordx2 v[3:4], v0, s[36:39], s34 offen offset:16
774 ; GFX9-O0-NEXT: s_waitcnt vmcnt(1)
775 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v11
776 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v10
777 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
778 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
779 ; GFX9-O0-NEXT: ; kill: def $vgpr5 killed $vgpr5 def $vgpr5_vgpr6 killed $exec
780 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v7
781 ; GFX9-O0-NEXT: s_mov_b32 s35, 0x7fffffff
782 ; GFX9-O0-NEXT: s_mov_b32 s40, -1
783 ; GFX9-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41
784 ; GFX9-O0-NEXT: s_mov_b32 s41, s35
785 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v5
786 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v6
787 ; GFX9-O0-NEXT: s_not_b64 exec, exec
788 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s40
789 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s41
790 ; GFX9-O0-NEXT: s_not_b64 exec, exec
791 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, v1
792 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, v2
793 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v13
794 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v12
795 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
796 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
797 ; GFX9-O0-NEXT: ; kill: def $vgpr5 killed $vgpr5 def $vgpr5_vgpr6 killed $exec
798 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v7
799 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v5
800 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v6
801 ; GFX9-O0-NEXT: s_not_b64 exec, exec
802 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s40
803 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s41
804 ; GFX9-O0-NEXT: s_not_b64 exec, exec
805 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v1
806 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v2
807 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
808 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v3
809 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v4
810 ; GFX9-O0-NEXT: s_not_b64 exec, exec
811 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s40
812 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s41
813 ; GFX9-O0-NEXT: s_not_b64 exec, exec
814 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v1
815 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v2
816 ; GFX9-O0-NEXT: v_mov_b32_e32 v11, v9
817 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v8
818 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, v7
819 ; GFX9-O0-NEXT: v_mov_b32_e32 v10, v6
820 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
821 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
822 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
823 ; GFX9-O0-NEXT: ; implicit-def: $sgpr35
824 ; GFX9-O0-NEXT: ; kill: def $vgpr5 killed $vgpr5 def $vgpr5_vgpr6_vgpr7_vgpr8 killed $exec
825 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v11
826 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v10
827 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, v9
828 ; GFX9-O0-NEXT: buffer_store_dwordx4 v[5:8], v0, s[36:39], s34 offen
829 ; GFX9-O0-NEXT: buffer_store_dwordx2 v[3:4], v0, s[36:39], s34 offen offset:16
830 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
831 ; GFX9-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 ; 4-byte Folded Reload
832 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
833 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
834 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
835 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
837 ; GFX9-O3-LABEL: strict_wwm_amdgpu_cs_main:
839 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
840 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
841 ; GFX9-O3-NEXT: buffer_store_dword v1, off, s[0:3], s32 ; 4-byte Folded Spill
842 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
843 ; GFX9-O3-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
844 ; GFX9-O3-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
845 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
846 ; GFX9-O3-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
847 ; GFX9-O3-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
848 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
849 ; GFX9-O3-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
850 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
851 ; GFX9-O3-NEXT: v_lshlrev_b32_e32 v0, 5, v0
852 ; GFX9-O3-NEXT: buffer_load_dwordx4 v[7:10], v0, s[4:7], 0 offen
853 ; GFX9-O3-NEXT: buffer_load_dwordx2 v[11:12], v0, s[4:7], 0 offen offset:16
854 ; GFX9-O3-NEXT: s_mov_b32 s34, -1
855 ; GFX9-O3-NEXT: s_brev_b32 s35, -2
856 ; GFX9-O3-NEXT: s_waitcnt vmcnt(1)
857 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, v7
858 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, v8
859 ; GFX9-O3-NEXT: s_not_b64 exec, exec
860 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, s34
861 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, s35
862 ; GFX9-O3-NEXT: s_not_b64 exec, exec
863 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, v9
864 ; GFX9-O3-NEXT: v_mov_b32_e32 v4, v10
865 ; GFX9-O3-NEXT: s_not_b64 exec, exec
866 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, s34
867 ; GFX9-O3-NEXT: v_mov_b32_e32 v4, s35
868 ; GFX9-O3-NEXT: s_not_b64 exec, exec
869 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
870 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, v11
871 ; GFX9-O3-NEXT: v_mov_b32_e32 v6, v12
872 ; GFX9-O3-NEXT: s_not_b64 exec, exec
873 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, s34
874 ; GFX9-O3-NEXT: v_mov_b32_e32 v6, s35
875 ; GFX9-O3-NEXT: s_not_b64 exec, exec
876 ; GFX9-O3-NEXT: v_mov_b32_e32 v7, v1
877 ; GFX9-O3-NEXT: v_mov_b32_e32 v9, v3
878 ; GFX9-O3-NEXT: v_mov_b32_e32 v8, v2
879 ; GFX9-O3-NEXT: v_mov_b32_e32 v10, v4
880 ; GFX9-O3-NEXT: v_mov_b32_e32 v11, v5
881 ; GFX9-O3-NEXT: v_mov_b32_e32 v12, v6
882 ; GFX9-O3-NEXT: buffer_store_dwordx4 v[7:10], v0, s[4:7], 0 offen
883 ; GFX9-O3-NEXT: buffer_store_dwordx2 v[11:12], v0, s[4:7], 0 offen offset:16
884 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
885 ; GFX9-O3-NEXT: buffer_load_dword v1, off, s[0:3], s32 ; 4-byte Folded Reload
886 ; GFX9-O3-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
887 ; GFX9-O3-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
888 ; GFX9-O3-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
889 ; GFX9-O3-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
890 ; GFX9-O3-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
891 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
892 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
893 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
894 %tmp17 = shl i32 %index, 5
895 %tmp18 = tail call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %desc, i32 %tmp17, i32 0)
896 %.i0.upto1.bc = bitcast <4 x i32> %tmp18 to <2 x i64>
897 %tmp19 = or i32 %tmp17, 16
898 %tmp20 = tail call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %desc, i32 %tmp19, i32 0)
899 %.i0.upto1.extract = extractelement <2 x i64> %.i0.upto1.bc, i32 0
900 %tmp22 = tail call i64 @llvm.amdgcn.set.inactive.i64(i64 %.i0.upto1.extract, i64 9223372036854775807)
901 %tmp97 = tail call i64 @llvm.amdgcn.strict.wwm.i64(i64 %tmp22)
902 %.i1.upto1.extract = extractelement <2 x i64> %.i0.upto1.bc, i32 1
903 %tmp99 = tail call i64 @llvm.amdgcn.set.inactive.i64(i64 %.i1.upto1.extract, i64 9223372036854775807)
904 %tmp174 = tail call i64 @llvm.amdgcn.strict.wwm.i64(i64 %tmp99)
905 %.i25 = bitcast <2 x i32> %tmp20 to i64
906 %tmp176 = tail call i64 @llvm.amdgcn.set.inactive.i64(i64 %.i25, i64 9223372036854775807)
907 %tmp251 = tail call i64 @llvm.amdgcn.strict.wwm.i64(i64 %tmp176)
908 %.cast = bitcast i64 %tmp97 to <2 x float>
909 %.cast6 = bitcast i64 %tmp174 to <2 x float>
910 %.cast7 = bitcast i64 %tmp251 to <2 x float>
911 %tmp254 = shufflevector <2 x float> %.cast, <2 x float> %.cast6, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
912 %desc.int = bitcast <4 x i32> %desc to i128
913 %desc.ptr = inttoptr i128 %desc.int to ptr addrspace(8)
914 tail call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %tmp254, ptr addrspace(8) %desc.ptr, i32 %tmp17, i32 0, i32 0)
915 tail call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %.cast7, ptr addrspace(8) %desc.ptr, i32 %tmp19, i32 0, i32 0)
919 ; FIXME: This spills v40 and v41 twice, once in whole-wave-mode and once for the active lanes
920 define amdgpu_gfx <32 x i32> @strict_wwm_callee_saves(<32 x i32> inreg %keep, ptr addrspace(5) %ptr, i64 %a, i64 %b, i64 %c, i64 %d, i64 %e) #0 {
921 ; GFX9-O0-LABEL: strict_wwm_callee_saves:
923 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
924 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
925 ; GFX9-O0-NEXT: buffer_store_dword v32, off, s[0:3], s32 offset:204 ; 4-byte Folded Spill
926 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
927 ; GFX9-O0-NEXT: buffer_store_dword v33, off, s[0:3], s32 offset:208 ; 4-byte Folded Spill
928 ; GFX9-O0-NEXT: buffer_store_dword v34, off, s[0:3], s32 offset:212 ; 4-byte Folded Spill
929 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
930 ; GFX9-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 offset:216 ; 4-byte Folded Spill
931 ; GFX9-O0-NEXT: buffer_store_dword v36, off, s[0:3], s32 offset:220 ; 4-byte Folded Spill
932 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
933 ; GFX9-O0-NEXT: buffer_store_dword v37, off, s[0:3], s32 offset:224 ; 4-byte Folded Spill
934 ; GFX9-O0-NEXT: buffer_store_dword v38, off, s[0:3], s32 offset:228 ; 4-byte Folded Spill
935 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
936 ; GFX9-O0-NEXT: buffer_store_dword v39, off, s[0:3], s32 offset:232 ; 4-byte Folded Spill
937 ; GFX9-O0-NEXT: buffer_store_dword v40, off, s[0:3], s32 offset:236 ; 4-byte Folded Spill
938 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
939 ; GFX9-O0-NEXT: buffer_store_dword v41, off, s[0:3], s32 offset:240 ; 4-byte Folded Spill
940 ; GFX9-O0-NEXT: s_mov_b64 exec, -1
941 ; GFX9-O0-NEXT: buffer_store_dword v42, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill
942 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
943 ; GFX9-O0-NEXT: buffer_store_dword v40, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill
944 ; GFX9-O0-NEXT: buffer_store_dword v41, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
945 ; GFX9-O0-NEXT: buffer_store_dword v43, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
946 ; GFX9-O0-NEXT: buffer_store_dword v44, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
947 ; GFX9-O0-NEXT: buffer_store_dword v45, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
948 ; GFX9-O0-NEXT: buffer_store_dword v46, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
949 ; GFX9-O0-NEXT: buffer_store_dword v47, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
950 ; GFX9-O0-NEXT: v_writelane_b32 v42, s64, 0
951 ; GFX9-O0-NEXT: v_writelane_b32 v42, s65, 1
952 ; GFX9-O0-NEXT: v_writelane_b32 v42, s66, 2
953 ; GFX9-O0-NEXT: v_writelane_b32 v42, s67, 3
954 ; GFX9-O0-NEXT: buffer_store_dword v10, off, s[0:3], s32 offset:72 ; 4-byte Folded Spill
955 ; GFX9-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill
956 ; GFX9-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:80 ; 4-byte Folded Spill
957 ; GFX9-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill
958 ; GFX9-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:88 ; 4-byte Folded Spill
959 ; GFX9-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:76 ; 4-byte Folded Spill
960 ; GFX9-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:96 ; 4-byte Folded Spill
961 ; GFX9-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:84 ; 4-byte Folded Spill
962 ; GFX9-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill
963 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:92 ; 4-byte Folded Spill
964 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill
965 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:20
966 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
967 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:120 ; 4-byte Folded Spill
968 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:16
969 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
970 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:116 ; 4-byte Folded Spill
971 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:12
972 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
973 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:112 ; 4-byte Folded Spill
974 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:8
975 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
976 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:108 ; 4-byte Folded Spill
977 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4
978 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
979 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:104 ; 4-byte Folded Spill
980 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32
981 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
982 ; GFX9-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:100 ; 4-byte Folded Spill
983 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
984 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
985 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
986 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
987 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
988 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
989 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, s4
990 ; GFX9-O0-NEXT: v_mov_b32_e32 v43, s5
991 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s6
992 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:200 ; 4-byte Folded Spill
993 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s7
994 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:196 ; 4-byte Folded Spill
995 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s8
996 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:192 ; 4-byte Folded Spill
997 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s9
998 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:188 ; 4-byte Folded Spill
999 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s10
1000 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:184 ; 4-byte Folded Spill
1001 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s11
1002 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:180 ; 4-byte Folded Spill
1003 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s12
1004 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:176 ; 4-byte Folded Spill
1005 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s13
1006 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:172 ; 4-byte Folded Spill
1007 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s14
1008 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:168 ; 4-byte Folded Spill
1009 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s15
1010 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:164 ; 4-byte Folded Spill
1011 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s16
1012 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:160 ; 4-byte Folded Spill
1013 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s17
1014 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:156 ; 4-byte Folded Spill
1015 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s18
1016 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:152 ; 4-byte Folded Spill
1017 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s19
1018 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:148 ; 4-byte Folded Spill
1019 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s20
1020 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:144 ; 4-byte Folded Spill
1021 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s21
1022 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:140 ; 4-byte Folded Spill
1023 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s22
1024 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:136 ; 4-byte Folded Spill
1025 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s23
1026 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:132 ; 4-byte Folded Spill
1027 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s24
1028 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:128 ; 4-byte Folded Spill
1029 ; GFX9-O0-NEXT: v_mov_b32_e32 v47, s25
1030 ; GFX9-O0-NEXT: v_mov_b32_e32 v46, s26
1031 ; GFX9-O0-NEXT: v_mov_b32_e32 v45, s27
1032 ; GFX9-O0-NEXT: v_mov_b32_e32 v44, s28
1033 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s29
1034 ; GFX9-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:124 ; 4-byte Folded Spill
1035 ; GFX9-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 killed $exec
1036 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, v43
1037 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:200 ; 4-byte Folded Reload
1038 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1039 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, v43
1040 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:196 ; 4-byte Folded Reload
1041 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1042 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v43
1043 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:192 ; 4-byte Folded Reload
1044 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1045 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, v43
1046 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:188 ; 4-byte Folded Reload
1047 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1048 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v43
1049 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:184 ; 4-byte Folded Reload
1050 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1051 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, v43
1052 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:180 ; 4-byte Folded Reload
1053 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1054 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v43
1055 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:176 ; 4-byte Folded Reload
1056 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1057 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, v43
1058 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:172 ; 4-byte Folded Reload
1059 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1060 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, v43
1061 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:168 ; 4-byte Folded Reload
1062 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1063 ; GFX9-O0-NEXT: v_mov_b32_e32 v10, v43
1064 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:164 ; 4-byte Folded Reload
1065 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1066 ; GFX9-O0-NEXT: v_mov_b32_e32 v11, v43
1067 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:160 ; 4-byte Folded Reload
1068 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1069 ; GFX9-O0-NEXT: v_mov_b32_e32 v12, v43
1070 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:156 ; 4-byte Folded Reload
1071 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1072 ; GFX9-O0-NEXT: v_mov_b32_e32 v13, v43
1073 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:152 ; 4-byte Folded Reload
1074 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1075 ; GFX9-O0-NEXT: v_mov_b32_e32 v14, v43
1076 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:148 ; 4-byte Folded Reload
1077 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1078 ; GFX9-O0-NEXT: v_mov_b32_e32 v15, v43
1079 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:144 ; 4-byte Folded Reload
1080 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1081 ; GFX9-O0-NEXT: v_mov_b32_e32 v16, v43
1082 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:140 ; 4-byte Folded Reload
1083 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1084 ; GFX9-O0-NEXT: v_mov_b32_e32 v17, v43
1085 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:136 ; 4-byte Folded Reload
1086 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1087 ; GFX9-O0-NEXT: v_mov_b32_e32 v18, v43
1088 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:132 ; 4-byte Folded Reload
1089 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1090 ; GFX9-O0-NEXT: v_mov_b32_e32 v19, v43
1091 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:128 ; 4-byte Folded Reload
1092 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1093 ; GFX9-O0-NEXT: v_mov_b32_e32 v20, v43
1094 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:124 ; 4-byte Folded Reload
1095 ; GFX9-O0-NEXT: v_mov_b32_e32 v21, v47
1096 ; GFX9-O0-NEXT: buffer_load_dword v47, off, s[0:3], s32 offset:104 ; 4-byte Folded Reload
1097 ; GFX9-O0-NEXT: v_mov_b32_e32 v22, v46
1098 ; GFX9-O0-NEXT: buffer_load_dword v46, off, s[0:3], s32 offset:108 ; 4-byte Folded Reload
1099 ; GFX9-O0-NEXT: v_mov_b32_e32 v23, v45
1100 ; GFX9-O0-NEXT: buffer_load_dword v45, off, s[0:3], s32 offset:112 ; 4-byte Folded Reload
1101 ; GFX9-O0-NEXT: v_mov_b32_e32 v24, v44
1102 ; GFX9-O0-NEXT: buffer_load_dword v44, off, s[0:3], s32 offset:116 ; 4-byte Folded Reload
1103 ; GFX9-O0-NEXT: s_waitcnt vmcnt(4)
1104 ; GFX9-O0-NEXT: v_mov_b32_e32 v25, v43
1105 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:100 ; 4-byte Folded Reload
1106 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1107 ; GFX9-O0-NEXT: v_mov_b32_e32 v26, v43
1108 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:120 ; 4-byte Folded Reload
1109 ; GFX9-O0-NEXT: v_mov_b32_e32 v27, v47
1110 ; GFX9-O0-NEXT: v_mov_b32_e32 v28, v46
1111 ; GFX9-O0-NEXT: v_mov_b32_e32 v29, v45
1112 ; GFX9-O0-NEXT: v_mov_b32_e32 v30, v44
1113 ; GFX9-O0-NEXT: ; kill: def $vgpr31 killed $vgpr43 killed $exec
1114 ; GFX9-O0-NEXT: buffer_load_dword v31, off, s[0:3], s32 offset:120 ; 4-byte Folded Reload
1115 ; GFX9-O0-NEXT: buffer_load_dword v30, off, s[0:3], s32 offset:116 ; 4-byte Folded Reload
1116 ; GFX9-O0-NEXT: buffer_load_dword v29, off, s[0:3], s32 offset:112 ; 4-byte Folded Reload
1117 ; GFX9-O0-NEXT: buffer_load_dword v28, off, s[0:3], s32 offset:108 ; 4-byte Folded Reload
1118 ; GFX9-O0-NEXT: buffer_load_dword v27, off, s[0:3], s32 offset:104 ; 4-byte Folded Reload
1119 ; GFX9-O0-NEXT: buffer_load_dword v26, off, s[0:3], s32 offset:100 ; 4-byte Folded Reload
1120 ; GFX9-O0-NEXT: buffer_load_dword v11, off, s[0:3], s32 offset:96 ; 4-byte Folded Reload
1121 ; GFX9-O0-NEXT: buffer_load_dword v10, off, s[0:3], s32 offset:92 ; 4-byte Folded Reload
1122 ; GFX9-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:88 ; 4-byte Folded Reload
1123 ; GFX9-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:84 ; 4-byte Folded Reload
1124 ; GFX9-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:80 ; 4-byte Folded Reload
1125 ; GFX9-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:76 ; 4-byte Folded Reload
1126 ; GFX9-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:72 ; 4-byte Folded Reload
1127 ; GFX9-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload
1128 ; GFX9-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload
1129 ; GFX9-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload
1130 ; GFX9-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload
1131 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1132 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1133 ; GFX9-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
1134 ; GFX9-O0-NEXT: s_waitcnt vmcnt(4)
1135 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, v5
1136 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1137 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1138 ; GFX9-O0-NEXT: ; kill: def $vgpr4 killed $vgpr4 def $vgpr4_vgpr5 killed $exec
1139 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, v7
1140 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1141 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1142 ; GFX9-O0-NEXT: ; kill: def $vgpr6 killed $vgpr6 def $vgpr6_vgpr7 killed $exec
1143 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, v9
1144 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1145 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1146 ; GFX9-O0-NEXT: ; kill: def $vgpr8 killed $vgpr8 def $vgpr8_vgpr9 killed $exec
1147 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, v11
1148 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1149 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34
1150 ; GFX9-O0-NEXT: ; kill: def $vgpr10 killed $vgpr10 def $vgpr10_vgpr11 killed $exec
1151 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1152 ; GFX9-O0-NEXT: v_mov_b32_e32 v11, v0
1153 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
1154 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
1155 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
1156 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
1157 ; GFX9-O0-NEXT: ; implicit-def: $sgpr34_sgpr35
1158 ; GFX9-O0-NEXT: ; implicit-def: $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
1159 ; GFX9-O0-NEXT: s_mov_b64 s[34:35], 0
1160 ; GFX9-O0-NEXT: v_mov_b32_e32 v32, v10
1161 ; GFX9-O0-NEXT: v_mov_b32_e32 v33, v11
1162 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1163 ; GFX9-O0-NEXT: v_mov_b32_e32 v32, s34
1164 ; GFX9-O0-NEXT: v_mov_b32_e32 v33, s35
1165 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1166 ; GFX9-O0-NEXT: v_mov_b32_e32 v34, v8
1167 ; GFX9-O0-NEXT: v_mov_b32_e32 v35, v9
1168 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1169 ; GFX9-O0-NEXT: v_mov_b32_e32 v34, s34
1170 ; GFX9-O0-NEXT: v_mov_b32_e32 v35, s35
1171 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1172 ; GFX9-O0-NEXT: v_mov_b32_e32 v36, v6
1173 ; GFX9-O0-NEXT: v_mov_b32_e32 v37, v7
1174 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1175 ; GFX9-O0-NEXT: v_mov_b32_e32 v36, s34
1176 ; GFX9-O0-NEXT: v_mov_b32_e32 v37, s35
1177 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1178 ; GFX9-O0-NEXT: v_mov_b32_e32 v38, v4
1179 ; GFX9-O0-NEXT: v_mov_b32_e32 v39, v5
1180 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1181 ; GFX9-O0-NEXT: v_mov_b32_e32 v38, s34
1182 ; GFX9-O0-NEXT: v_mov_b32_e32 v39, s35
1183 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1184 ; GFX9-O0-NEXT: v_mov_b32_e32 v40, v2
1185 ; GFX9-O0-NEXT: v_mov_b32_e32 v41, v3
1186 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1187 ; GFX9-O0-NEXT: v_mov_b32_e32 v40, s34
1188 ; GFX9-O0-NEXT: v_mov_b32_e32 v41, s35
1189 ; GFX9-O0-NEXT: s_not_b64 exec, exec
1190 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v33
1191 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:4
1192 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v32
1193 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
1194 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v35
1195 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:12
1196 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v34
1197 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:8
1198 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v37
1199 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:20
1200 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v36
1201 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:16
1202 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v39
1203 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:28
1204 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v38
1205 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:24
1206 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v41
1207 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:36
1208 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, v40
1209 ; GFX9-O0-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen offset:32
1210 ; GFX9-O0-NEXT: v_mov_b32_e32 v0, s4
1211 ; GFX9-O0-NEXT: v_mov_b32_e32 v1, s5
1212 ; GFX9-O0-NEXT: v_mov_b32_e32 v2, s6
1213 ; GFX9-O0-NEXT: v_mov_b32_e32 v3, s7
1214 ; GFX9-O0-NEXT: v_mov_b32_e32 v4, s8
1215 ; GFX9-O0-NEXT: v_mov_b32_e32 v5, s9
1216 ; GFX9-O0-NEXT: v_mov_b32_e32 v6, s10
1217 ; GFX9-O0-NEXT: v_mov_b32_e32 v7, s11
1218 ; GFX9-O0-NEXT: v_mov_b32_e32 v8, s12
1219 ; GFX9-O0-NEXT: v_mov_b32_e32 v9, s13
1220 ; GFX9-O0-NEXT: v_mov_b32_e32 v10, s14
1221 ; GFX9-O0-NEXT: v_mov_b32_e32 v11, s15
1222 ; GFX9-O0-NEXT: v_mov_b32_e32 v12, s16
1223 ; GFX9-O0-NEXT: v_mov_b32_e32 v13, s17
1224 ; GFX9-O0-NEXT: v_mov_b32_e32 v14, s18
1225 ; GFX9-O0-NEXT: v_mov_b32_e32 v15, s19
1226 ; GFX9-O0-NEXT: v_mov_b32_e32 v16, s20
1227 ; GFX9-O0-NEXT: v_mov_b32_e32 v17, s21
1228 ; GFX9-O0-NEXT: v_mov_b32_e32 v18, s22
1229 ; GFX9-O0-NEXT: v_mov_b32_e32 v19, s23
1230 ; GFX9-O0-NEXT: v_mov_b32_e32 v20, s24
1231 ; GFX9-O0-NEXT: v_mov_b32_e32 v21, s25
1232 ; GFX9-O0-NEXT: v_mov_b32_e32 v22, s26
1233 ; GFX9-O0-NEXT: v_mov_b32_e32 v23, s27
1234 ; GFX9-O0-NEXT: v_mov_b32_e32 v24, s28
1235 ; GFX9-O0-NEXT: v_mov_b32_e32 v25, s29
1236 ; GFX9-O0-NEXT: v_readlane_b32 s67, v42, 3
1237 ; GFX9-O0-NEXT: v_readlane_b32 s66, v42, 2
1238 ; GFX9-O0-NEXT: v_readlane_b32 s65, v42, 1
1239 ; GFX9-O0-NEXT: v_readlane_b32 s64, v42, 0
1240 ; GFX9-O0-NEXT: buffer_load_dword v47, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
1241 ; GFX9-O0-NEXT: buffer_load_dword v46, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
1242 ; GFX9-O0-NEXT: buffer_load_dword v45, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
1243 ; GFX9-O0-NEXT: buffer_load_dword v44, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
1244 ; GFX9-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
1245 ; GFX9-O0-NEXT: buffer_load_dword v41, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
1246 ; GFX9-O0-NEXT: buffer_load_dword v40, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload
1247 ; GFX9-O0-NEXT: s_xor_saveexec_b64 s[34:35], -1
1248 ; GFX9-O0-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:204 ; 4-byte Folded Reload
1249 ; GFX9-O0-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:208 ; 4-byte Folded Reload
1250 ; GFX9-O0-NEXT: buffer_load_dword v34, off, s[0:3], s32 offset:212 ; 4-byte Folded Reload
1251 ; GFX9-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 offset:216 ; 4-byte Folded Reload
1252 ; GFX9-O0-NEXT: buffer_load_dword v36, off, s[0:3], s32 offset:220 ; 4-byte Folded Reload
1253 ; GFX9-O0-NEXT: buffer_load_dword v37, off, s[0:3], s32 offset:224 ; 4-byte Folded Reload
1254 ; GFX9-O0-NEXT: buffer_load_dword v38, off, s[0:3], s32 offset:228 ; 4-byte Folded Reload
1255 ; GFX9-O0-NEXT: buffer_load_dword v39, off, s[0:3], s32 offset:232 ; 4-byte Folded Reload
1256 ; GFX9-O0-NEXT: buffer_load_dword v40, off, s[0:3], s32 offset:236 ; 4-byte Folded Reload
1257 ; GFX9-O0-NEXT: buffer_load_dword v41, off, s[0:3], s32 offset:240 ; 4-byte Folded Reload
1258 ; GFX9-O0-NEXT: s_mov_b64 exec, -1
1259 ; GFX9-O0-NEXT: buffer_load_dword v42, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload
1260 ; GFX9-O0-NEXT: s_mov_b64 exec, s[34:35]
1261 ; GFX9-O0-NEXT: s_waitcnt vmcnt(0)
1262 ; GFX9-O0-NEXT: s_setpc_b64 s[30:31]
1264 ; GFX9-O3-LABEL: strict_wwm_callee_saves:
1266 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1267 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
1268 ; GFX9-O3-NEXT: buffer_store_dword v32, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
1269 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1270 ; GFX9-O3-NEXT: buffer_store_dword v33, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
1271 ; GFX9-O3-NEXT: buffer_store_dword v34, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
1272 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1273 ; GFX9-O3-NEXT: buffer_store_dword v35, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
1274 ; GFX9-O3-NEXT: buffer_store_dword v36, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill
1275 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1276 ; GFX9-O3-NEXT: buffer_store_dword v37, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill
1277 ; GFX9-O3-NEXT: buffer_store_dword v38, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill
1278 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1279 ; GFX9-O3-NEXT: buffer_store_dword v39, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill
1280 ; GFX9-O3-NEXT: buffer_store_dword v40, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill
1281 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1282 ; GFX9-O3-NEXT: buffer_store_dword v41, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill
1283 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
1284 ; GFX9-O3-NEXT: buffer_store_dword v40, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
1285 ; GFX9-O3-NEXT: buffer_store_dword v41, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
1286 ; GFX9-O3-NEXT: buffer_load_dword v26, off, s[0:3], s32
1287 ; GFX9-O3-NEXT: buffer_load_dword v27, off, s[0:3], s32 offset:4
1288 ; GFX9-O3-NEXT: buffer_load_dword v28, off, s[0:3], s32 offset:8
1289 ; GFX9-O3-NEXT: buffer_load_dword v29, off, s[0:3], s32 offset:12
1290 ; GFX9-O3-NEXT: buffer_load_dword v30, off, s[0:3], s32 offset:16
1291 ; GFX9-O3-NEXT: buffer_load_dword v31, off, s[0:3], s32 offset:20
1292 ; GFX9-O3-NEXT: v_mov_b32_e32 v32, v1
1293 ; GFX9-O3-NEXT: v_mov_b32_e32 v33, v2
1294 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1295 ; GFX9-O3-NEXT: v_mov_b32_e32 v32, 0
1296 ; GFX9-O3-NEXT: v_mov_b32_e32 v33, 0
1297 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1298 ; GFX9-O3-NEXT: v_mov_b32_e32 v34, v3
1299 ; GFX9-O3-NEXT: v_mov_b32_e32 v35, v4
1300 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1301 ; GFX9-O3-NEXT: v_mov_b32_e32 v34, 0
1302 ; GFX9-O3-NEXT: v_mov_b32_e32 v35, 0
1303 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1304 ; GFX9-O3-NEXT: v_mov_b32_e32 v36, v5
1305 ; GFX9-O3-NEXT: v_mov_b32_e32 v37, v6
1306 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1307 ; GFX9-O3-NEXT: v_mov_b32_e32 v36, 0
1308 ; GFX9-O3-NEXT: v_mov_b32_e32 v37, 0
1309 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1310 ; GFX9-O3-NEXT: v_mov_b32_e32 v38, v7
1311 ; GFX9-O3-NEXT: v_mov_b32_e32 v39, v8
1312 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1313 ; GFX9-O3-NEXT: v_mov_b32_e32 v38, 0
1314 ; GFX9-O3-NEXT: v_mov_b32_e32 v39, 0
1315 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1316 ; GFX9-O3-NEXT: v_mov_b32_e32 v40, v9
1317 ; GFX9-O3-NEXT: v_mov_b32_e32 v41, v10
1318 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1319 ; GFX9-O3-NEXT: v_mov_b32_e32 v40, 0
1320 ; GFX9-O3-NEXT: v_mov_b32_e32 v41, 0
1321 ; GFX9-O3-NEXT: s_not_b64 exec, exec
1322 ; GFX9-O3-NEXT: buffer_store_dword v33, v0, s[0:3], 0 offen offset:4
1323 ; GFX9-O3-NEXT: buffer_store_dword v32, v0, s[0:3], 0 offen
1324 ; GFX9-O3-NEXT: buffer_store_dword v35, v0, s[0:3], 0 offen offset:12
1325 ; GFX9-O3-NEXT: buffer_store_dword v34, v0, s[0:3], 0 offen offset:8
1326 ; GFX9-O3-NEXT: buffer_store_dword v37, v0, s[0:3], 0 offen offset:20
1327 ; GFX9-O3-NEXT: buffer_store_dword v36, v0, s[0:3], 0 offen offset:16
1328 ; GFX9-O3-NEXT: buffer_store_dword v39, v0, s[0:3], 0 offen offset:28
1329 ; GFX9-O3-NEXT: buffer_store_dword v38, v0, s[0:3], 0 offen offset:24
1330 ; GFX9-O3-NEXT: buffer_store_dword v41, v0, s[0:3], 0 offen offset:36
1331 ; GFX9-O3-NEXT: buffer_store_dword v40, v0, s[0:3], 0 offen offset:32
1332 ; GFX9-O3-NEXT: buffer_load_dword v41, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
1333 ; GFX9-O3-NEXT: s_nop 0
1334 ; GFX9-O3-NEXT: buffer_load_dword v40, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
1335 ; GFX9-O3-NEXT: v_mov_b32_e32 v0, s4
1336 ; GFX9-O3-NEXT: v_mov_b32_e32 v1, s5
1337 ; GFX9-O3-NEXT: v_mov_b32_e32 v2, s6
1338 ; GFX9-O3-NEXT: v_mov_b32_e32 v3, s7
1339 ; GFX9-O3-NEXT: v_mov_b32_e32 v4, s8
1340 ; GFX9-O3-NEXT: v_mov_b32_e32 v5, s9
1341 ; GFX9-O3-NEXT: v_mov_b32_e32 v6, s10
1342 ; GFX9-O3-NEXT: v_mov_b32_e32 v7, s11
1343 ; GFX9-O3-NEXT: v_mov_b32_e32 v8, s12
1344 ; GFX9-O3-NEXT: v_mov_b32_e32 v9, s13
1345 ; GFX9-O3-NEXT: v_mov_b32_e32 v10, s14
1346 ; GFX9-O3-NEXT: v_mov_b32_e32 v11, s15
1347 ; GFX9-O3-NEXT: v_mov_b32_e32 v12, s16
1348 ; GFX9-O3-NEXT: v_mov_b32_e32 v13, s17
1349 ; GFX9-O3-NEXT: v_mov_b32_e32 v14, s18
1350 ; GFX9-O3-NEXT: v_mov_b32_e32 v15, s19
1351 ; GFX9-O3-NEXT: v_mov_b32_e32 v16, s20
1352 ; GFX9-O3-NEXT: v_mov_b32_e32 v17, s21
1353 ; GFX9-O3-NEXT: v_mov_b32_e32 v18, s22
1354 ; GFX9-O3-NEXT: v_mov_b32_e32 v19, s23
1355 ; GFX9-O3-NEXT: v_mov_b32_e32 v20, s24
1356 ; GFX9-O3-NEXT: v_mov_b32_e32 v21, s25
1357 ; GFX9-O3-NEXT: v_mov_b32_e32 v22, s26
1358 ; GFX9-O3-NEXT: v_mov_b32_e32 v23, s27
1359 ; GFX9-O3-NEXT: v_mov_b32_e32 v24, s28
1360 ; GFX9-O3-NEXT: v_mov_b32_e32 v25, s29
1361 ; GFX9-O3-NEXT: s_xor_saveexec_b64 s[34:35], -1
1362 ; GFX9-O3-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
1363 ; GFX9-O3-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
1364 ; GFX9-O3-NEXT: buffer_load_dword v34, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
1365 ; GFX9-O3-NEXT: buffer_load_dword v35, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
1366 ; GFX9-O3-NEXT: buffer_load_dword v36, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload
1367 ; GFX9-O3-NEXT: buffer_load_dword v37, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload
1368 ; GFX9-O3-NEXT: buffer_load_dword v38, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload
1369 ; GFX9-O3-NEXT: buffer_load_dword v39, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload
1370 ; GFX9-O3-NEXT: buffer_load_dword v40, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload
1371 ; GFX9-O3-NEXT: buffer_load_dword v41, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload
1372 ; GFX9-O3-NEXT: s_mov_b64 exec, s[34:35]
1373 ; GFX9-O3-NEXT: s_waitcnt vmcnt(0)
1374 ; GFX9-O3-NEXT: s_setpc_b64 s[30:31]
1375 %a2 = call i64 @llvm.amdgcn.set.inactive.i64(i64 %a, i64 0)
1376 %b2 = call i64 @llvm.amdgcn.set.inactive.i64(i64 %b, i64 0)
1377 %c2 = call i64 @llvm.amdgcn.set.inactive.i64(i64 %c, i64 0)
1378 %d2 = call i64 @llvm.amdgcn.set.inactive.i64(i64 %d, i64 0)
1379 %e2 = call i64 @llvm.amdgcn.set.inactive.i64(i64 %e, i64 0)
1380 store i64 %a2, ptr addrspace(5) %ptr
1381 %ptr_b = getelementptr i64, ptr addrspace(5) %ptr, i32 1
1382 store i64 %b2, ptr addrspace(5) %ptr_b
1383 %ptr_c = getelementptr i64, ptr addrspace(5) %ptr, i32 2
1384 store i64 %c2, ptr addrspace(5) %ptr_c
1385 %ptr_d = getelementptr i64, ptr addrspace(5) %ptr, i32 3
1386 store i64 %d2, ptr addrspace(5) %ptr_d
1387 %ptr_e = getelementptr i64, ptr addrspace(5) %ptr, i32 4
1388 store i64 %e2, ptr addrspace(5) %ptr_e
1389 ret <32 x i32> %keep
1392 declare i32 @llvm.amdgcn.strict.wwm.i32(i32)
1393 declare i64 @llvm.amdgcn.strict.wwm.i64(i64)
1394 declare i32 @llvm.amdgcn.set.inactive.i32(i32, i32)
1395 declare i64 @llvm.amdgcn.set.inactive.i64(i64, i64)
1396 declare i32 @llvm.amdgcn.update.dpp.i32(i32, i32, i32, i32, i32, i1)
1397 declare <2 x float> @llvm.amdgcn.raw.ptr.buffer.load.v2f32(ptr addrspace(8), i32, i32, i32)
1398 declare void @llvm.amdgcn.raw.ptr.buffer.store.f32(float, ptr addrspace(8), i32, i32, i32)
1399 declare void @llvm.amdgcn.raw.ptr.buffer.store.i32(i32, ptr addrspace(8), i32, i32, i32)
1400 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2i32(<2 x i32>, ptr addrspace(8), i32, i32, i32)
1401 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float>, ptr addrspace(8), i32, i32, i32)
1402 declare void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float>, ptr addrspace(8), i32, i32, i32)
1403 declare <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32>, i32, i32)
1404 declare <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32>, i32, i32)
1406 attributes #0 = { "amdgpu-waves-per-eu"="5,5" }