1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GFX7LESS %s
3 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX9 %s
4 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1064 %s
5 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1032 %s
6 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1164 %s
7 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize32,-wavefrontsize64 -amdgpu-atomic-optimizer-strategy=Iterative -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1132 %s
8 ; RUN: llc -mtriple=amdgcn -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GFX7LESS-DPP %s
9 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX9-DPP %s
10 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1064-DPP %s
11 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1032-DPP %s
12 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1164-DPP %s
13 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize32,-wavefrontsize64 -amdgpu-atomic-optimizer-strategy=DPP -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GFX1132-DPP %s
15 declare float @div.float.value()
16 declare float @div.double.value()
18 define amdgpu_kernel void @global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe(ptr addrspace(1) %ptr) #0 {
19 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
21 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
22 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
23 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
24 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
25 ; GFX7LESS-NEXT: s_cbranch_execz .LBB0_3
26 ; GFX7LESS-NEXT: ; %bb.1:
27 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
28 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
29 ; GFX7LESS-NEXT: s_load_dword s2, s[0:1], 0x0
30 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
31 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
32 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
33 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s2
34 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
35 ; GFX7LESS-NEXT: .LBB0_2: ; %atomicrmw.start
36 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
37 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
38 ; GFX7LESS-NEXT: v_min_f32_e32 v0, 4.0, v0
39 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
40 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v1
41 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v0
42 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
43 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
44 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
45 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
46 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v2
47 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
48 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB0_2
49 ; GFX7LESS-NEXT: .LBB0_3:
50 ; GFX7LESS-NEXT: s_endpgm
52 ; GFX9-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
54 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
55 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
56 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
57 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
58 ; GFX9-NEXT: s_cbranch_execz .LBB0_3
60 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
61 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
62 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
63 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
64 ; GFX9-NEXT: s_load_dword s4, s[0:1], 0x0
65 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
66 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
67 ; GFX9-NEXT: .LBB0_2: ; %atomicrmw.start
68 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
69 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
70 ; GFX9-NEXT: v_min_f32_e32 v0, 4.0, v0
71 ; GFX9-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
72 ; GFX9-NEXT: s_waitcnt vmcnt(0)
73 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
74 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
75 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
76 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
77 ; GFX9-NEXT: s_cbranch_execnz .LBB0_2
81 ; GFX1064-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
83 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
84 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
85 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
86 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
87 ; GFX1064-NEXT: s_cbranch_execz .LBB0_2
88 ; GFX1064-NEXT: ; %bb.1:
89 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
90 ; GFX1064-NEXT: v_mov_b32_e32 v0, 0
91 ; GFX1064-NEXT: v_mov_b32_e32 v1, 4.0
92 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
93 ; GFX1064-NEXT: global_atomic_fmin v0, v1, s[0:1]
94 ; GFX1064-NEXT: .LBB0_2:
95 ; GFX1064-NEXT: s_endpgm
97 ; GFX1032-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
99 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
100 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
101 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
102 ; GFX1032-NEXT: s_cbranch_execz .LBB0_2
103 ; GFX1032-NEXT: ; %bb.1:
104 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
105 ; GFX1032-NEXT: v_mov_b32_e32 v0, 0
106 ; GFX1032-NEXT: v_mov_b32_e32 v1, 4.0
107 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
108 ; GFX1032-NEXT: global_atomic_fmin v0, v1, s[0:1]
109 ; GFX1032-NEXT: .LBB0_2:
110 ; GFX1032-NEXT: s_endpgm
112 ; GFX1164-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
114 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
115 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
116 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
117 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
118 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
119 ; GFX1164-NEXT: s_cbranch_execz .LBB0_2
120 ; GFX1164-NEXT: ; %bb.1:
121 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
122 ; GFX1164-NEXT: v_mov_b32_e32 v0, 0
123 ; GFX1164-NEXT: v_mov_b32_e32 v1, 4.0
124 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
125 ; GFX1164-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
126 ; GFX1164-NEXT: .LBB0_2:
127 ; GFX1164-NEXT: s_nop 0
128 ; GFX1164-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
129 ; GFX1164-NEXT: s_endpgm
131 ; GFX1132-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
133 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
134 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
135 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
136 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
137 ; GFX1132-NEXT: s_cbranch_execz .LBB0_2
138 ; GFX1132-NEXT: ; %bb.1:
139 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
140 ; GFX1132-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, 4.0
141 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
142 ; GFX1132-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
143 ; GFX1132-NEXT: .LBB0_2:
144 ; GFX1132-NEXT: s_nop 0
145 ; GFX1132-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
146 ; GFX1132-NEXT: s_endpgm
148 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
149 ; GFX7LESS-DPP: ; %bb.0:
150 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
151 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
152 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
153 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
154 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB0_3
155 ; GFX7LESS-DPP-NEXT: ; %bb.1:
156 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
157 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
158 ; GFX7LESS-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
159 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
160 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
161 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
162 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s2
163 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
164 ; GFX7LESS-DPP-NEXT: .LBB0_2: ; %atomicrmw.start
165 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
166 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
167 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
168 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
169 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v1
170 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v0
171 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
172 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
173 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
174 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
175 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v2
176 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
177 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB0_2
178 ; GFX7LESS-DPP-NEXT: .LBB0_3:
179 ; GFX7LESS-DPP-NEXT: s_endpgm
181 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
183 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
184 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
185 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
186 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
187 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB0_3
188 ; GFX9-DPP-NEXT: ; %bb.1:
189 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
190 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
191 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
192 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
193 ; GFX9-DPP-NEXT: s_load_dword s4, s[0:1], 0x0
194 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
195 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s4
196 ; GFX9-DPP-NEXT: .LBB0_2: ; %atomicrmw.start
197 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
198 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
199 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
200 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
201 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
202 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
203 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
204 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
205 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
206 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB0_2
207 ; GFX9-DPP-NEXT: .LBB0_3:
208 ; GFX9-DPP-NEXT: s_endpgm
210 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
211 ; GFX1064-DPP: ; %bb.0:
212 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
213 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
214 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
215 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
216 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB0_2
217 ; GFX1064-DPP-NEXT: ; %bb.1:
218 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
219 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 0
220 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 4.0
221 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
222 ; GFX1064-DPP-NEXT: global_atomic_fmin v0, v1, s[0:1]
223 ; GFX1064-DPP-NEXT: .LBB0_2:
224 ; GFX1064-DPP-NEXT: s_endpgm
226 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
227 ; GFX1032-DPP: ; %bb.0:
228 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
229 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
230 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
231 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB0_2
232 ; GFX1032-DPP-NEXT: ; %bb.1:
233 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
234 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 0
235 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 4.0
236 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
237 ; GFX1032-DPP-NEXT: global_atomic_fmin v0, v1, s[0:1]
238 ; GFX1032-DPP-NEXT: .LBB0_2:
239 ; GFX1032-DPP-NEXT: s_endpgm
241 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
242 ; GFX1164-DPP: ; %bb.0:
243 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
244 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
245 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
246 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
247 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
248 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB0_2
249 ; GFX1164-DPP-NEXT: ; %bb.1:
250 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
251 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 0
252 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 4.0
253 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
254 ; GFX1164-DPP-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
255 ; GFX1164-DPP-NEXT: .LBB0_2:
256 ; GFX1164-DPP-NEXT: s_nop 0
257 ; GFX1164-DPP-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
258 ; GFX1164-DPP-NEXT: s_endpgm
260 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe:
261 ; GFX1132-DPP: ; %bb.0:
262 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
263 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
264 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
265 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
266 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB0_2
267 ; GFX1132-DPP-NEXT: ; %bb.1:
268 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
269 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, 4.0
270 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
271 ; GFX1132-DPP-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
272 ; GFX1132-DPP-NEXT: .LBB0_2:
273 ; GFX1132-DPP-NEXT: s_nop 0
274 ; GFX1132-DPP-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
275 ; GFX1132-DPP-NEXT: s_endpgm
276 %result = atomicrmw fmin ptr addrspace(1) %ptr, float 4.0 syncscope("agent") monotonic, align 4
280 define amdgpu_kernel void @global_atomic_fmin_uni_address_div_value_agent_scope_unsafe(ptr addrspace(1) %ptr) #0 {
281 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
283 ; GFX7LESS-NEXT: s_mov_b32 s32, 0
284 ; GFX7LESS-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
285 ; GFX7LESS-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
286 ; GFX7LESS-NEXT: s_mov_b32 s38, -1
287 ; GFX7LESS-NEXT: s_mov_b32 s39, 0xe8f000
288 ; GFX7LESS-NEXT: s_add_u32 s36, s36, s9
289 ; GFX7LESS-NEXT: s_addc_u32 s37, s37, 0
290 ; GFX7LESS-NEXT: s_mov_b32 s14, s8
291 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[4:5]
292 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[2:3]
293 ; GFX7LESS-NEXT: s_add_u32 s8, s34, 44
294 ; GFX7LESS-NEXT: s_addc_u32 s9, s35, 0
295 ; GFX7LESS-NEXT: s_getpc_b64 s[2:3]
296 ; GFX7LESS-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
297 ; GFX7LESS-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
298 ; GFX7LESS-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
299 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
300 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
301 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
302 ; GFX7LESS-NEXT: v_or_b32_e32 v31, v0, v2
303 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[0:1]
304 ; GFX7LESS-NEXT: s_mov_b32 s12, s6
305 ; GFX7LESS-NEXT: s_mov_b32 s13, s7
306 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[36:37]
307 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[38:39]
308 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
309 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[16:17]
310 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
311 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0x7fc00000
312 ; GFX7LESS-NEXT: .LBB1_1: ; %ComputeLoop
313 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
314 ; GFX7LESS-NEXT: s_ff1_i32_b64 s2, s[0:1]
315 ; GFX7LESS-NEXT: v_mul_f32_e32 v1, 1.0, v2
316 ; GFX7LESS-NEXT: v_readlane_b32 s4, v0, s2
317 ; GFX7LESS-NEXT: s_lshl_b64 s[2:3], 1, s2
318 ; GFX7LESS-NEXT: v_mul_f32_e64 v2, 1.0, s4
319 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
320 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
321 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
322 ; GFX7LESS-NEXT: v_min_f32_e32 v2, v1, v2
323 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB1_1
324 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
325 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
326 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
327 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
328 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
329 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
330 ; GFX7LESS-NEXT: s_cbranch_execz .LBB1_5
331 ; GFX7LESS-NEXT: ; %bb.3:
332 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x9
333 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
334 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
335 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
336 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[0:3], 0
337 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
338 ; GFX7LESS-NEXT: v_mul_f32_e32 v2, 1.0, v2
339 ; GFX7LESS-NEXT: .LBB1_4: ; %atomicrmw.start
340 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
341 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
342 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
343 ; GFX7LESS-NEXT: v_min_f32_e32 v0, v0, v2
344 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
345 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, v1
346 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v0
347 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[3:4], off, s[0:3], 0 glc
348 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
349 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
350 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
351 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v3
352 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
353 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB1_4
354 ; GFX7LESS-NEXT: .LBB1_5:
355 ; GFX7LESS-NEXT: s_endpgm
357 ; GFX9-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
359 ; GFX9-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
360 ; GFX9-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
361 ; GFX9-NEXT: s_mov_b32 s38, -1
362 ; GFX9-NEXT: s_mov_b32 s39, 0xe00000
363 ; GFX9-NEXT: s_add_u32 s36, s36, s9
364 ; GFX9-NEXT: s_addc_u32 s37, s37, 0
365 ; GFX9-NEXT: s_mov_b64 s[34:35], s[2:3]
366 ; GFX9-NEXT: s_mov_b32 s14, s8
367 ; GFX9-NEXT: s_add_u32 s8, s34, 44
368 ; GFX9-NEXT: s_addc_u32 s9, s35, 0
369 ; GFX9-NEXT: s_getpc_b64 s[2:3]
370 ; GFX9-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
371 ; GFX9-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
372 ; GFX9-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
373 ; GFX9-NEXT: s_mov_b64 s[10:11], s[4:5]
374 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
375 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
376 ; GFX9-NEXT: s_mov_b64 s[4:5], s[0:1]
377 ; GFX9-NEXT: s_mov_b64 s[0:1], s[36:37]
378 ; GFX9-NEXT: v_or3_b32 v31, v0, v1, v2
379 ; GFX9-NEXT: s_mov_b32 s12, s6
380 ; GFX9-NEXT: s_mov_b32 s13, s7
381 ; GFX9-NEXT: s_mov_b64 s[2:3], s[38:39]
382 ; GFX9-NEXT: s_mov_b32 s32, 0
383 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
384 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[16:17]
385 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
386 ; GFX9-NEXT: v_mov_b32_e32 v2, 0x7fc00000
387 ; GFX9-NEXT: .LBB1_1: ; %ComputeLoop
388 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
389 ; GFX9-NEXT: s_ff1_i32_b64 s2, s[0:1]
390 ; GFX9-NEXT: v_readlane_b32 s4, v0, s2
391 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s2
392 ; GFX9-NEXT: v_max_f32_e32 v1, v2, v2
393 ; GFX9-NEXT: v_max_f32_e64 v2, s4, s4
394 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
395 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
396 ; GFX9-NEXT: v_min_f32_e32 v2, v1, v2
397 ; GFX9-NEXT: s_cbranch_scc1 .LBB1_1
398 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
399 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
400 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
401 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
402 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
403 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
404 ; GFX9-NEXT: s_cbranch_execz .LBB1_5
405 ; GFX9-NEXT: ; %bb.3:
406 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
407 ; GFX9-NEXT: v_mov_b32_e32 v3, 0
408 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
409 ; GFX9-NEXT: v_max_f32_e32 v2, v2, v2
410 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
411 ; GFX9-NEXT: global_load_dword v1, v3, s[0:1]
412 ; GFX9-NEXT: .LBB1_4: ; %atomicrmw.start
413 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
414 ; GFX9-NEXT: s_waitcnt vmcnt(0)
415 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
416 ; GFX9-NEXT: v_min_f32_e32 v0, v0, v2
417 ; GFX9-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
418 ; GFX9-NEXT: s_waitcnt vmcnt(0)
419 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
420 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
421 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
422 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
423 ; GFX9-NEXT: s_cbranch_execnz .LBB1_4
424 ; GFX9-NEXT: .LBB1_5:
425 ; GFX9-NEXT: s_endpgm
427 ; GFX1064-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
429 ; GFX1064-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
430 ; GFX1064-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
431 ; GFX1064-NEXT: s_mov_b32 s38, -1
432 ; GFX1064-NEXT: s_mov_b32 s39, 0x31e16000
433 ; GFX1064-NEXT: s_add_u32 s36, s36, s9
434 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
435 ; GFX1064-NEXT: s_addc_u32 s37, s37, 0
436 ; GFX1064-NEXT: s_mov_b32 s14, s8
437 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
438 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
439 ; GFX1064-NEXT: s_getpc_b64 s[2:3]
440 ; GFX1064-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
441 ; GFX1064-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
442 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
443 ; GFX1064-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
444 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
445 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[4:5]
446 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[0:1]
447 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[36:37]
448 ; GFX1064-NEXT: s_mov_b32 s12, s6
449 ; GFX1064-NEXT: v_or3_b32 v31, v0, v1, v2
450 ; GFX1064-NEXT: s_mov_b32 s13, s7
451 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[38:39]
452 ; GFX1064-NEXT: s_mov_b32 s32, 0
453 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
454 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[16:17]
455 ; GFX1064-NEXT: v_mov_b32_e32 v1, 0x7fc00000
456 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
457 ; GFX1064-NEXT: .LBB1_1: ; %ComputeLoop
458 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
459 ; GFX1064-NEXT: s_ff1_i32_b64 s2, s[0:1]
460 ; GFX1064-NEXT: v_max_f32_e32 v1, v1, v1
461 ; GFX1064-NEXT: v_readlane_b32 s3, v0, s2
462 ; GFX1064-NEXT: v_max_f32_e64 v2, s3, s3
463 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s2
464 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
465 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
466 ; GFX1064-NEXT: v_min_f32_e32 v1, v1, v2
467 ; GFX1064-NEXT: s_cbranch_scc1 .LBB1_1
468 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
469 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
470 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
471 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
472 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
473 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
474 ; GFX1064-NEXT: s_cbranch_execz .LBB1_4
475 ; GFX1064-NEXT: ; %bb.3:
476 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
477 ; GFX1064-NEXT: v_mov_b32_e32 v0, 0
478 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
479 ; GFX1064-NEXT: global_atomic_fmin v0, v1, s[0:1]
480 ; GFX1064-NEXT: .LBB1_4:
481 ; GFX1064-NEXT: s_endpgm
483 ; GFX1032-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
485 ; GFX1032-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
486 ; GFX1032-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
487 ; GFX1032-NEXT: s_mov_b32 s38, -1
488 ; GFX1032-NEXT: s_mov_b32 s39, 0x31c16000
489 ; GFX1032-NEXT: s_add_u32 s36, s36, s9
490 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
491 ; GFX1032-NEXT: s_addc_u32 s37, s37, 0
492 ; GFX1032-NEXT: s_mov_b32 s14, s8
493 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
494 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
495 ; GFX1032-NEXT: s_getpc_b64 s[2:3]
496 ; GFX1032-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
497 ; GFX1032-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
498 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
499 ; GFX1032-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
500 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
501 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[4:5]
502 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[0:1]
503 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[36:37]
504 ; GFX1032-NEXT: s_mov_b32 s12, s6
505 ; GFX1032-NEXT: v_or3_b32 v31, v0, v1, v2
506 ; GFX1032-NEXT: s_mov_b32 s13, s7
507 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[38:39]
508 ; GFX1032-NEXT: s_mov_b32 s32, 0
509 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
510 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[16:17]
511 ; GFX1032-NEXT: v_mov_b32_e32 v1, 0x7fc00000
512 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
513 ; GFX1032-NEXT: .LBB1_1: ; %ComputeLoop
514 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
515 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
516 ; GFX1032-NEXT: v_max_f32_e32 v1, v1, v1
517 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
518 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
519 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
520 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
521 ; GFX1032-NEXT: v_max_f32_e64 v2, s2, s2
522 ; GFX1032-NEXT: v_min_f32_e32 v1, v1, v2
523 ; GFX1032-NEXT: s_cbranch_scc1 .LBB1_1
524 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
525 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
526 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
527 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
528 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
529 ; GFX1032-NEXT: s_cbranch_execz .LBB1_4
530 ; GFX1032-NEXT: ; %bb.3:
531 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
532 ; GFX1032-NEXT: v_mov_b32_e32 v0, 0
533 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
534 ; GFX1032-NEXT: global_atomic_fmin v0, v1, s[0:1]
535 ; GFX1032-NEXT: .LBB1_4:
536 ; GFX1032-NEXT: s_endpgm
538 ; GFX1164-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
540 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
541 ; GFX1164-NEXT: s_mov_b32 s14, s8
542 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
543 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
544 ; GFX1164-NEXT: s_getpc_b64 s[2:3]
545 ; GFX1164-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
546 ; GFX1164-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
547 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
548 ; GFX1164-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
549 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[4:5]
550 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[0:1]
551 ; GFX1164-NEXT: s_mov_b32 s12, s6
552 ; GFX1164-NEXT: s_mov_b32 s13, s7
553 ; GFX1164-NEXT: s_mov_b32 s32, 0
554 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
555 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[2:3]
556 ; GFX1164-NEXT: v_mov_b32_e32 v1, 0x7fc00000
557 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
558 ; GFX1164-NEXT: .LBB1_1: ; %ComputeLoop
559 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
560 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
561 ; GFX1164-NEXT: s_ctz_i32_b64 s2, s[0:1]
562 ; GFX1164-NEXT: v_max_f32_e32 v1, v1, v1
563 ; GFX1164-NEXT: v_readlane_b32 s3, v0, s2
564 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
565 ; GFX1164-NEXT: v_max_f32_e64 v2, s3, s3
566 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s2
567 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
568 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
569 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
570 ; GFX1164-NEXT: v_min_f32_e32 v1, v1, v2
571 ; GFX1164-NEXT: s_cbranch_scc1 .LBB1_1
572 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
573 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
574 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
575 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
576 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
577 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
578 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
579 ; GFX1164-NEXT: s_cbranch_execz .LBB1_4
580 ; GFX1164-NEXT: ; %bb.3:
581 ; GFX1164-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
582 ; GFX1164-NEXT: v_mov_b32_e32 v0, 0
583 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
584 ; GFX1164-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
585 ; GFX1164-NEXT: .LBB1_4:
586 ; GFX1164-NEXT: s_endpgm
588 ; GFX1132-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
590 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
591 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
592 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
593 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
594 ; GFX1132-NEXT: s_getpc_b64 s[2:3]
595 ; GFX1132-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
596 ; GFX1132-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
597 ; GFX1132-NEXT: s_mov_b32 s12, s13
598 ; GFX1132-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
599 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[4:5]
600 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[0:1]
601 ; GFX1132-NEXT: s_mov_b32 s13, s14
602 ; GFX1132-NEXT: s_mov_b32 s14, s15
603 ; GFX1132-NEXT: s_mov_b32 s32, 0
604 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
605 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[2:3]
606 ; GFX1132-NEXT: v_mov_b32_e32 v1, 0x7fc00000
607 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
608 ; GFX1132-NEXT: .LBB1_1: ; %ComputeLoop
609 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
610 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
611 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
612 ; GFX1132-NEXT: v_max_f32_e32 v1, v1, v1
613 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
614 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
615 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
616 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
617 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
618 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
619 ; GFX1132-NEXT: v_max_f32_e64 v2, s2, s2
620 ; GFX1132-NEXT: v_min_f32_e32 v1, v1, v2
621 ; GFX1132-NEXT: s_cbranch_scc1 .LBB1_1
622 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
623 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
624 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
625 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
626 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
627 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
628 ; GFX1132-NEXT: s_cbranch_execz .LBB1_4
629 ; GFX1132-NEXT: ; %bb.3:
630 ; GFX1132-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
631 ; GFX1132-NEXT: v_mov_b32_e32 v0, 0
632 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
633 ; GFX1132-NEXT: global_atomic_min_f32 v0, v1, s[0:1]
634 ; GFX1132-NEXT: .LBB1_4:
635 ; GFX1132-NEXT: s_endpgm
637 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
638 ; GFX7LESS-DPP: ; %bb.0:
639 ; GFX7LESS-DPP-NEXT: s_mov_b32 s32, 0
640 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, SCRATCH_RSRC_DWORD0
641 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, SCRATCH_RSRC_DWORD1
642 ; GFX7LESS-DPP-NEXT: s_mov_b32 s42, -1
643 ; GFX7LESS-DPP-NEXT: s_mov_b32 s43, 0xe8f000
644 ; GFX7LESS-DPP-NEXT: s_add_u32 s40, s40, s9
645 ; GFX7LESS-DPP-NEXT: s_addc_u32 s41, s41, 0
646 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s8
647 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
648 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[36:37], s[2:3], 0x9
649 ; GFX7LESS-DPP-NEXT: s_mov_b32 s39, 0xf000
650 ; GFX7LESS-DPP-NEXT: s_mov_b32 s38, -1
651 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s2, 44
652 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s3, 0
653 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[2:3]
654 ; GFX7LESS-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
655 ; GFX7LESS-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
656 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
657 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
658 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
659 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
660 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v31, v0, v2
661 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
662 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s6
663 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s7
664 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[40:41]
665 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[42:43]
666 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
667 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
668 ; GFX7LESS-DPP-NEXT: buffer_load_dword v1, off, s[36:39], 0
669 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], 0
670 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v2, 1.0, v0
671 ; GFX7LESS-DPP-NEXT: .LBB1_1: ; %atomicrmw.start
672 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
673 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
674 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
675 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, v0, v2
676 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
677 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, v1
678 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v0
679 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[3:4], off, s[36:39], 0 glc
680 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
681 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
682 ; GFX7LESS-DPP-NEXT: s_or_b64 s[0:1], vcc, s[0:1]
683 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v3
684 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[0:1]
685 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB1_1
686 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
687 ; GFX7LESS-DPP-NEXT: s_endpgm
689 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
691 ; GFX9-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
692 ; GFX9-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
693 ; GFX9-DPP-NEXT: s_mov_b32 s38, -1
694 ; GFX9-DPP-NEXT: s_mov_b32 s39, 0xe00000
695 ; GFX9-DPP-NEXT: s_add_u32 s36, s36, s9
696 ; GFX9-DPP-NEXT: s_addc_u32 s37, s37, 0
697 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
698 ; GFX9-DPP-NEXT: s_mov_b32 s14, s8
699 ; GFX9-DPP-NEXT: s_add_u32 s8, s34, 44
700 ; GFX9-DPP-NEXT: s_addc_u32 s9, s35, 0
701 ; GFX9-DPP-NEXT: s_getpc_b64 s[2:3]
702 ; GFX9-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
703 ; GFX9-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
704 ; GFX9-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
705 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
706 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
707 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
708 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
709 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
710 ; GFX9-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
711 ; GFX9-DPP-NEXT: s_mov_b32 s12, s6
712 ; GFX9-DPP-NEXT: s_mov_b32 s13, s7
713 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
714 ; GFX9-DPP-NEXT: s_mov_b32 s32, 0
715 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
716 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
717 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
718 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
719 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
720 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
721 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
722 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, v0
723 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
724 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
725 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
726 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
727 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
728 ; GFX9-DPP-NEXT: s_nop 1
729 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:1 row_mask:0xf bank_mask:0xf
730 ; GFX9-DPP-NEXT: v_max_f32_e32 v4, v4, v4
731 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
732 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
733 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
734 ; GFX9-DPP-NEXT: s_nop 1
735 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:2 row_mask:0xf bank_mask:0xf
736 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
737 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
738 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
739 ; GFX9-DPP-NEXT: s_nop 1
740 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:4 row_mask:0xf bank_mask:0xf
741 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
742 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
743 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
744 ; GFX9-DPP-NEXT: s_nop 1
745 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:8 row_mask:0xf bank_mask:0xf
746 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
747 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
748 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
749 ; GFX9-DPP-NEXT: s_nop 1
750 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_bcast:15 row_mask:0xa bank_mask:0xf
751 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
752 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
753 ; GFX9-DPP-NEXT: s_nop 1
754 ; GFX9-DPP-NEXT: v_mov_b32_dpp v3, v4 row_bcast:31 row_mask:0xc bank_mask:0xf
755 ; GFX9-DPP-NEXT: v_max_f32_e32 v3, v3, v3
756 ; GFX9-DPP-NEXT: v_min_f32_e32 v3, v4, v3
757 ; GFX9-DPP-NEXT: v_readlane_b32 s4, v3, 63
758 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
759 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
760 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
761 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB1_3
762 ; GFX9-DPP-NEXT: ; %bb.1:
763 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
764 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
765 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
766 ; GFX9-DPP-NEXT: v_max_f32_e64 v6, s4, s4
767 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
768 ; GFX9-DPP-NEXT: global_load_dword v1, v2, s[0:1]
769 ; GFX9-DPP-NEXT: .LBB1_2: ; %atomicrmw.start
770 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
771 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
772 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
773 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, v0, v6
774 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
775 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
776 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
777 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
778 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
779 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
780 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB1_2
781 ; GFX9-DPP-NEXT: .LBB1_3:
782 ; GFX9-DPP-NEXT: s_endpgm
784 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
785 ; GFX1064-DPP: ; %bb.0:
786 ; GFX1064-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
787 ; GFX1064-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
788 ; GFX1064-DPP-NEXT: s_mov_b32 s38, -1
789 ; GFX1064-DPP-NEXT: s_mov_b32 s39, 0x31e16000
790 ; GFX1064-DPP-NEXT: s_add_u32 s36, s36, s9
791 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
792 ; GFX1064-DPP-NEXT: s_addc_u32 s37, s37, 0
793 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s8
794 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
795 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
796 ; GFX1064-DPP-NEXT: s_getpc_b64 s[2:3]
797 ; GFX1064-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
798 ; GFX1064-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
799 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
800 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
801 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
802 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
803 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
804 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
805 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s6
806 ; GFX1064-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
807 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s7
808 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
809 ; GFX1064-DPP-NEXT: s_mov_b32 s32, 0
810 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
811 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
812 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
813 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
814 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
815 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v0
816 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
817 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
818 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
819 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
820 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
821 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
822 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
823 ; GFX1064-DPP-NEXT: v_max_f32_e32 v3, v3, v3
824 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
825 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
826 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
827 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
828 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
829 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
830 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
831 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
832 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
833 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
834 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
835 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
836 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v3
837 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
838 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
839 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
840 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v3, 32
841 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v3, 0
842 ; GFX1064-DPP-NEXT: v_max_f32_e64 v3, s2, s2
843 ; GFX1064-DPP-NEXT: v_max_f32_e64 v4, s3, s3
844 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
845 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
846 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
847 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
848 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
849 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v0
850 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, v3
851 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
852 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
853 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB1_2
854 ; GFX1064-DPP-NEXT: ; %bb.1:
855 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
856 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 0
857 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
858 ; GFX1064-DPP-NEXT: global_atomic_fmin v1, v0, s[0:1]
859 ; GFX1064-DPP-NEXT: .LBB1_2:
860 ; GFX1064-DPP-NEXT: s_endpgm
862 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
863 ; GFX1032-DPP: ; %bb.0:
864 ; GFX1032-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
865 ; GFX1032-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
866 ; GFX1032-DPP-NEXT: s_mov_b32 s38, -1
867 ; GFX1032-DPP-NEXT: s_mov_b32 s39, 0x31c16000
868 ; GFX1032-DPP-NEXT: s_add_u32 s36, s36, s9
869 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
870 ; GFX1032-DPP-NEXT: s_addc_u32 s37, s37, 0
871 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s8
872 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
873 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
874 ; GFX1032-DPP-NEXT: s_getpc_b64 s[2:3]
875 ; GFX1032-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
876 ; GFX1032-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
877 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
878 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
879 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
880 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
881 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
882 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
883 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s6
884 ; GFX1032-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
885 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s7
886 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
887 ; GFX1032-DPP-NEXT: s_mov_b32 s32, 0
888 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
889 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
890 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
891 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
892 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
893 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v0
894 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
895 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
896 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
897 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
898 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
899 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
900 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
901 ; GFX1032-DPP-NEXT: v_max_f32_e32 v3, v3, v3
902 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v4, v3
903 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
904 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
905 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
906 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
907 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
908 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
909 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
910 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
911 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
912 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
913 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
914 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v3
915 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
916 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
917 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
918 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
919 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
920 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, v3
921 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v1
922 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
923 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB1_2
924 ; GFX1032-DPP-NEXT: ; %bb.1:
925 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
926 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 0
927 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
928 ; GFX1032-DPP-NEXT: global_atomic_fmin v1, v0, s[0:1]
929 ; GFX1032-DPP-NEXT: .LBB1_2:
930 ; GFX1032-DPP-NEXT: s_endpgm
932 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
933 ; GFX1164-DPP: ; %bb.0:
934 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
935 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s8
936 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
937 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
938 ; GFX1164-DPP-NEXT: s_getpc_b64 s[2:3]
939 ; GFX1164-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
940 ; GFX1164-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
941 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
942 ; GFX1164-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
943 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
944 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
945 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
946 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
947 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 0
948 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
949 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
950 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
951 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
952 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
953 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v0
954 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
955 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
956 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
957 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
958 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
959 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
960 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
961 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
962 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
963 ; GFX1164-DPP-NEXT: v_max_f32_e32 v1, v1, v1
964 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v2, v1
965 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
966 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
967 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
968 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
969 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
970 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
971 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
972 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
973 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
974 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
975 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
976 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
977 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
978 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
979 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
980 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
981 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v1
982 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
983 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
984 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
985 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
986 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
987 ; GFX1164-DPP-NEXT: v_permlane64_b32 v2, v1
988 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
989 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
990 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
991 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
992 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
993 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
994 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
995 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
996 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
997 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
998 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
999 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, v1
1000 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
1001 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v4
1002 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB1_2
1003 ; GFX1164-DPP-NEXT: ; %bb.1:
1004 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
1005 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
1006 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
1007 ; GFX1164-DPP-NEXT: global_atomic_min_f32 v4, v0, s[0:1]
1008 ; GFX1164-DPP-NEXT: .LBB1_2:
1009 ; GFX1164-DPP-NEXT: s_endpgm
1011 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_div_value_agent_scope_unsafe:
1012 ; GFX1132-DPP: ; %bb.0:
1013 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
1014 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
1015 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
1016 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
1017 ; GFX1132-DPP-NEXT: s_getpc_b64 s[2:3]
1018 ; GFX1132-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1019 ; GFX1132-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1020 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
1021 ; GFX1132-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
1022 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
1023 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
1024 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
1025 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
1026 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 0
1027 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
1028 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
1029 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
1030 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
1031 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
1032 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v0
1033 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
1034 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1035 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
1036 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
1037 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
1038 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
1039 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v2, v2 :: v_dual_mov_b32 v3, 0x7fc00000
1040 ; GFX1132-DPP-NEXT: v_max_f32_e32 v1, v1, v1
1041 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1042 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v2, v1
1043 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
1044 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1045 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
1046 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
1047 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1048 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
1049 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
1050 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1051 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
1052 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
1053 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1054 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v3, v3
1055 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
1056 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1057 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v1
1058 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
1059 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1060 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v2, v2
1061 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
1062 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
1063 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
1064 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
1065 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, v1
1066 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
1067 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
1068 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v4
1069 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB1_2
1070 ; GFX1132-DPP-NEXT: ; %bb.1:
1071 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
1072 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, 0
1073 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
1074 ; GFX1132-DPP-NEXT: global_atomic_min_f32 v4, v0, s[0:1]
1075 ; GFX1132-DPP-NEXT: .LBB1_2:
1076 ; GFX1132-DPP-NEXT: s_endpgm
1077 %divValue = call float @div.float.value()
1078 %result = atomicrmw fmin ptr addrspace(1) %ptr, float %divValue syncscope("agent") monotonic, align 4
1082 define amdgpu_kernel void @global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe(ptr addrspace(1) %ptr) #0 {
1083 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1084 ; GFX7LESS: ; %bb.0:
1085 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
1086 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
1087 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1088 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
1089 ; GFX7LESS-NEXT: s_cbranch_execz .LBB2_3
1090 ; GFX7LESS-NEXT: ; %bb.1:
1091 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
1092 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
1093 ; GFX7LESS-NEXT: s_load_dword s2, s[0:1], 0x0
1094 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
1095 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
1096 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
1097 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s2
1098 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
1099 ; GFX7LESS-NEXT: .LBB2_2: ; %atomicrmw.start
1100 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
1101 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
1102 ; GFX7LESS-NEXT: v_min_f32_e32 v0, 4.0, v0
1103 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
1104 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v1
1105 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v0
1106 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
1107 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
1108 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
1109 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
1110 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v2
1111 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
1112 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB2_2
1113 ; GFX7LESS-NEXT: .LBB2_3:
1114 ; GFX7LESS-NEXT: s_endpgm
1116 ; GFX9-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1118 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1119 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1120 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1121 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
1122 ; GFX9-NEXT: s_cbranch_execz .LBB2_3
1123 ; GFX9-NEXT: ; %bb.1:
1124 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1125 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
1126 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
1127 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
1128 ; GFX9-NEXT: s_load_dword s4, s[0:1], 0x0
1129 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
1130 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
1131 ; GFX9-NEXT: .LBB2_2: ; %atomicrmw.start
1132 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
1133 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
1134 ; GFX9-NEXT: v_min_f32_e32 v0, 4.0, v0
1135 ; GFX9-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1136 ; GFX9-NEXT: s_waitcnt vmcnt(0)
1137 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1138 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1139 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
1140 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
1141 ; GFX9-NEXT: s_cbranch_execnz .LBB2_2
1142 ; GFX9-NEXT: .LBB2_3:
1143 ; GFX9-NEXT: s_endpgm
1145 ; GFX1064-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1147 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1148 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1149 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1150 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
1151 ; GFX1064-NEXT: s_cbranch_execz .LBB2_3
1152 ; GFX1064-NEXT: ; %bb.1:
1153 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1154 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0
1155 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
1156 ; GFX1064-NEXT: s_load_dword s2, s[0:1], 0x0
1157 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
1158 ; GFX1064-NEXT: v_mov_b32_e32 v1, s2
1159 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
1160 ; GFX1064-NEXT: .LBB2_2: ; %atomicrmw.start
1161 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
1162 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
1163 ; GFX1064-NEXT: v_min_f32_e32 v0, 4.0, v0
1164 ; GFX1064-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1165 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
1166 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1167 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
1168 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1169 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
1170 ; GFX1064-NEXT: s_cbranch_execnz .LBB2_2
1171 ; GFX1064-NEXT: .LBB2_3:
1172 ; GFX1064-NEXT: s_endpgm
1174 ; GFX1032-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1176 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1177 ; GFX1032-NEXT: s_mov_b32 s4, 0
1178 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
1179 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
1180 ; GFX1032-NEXT: s_cbranch_execz .LBB2_3
1181 ; GFX1032-NEXT: ; %bb.1:
1182 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1183 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
1184 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
1185 ; GFX1032-NEXT: s_load_dword s2, s[0:1], 0x0
1186 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
1187 ; GFX1032-NEXT: v_mov_b32_e32 v1, s2
1188 ; GFX1032-NEXT: .LBB2_2: ; %atomicrmw.start
1189 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
1190 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
1191 ; GFX1032-NEXT: v_min_f32_e32 v0, 4.0, v0
1192 ; GFX1032-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1193 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
1194 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1195 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
1196 ; GFX1032-NEXT: s_or_b32 s4, vcc_lo, s4
1197 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
1198 ; GFX1032-NEXT: s_cbranch_execnz .LBB2_2
1199 ; GFX1032-NEXT: .LBB2_3:
1200 ; GFX1032-NEXT: s_endpgm
1202 ; GFX1164-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1204 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1205 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
1206 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1207 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1208 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
1209 ; GFX1164-NEXT: s_cbranch_execz .LBB2_3
1210 ; GFX1164-NEXT: ; %bb.1:
1211 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
1212 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
1213 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
1214 ; GFX1164-NEXT: s_load_b32 s2, s[0:1], 0x0
1215 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
1216 ; GFX1164-NEXT: v_mov_b32_e32 v1, s2
1217 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
1218 ; GFX1164-NEXT: .LBB2_2: ; %atomicrmw.start
1219 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
1220 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1221 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
1222 ; GFX1164-NEXT: v_min_f32_e32 v0, 4.0, v0
1223 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
1224 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
1225 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1226 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
1227 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1228 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1229 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
1230 ; GFX1164-NEXT: s_cbranch_execnz .LBB2_2
1231 ; GFX1164-NEXT: .LBB2_3:
1232 ; GFX1164-NEXT: s_endpgm
1234 ; GFX1132-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1236 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1237 ; GFX1132-NEXT: s_mov_b32 s4, 0
1238 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
1239 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
1240 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
1241 ; GFX1132-NEXT: s_cbranch_execz .LBB2_3
1242 ; GFX1132-NEXT: ; %bb.1:
1243 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
1244 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
1245 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
1246 ; GFX1132-NEXT: s_load_b32 s2, s[0:1], 0x0
1247 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
1248 ; GFX1132-NEXT: v_mov_b32_e32 v1, s2
1249 ; GFX1132-NEXT: .LBB2_2: ; %atomicrmw.start
1250 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
1251 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1252 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
1253 ; GFX1132-NEXT: v_min_f32_e32 v0, 4.0, v0
1254 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
1255 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
1256 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1257 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
1258 ; GFX1132-NEXT: s_or_b32 s4, vcc_lo, s4
1259 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1260 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
1261 ; GFX1132-NEXT: s_cbranch_execnz .LBB2_2
1262 ; GFX1132-NEXT: .LBB2_3:
1263 ; GFX1132-NEXT: s_endpgm
1265 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1266 ; GFX7LESS-DPP: ; %bb.0:
1267 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
1268 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
1269 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1270 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
1271 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB2_3
1272 ; GFX7LESS-DPP-NEXT: ; %bb.1:
1273 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
1274 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
1275 ; GFX7LESS-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
1276 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
1277 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
1278 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
1279 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s2
1280 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
1281 ; GFX7LESS-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1282 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1283 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
1284 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1285 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
1286 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v1
1287 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v0
1288 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
1289 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
1290 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
1291 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
1292 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v2
1293 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
1294 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB2_2
1295 ; GFX7LESS-DPP-NEXT: .LBB2_3:
1296 ; GFX7LESS-DPP-NEXT: s_endpgm
1298 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1299 ; GFX9-DPP: ; %bb.0:
1300 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1301 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1302 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1303 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
1304 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB2_3
1305 ; GFX9-DPP-NEXT: ; %bb.1:
1306 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1307 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
1308 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
1309 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
1310 ; GFX9-DPP-NEXT: s_load_dword s4, s[0:1], 0x0
1311 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
1312 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s4
1313 ; GFX9-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1314 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1315 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
1316 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1317 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1318 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
1319 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1320 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1321 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
1322 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
1323 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB2_2
1324 ; GFX9-DPP-NEXT: .LBB2_3:
1325 ; GFX9-DPP-NEXT: s_endpgm
1327 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1328 ; GFX1064-DPP: ; %bb.0:
1329 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1330 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1331 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1332 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
1333 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB2_3
1334 ; GFX1064-DPP-NEXT: ; %bb.1:
1335 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1336 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
1337 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
1338 ; GFX1064-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
1339 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
1340 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s2
1341 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
1342 ; GFX1064-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1343 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1344 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
1345 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1346 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1347 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
1348 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1349 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
1350 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1351 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
1352 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB2_2
1353 ; GFX1064-DPP-NEXT: .LBB2_3:
1354 ; GFX1064-DPP-NEXT: s_endpgm
1356 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1357 ; GFX1032-DPP: ; %bb.0:
1358 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1359 ; GFX1032-DPP-NEXT: s_mov_b32 s4, 0
1360 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
1361 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
1362 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB2_3
1363 ; GFX1032-DPP-NEXT: ; %bb.1:
1364 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
1365 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
1366 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
1367 ; GFX1032-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
1368 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
1369 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s2
1370 ; GFX1032-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1371 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1372 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
1373 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1374 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
1375 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
1376 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1377 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
1378 ; GFX1032-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
1379 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
1380 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB2_2
1381 ; GFX1032-DPP-NEXT: .LBB2_3:
1382 ; GFX1032-DPP-NEXT: s_endpgm
1384 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1385 ; GFX1164-DPP: ; %bb.0:
1386 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1387 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
1388 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1389 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1390 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
1391 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB2_3
1392 ; GFX1164-DPP-NEXT: ; %bb.1:
1393 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
1394 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0
1395 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
1396 ; GFX1164-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
1397 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
1398 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s2
1399 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
1400 ; GFX1164-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1401 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1402 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1403 ; GFX1164-DPP-NEXT: v_max_f32_e32 v0, v1, v1
1404 ; GFX1164-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1405 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
1406 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
1407 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1408 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, v0
1409 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1410 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1411 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
1412 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB2_2
1413 ; GFX1164-DPP-NEXT: .LBB2_3:
1414 ; GFX1164-DPP-NEXT: s_endpgm
1416 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_one_as_scope_unsafe:
1417 ; GFX1132-DPP: ; %bb.0:
1418 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1419 ; GFX1132-DPP-NEXT: s_mov_b32 s4, 0
1420 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
1421 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
1422 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
1423 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB2_3
1424 ; GFX1132-DPP-NEXT: ; %bb.1:
1425 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
1426 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0
1427 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
1428 ; GFX1132-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
1429 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
1430 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, s2
1431 ; GFX1132-DPP-NEXT: .LBB2_2: ; %atomicrmw.start
1432 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1433 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1434 ; GFX1132-DPP-NEXT: v_max_f32_e32 v0, v1, v1
1435 ; GFX1132-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
1436 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
1437 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
1438 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1439 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, v0
1440 ; GFX1132-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
1441 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1442 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
1443 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB2_2
1444 ; GFX1132-DPP-NEXT: .LBB2_3:
1445 ; GFX1132-DPP-NEXT: s_endpgm
1446 %result = atomicrmw fmin ptr addrspace(1) %ptr, float 4.0 syncscope("one-as") monotonic
1451 define amdgpu_kernel void @global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe(ptr addrspace(1) %ptr) #0 {
1452 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1453 ; GFX7LESS: ; %bb.0:
1454 ; GFX7LESS-NEXT: s_mov_b32 s32, 0
1455 ; GFX7LESS-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
1456 ; GFX7LESS-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
1457 ; GFX7LESS-NEXT: s_mov_b32 s38, -1
1458 ; GFX7LESS-NEXT: s_mov_b32 s39, 0xe8f000
1459 ; GFX7LESS-NEXT: s_add_u32 s36, s36, s9
1460 ; GFX7LESS-NEXT: s_addc_u32 s37, s37, 0
1461 ; GFX7LESS-NEXT: s_mov_b32 s14, s8
1462 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[4:5]
1463 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[2:3]
1464 ; GFX7LESS-NEXT: s_add_u32 s8, s34, 44
1465 ; GFX7LESS-NEXT: s_addc_u32 s9, s35, 0
1466 ; GFX7LESS-NEXT: s_getpc_b64 s[2:3]
1467 ; GFX7LESS-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1468 ; GFX7LESS-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1469 ; GFX7LESS-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1470 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1471 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1472 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
1473 ; GFX7LESS-NEXT: v_or_b32_e32 v31, v0, v2
1474 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[0:1]
1475 ; GFX7LESS-NEXT: s_mov_b32 s12, s6
1476 ; GFX7LESS-NEXT: s_mov_b32 s13, s7
1477 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[36:37]
1478 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[38:39]
1479 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
1480 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[16:17]
1481 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
1482 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1483 ; GFX7LESS-NEXT: .LBB3_1: ; %ComputeLoop
1484 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
1485 ; GFX7LESS-NEXT: s_ff1_i32_b64 s2, s[0:1]
1486 ; GFX7LESS-NEXT: v_mul_f32_e32 v1, 1.0, v2
1487 ; GFX7LESS-NEXT: v_readlane_b32 s4, v0, s2
1488 ; GFX7LESS-NEXT: s_lshl_b64 s[2:3], 1, s2
1489 ; GFX7LESS-NEXT: v_mul_f32_e64 v2, 1.0, s4
1490 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
1491 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
1492 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
1493 ; GFX7LESS-NEXT: v_min_f32_e32 v2, v1, v2
1494 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB3_1
1495 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
1496 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
1497 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
1498 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1499 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
1500 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
1501 ; GFX7LESS-NEXT: s_cbranch_execz .LBB3_5
1502 ; GFX7LESS-NEXT: ; %bb.3:
1503 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x9
1504 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
1505 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
1506 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
1507 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[0:3], 0
1508 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
1509 ; GFX7LESS-NEXT: v_mul_f32_e32 v2, 1.0, v2
1510 ; GFX7LESS-NEXT: .LBB3_4: ; %atomicrmw.start
1511 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
1512 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
1513 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
1514 ; GFX7LESS-NEXT: v_min_f32_e32 v0, v0, v2
1515 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
1516 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, v1
1517 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v0
1518 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[3:4], off, s[0:3], 0 glc
1519 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
1520 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
1521 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
1522 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v3
1523 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
1524 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB3_4
1525 ; GFX7LESS-NEXT: .LBB3_5:
1526 ; GFX7LESS-NEXT: s_endpgm
1528 ; GFX9-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1530 ; GFX9-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
1531 ; GFX9-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
1532 ; GFX9-NEXT: s_mov_b32 s38, -1
1533 ; GFX9-NEXT: s_mov_b32 s39, 0xe00000
1534 ; GFX9-NEXT: s_add_u32 s36, s36, s9
1535 ; GFX9-NEXT: s_addc_u32 s37, s37, 0
1536 ; GFX9-NEXT: s_mov_b64 s[34:35], s[2:3]
1537 ; GFX9-NEXT: s_mov_b32 s14, s8
1538 ; GFX9-NEXT: s_add_u32 s8, s34, 44
1539 ; GFX9-NEXT: s_addc_u32 s9, s35, 0
1540 ; GFX9-NEXT: s_getpc_b64 s[2:3]
1541 ; GFX9-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1542 ; GFX9-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1543 ; GFX9-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1544 ; GFX9-NEXT: s_mov_b64 s[10:11], s[4:5]
1545 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1546 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1547 ; GFX9-NEXT: s_mov_b64 s[4:5], s[0:1]
1548 ; GFX9-NEXT: s_mov_b64 s[0:1], s[36:37]
1549 ; GFX9-NEXT: v_or3_b32 v31, v0, v1, v2
1550 ; GFX9-NEXT: s_mov_b32 s12, s6
1551 ; GFX9-NEXT: s_mov_b32 s13, s7
1552 ; GFX9-NEXT: s_mov_b64 s[2:3], s[38:39]
1553 ; GFX9-NEXT: s_mov_b32 s32, 0
1554 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
1555 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[16:17]
1556 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
1557 ; GFX9-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1558 ; GFX9-NEXT: .LBB3_1: ; %ComputeLoop
1559 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
1560 ; GFX9-NEXT: s_ff1_i32_b64 s2, s[0:1]
1561 ; GFX9-NEXT: v_readlane_b32 s4, v0, s2
1562 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s2
1563 ; GFX9-NEXT: v_max_f32_e32 v1, v2, v2
1564 ; GFX9-NEXT: v_max_f32_e64 v2, s4, s4
1565 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
1566 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
1567 ; GFX9-NEXT: v_min_f32_e32 v2, v1, v2
1568 ; GFX9-NEXT: s_cbranch_scc1 .LBB3_1
1569 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
1570 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1571 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1572 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1573 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
1574 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
1575 ; GFX9-NEXT: s_cbranch_execz .LBB3_5
1576 ; GFX9-NEXT: ; %bb.3:
1577 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
1578 ; GFX9-NEXT: v_mov_b32_e32 v3, 0
1579 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
1580 ; GFX9-NEXT: v_max_f32_e32 v2, v2, v2
1581 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
1582 ; GFX9-NEXT: global_load_dword v1, v3, s[0:1]
1583 ; GFX9-NEXT: .LBB3_4: ; %atomicrmw.start
1584 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
1585 ; GFX9-NEXT: s_waitcnt vmcnt(0)
1586 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
1587 ; GFX9-NEXT: v_min_f32_e32 v0, v0, v2
1588 ; GFX9-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
1589 ; GFX9-NEXT: s_waitcnt vmcnt(0)
1590 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1591 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1592 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
1593 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
1594 ; GFX9-NEXT: s_cbranch_execnz .LBB3_4
1595 ; GFX9-NEXT: .LBB3_5:
1596 ; GFX9-NEXT: s_endpgm
1598 ; GFX1064-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1600 ; GFX1064-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
1601 ; GFX1064-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
1602 ; GFX1064-NEXT: s_mov_b32 s38, -1
1603 ; GFX1064-NEXT: s_mov_b32 s39, 0x31e16000
1604 ; GFX1064-NEXT: s_add_u32 s36, s36, s9
1605 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
1606 ; GFX1064-NEXT: s_addc_u32 s37, s37, 0
1607 ; GFX1064-NEXT: s_mov_b32 s14, s8
1608 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
1609 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
1610 ; GFX1064-NEXT: s_getpc_b64 s[2:3]
1611 ; GFX1064-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1612 ; GFX1064-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1613 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1614 ; GFX1064-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1615 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1616 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[4:5]
1617 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[0:1]
1618 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[36:37]
1619 ; GFX1064-NEXT: s_mov_b32 s12, s6
1620 ; GFX1064-NEXT: v_or3_b32 v31, v0, v1, v2
1621 ; GFX1064-NEXT: s_mov_b32 s13, s7
1622 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[38:39]
1623 ; GFX1064-NEXT: s_mov_b32 s32, 0
1624 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
1625 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[16:17]
1626 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1627 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
1628 ; GFX1064-NEXT: .LBB3_1: ; %ComputeLoop
1629 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
1630 ; GFX1064-NEXT: s_ff1_i32_b64 s2, s[0:1]
1631 ; GFX1064-NEXT: v_max_f32_e32 v1, v2, v2
1632 ; GFX1064-NEXT: v_readlane_b32 s3, v0, s2
1633 ; GFX1064-NEXT: v_max_f32_e64 v2, s3, s3
1634 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s2
1635 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
1636 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
1637 ; GFX1064-NEXT: v_min_f32_e32 v2, v1, v2
1638 ; GFX1064-NEXT: s_cbranch_scc1 .LBB3_1
1639 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
1640 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1641 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1642 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
1643 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
1644 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
1645 ; GFX1064-NEXT: s_cbranch_execz .LBB3_5
1646 ; GFX1064-NEXT: ; %bb.3:
1647 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
1648 ; GFX1064-NEXT: v_mov_b32_e32 v3, 0
1649 ; GFX1064-NEXT: v_max_f32_e32 v2, v2, v2
1650 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
1651 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
1652 ; GFX1064-NEXT: global_load_dword v1, v3, s[0:1]
1653 ; GFX1064-NEXT: .LBB3_4: ; %atomicrmw.start
1654 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
1655 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
1656 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
1657 ; GFX1064-NEXT: v_min_f32_e32 v0, v0, v2
1658 ; GFX1064-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
1659 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
1660 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1661 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
1662 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1663 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
1664 ; GFX1064-NEXT: s_cbranch_execnz .LBB3_4
1665 ; GFX1064-NEXT: .LBB3_5:
1666 ; GFX1064-NEXT: s_endpgm
1668 ; GFX1032-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1670 ; GFX1032-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
1671 ; GFX1032-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
1672 ; GFX1032-NEXT: s_mov_b32 s38, -1
1673 ; GFX1032-NEXT: s_mov_b32 s39, 0x31c16000
1674 ; GFX1032-NEXT: s_add_u32 s36, s36, s9
1675 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
1676 ; GFX1032-NEXT: s_addc_u32 s37, s37, 0
1677 ; GFX1032-NEXT: s_mov_b32 s14, s8
1678 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
1679 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
1680 ; GFX1032-NEXT: s_getpc_b64 s[2:3]
1681 ; GFX1032-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1682 ; GFX1032-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1683 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1684 ; GFX1032-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1685 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1686 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[4:5]
1687 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[0:1]
1688 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[36:37]
1689 ; GFX1032-NEXT: s_mov_b32 s12, s6
1690 ; GFX1032-NEXT: v_or3_b32 v31, v0, v1, v2
1691 ; GFX1032-NEXT: s_mov_b32 s13, s7
1692 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[38:39]
1693 ; GFX1032-NEXT: s_mov_b32 s32, 0
1694 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
1695 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[16:17]
1696 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1697 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
1698 ; GFX1032-NEXT: .LBB3_1: ; %ComputeLoop
1699 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
1700 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
1701 ; GFX1032-NEXT: v_max_f32_e32 v1, v2, v2
1702 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
1703 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
1704 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
1705 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
1706 ; GFX1032-NEXT: v_max_f32_e64 v2, s2, s2
1707 ; GFX1032-NEXT: v_min_f32_e32 v2, v1, v2
1708 ; GFX1032-NEXT: s_cbranch_scc1 .LBB3_1
1709 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
1710 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1711 ; GFX1032-NEXT: s_mov_b32 s2, 0
1712 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
1713 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
1714 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
1715 ; GFX1032-NEXT: s_cbranch_execz .LBB3_5
1716 ; GFX1032-NEXT: ; %bb.3:
1717 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
1718 ; GFX1032-NEXT: v_mov_b32_e32 v3, 0
1719 ; GFX1032-NEXT: v_max_f32_e32 v2, v2, v2
1720 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
1721 ; GFX1032-NEXT: global_load_dword v1, v3, s[0:1]
1722 ; GFX1032-NEXT: .LBB3_4: ; %atomicrmw.start
1723 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
1724 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
1725 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
1726 ; GFX1032-NEXT: v_min_f32_e32 v0, v0, v2
1727 ; GFX1032-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
1728 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
1729 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1730 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
1731 ; GFX1032-NEXT: s_or_b32 s2, vcc_lo, s2
1732 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
1733 ; GFX1032-NEXT: s_cbranch_execnz .LBB3_4
1734 ; GFX1032-NEXT: .LBB3_5:
1735 ; GFX1032-NEXT: s_endpgm
1737 ; GFX1164-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1739 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
1740 ; GFX1164-NEXT: s_mov_b32 s14, s8
1741 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
1742 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
1743 ; GFX1164-NEXT: s_getpc_b64 s[2:3]
1744 ; GFX1164-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1745 ; GFX1164-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1746 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
1747 ; GFX1164-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
1748 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[4:5]
1749 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[0:1]
1750 ; GFX1164-NEXT: s_mov_b32 s12, s6
1751 ; GFX1164-NEXT: s_mov_b32 s13, s7
1752 ; GFX1164-NEXT: s_mov_b32 s32, 0
1753 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
1754 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[2:3]
1755 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1756 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
1757 ; GFX1164-NEXT: .LBB3_1: ; %ComputeLoop
1758 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
1759 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1760 ; GFX1164-NEXT: s_ctz_i32_b64 s2, s[0:1]
1761 ; GFX1164-NEXT: v_max_f32_e32 v1, v2, v2
1762 ; GFX1164-NEXT: v_readlane_b32 s3, v0, s2
1763 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
1764 ; GFX1164-NEXT: v_max_f32_e64 v2, s3, s3
1765 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s2
1766 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
1767 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1768 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
1769 ; GFX1164-NEXT: v_min_f32_e32 v2, v1, v2
1770 ; GFX1164-NEXT: s_cbranch_scc1 .LBB3_1
1771 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
1772 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1773 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
1774 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1775 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
1776 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
1777 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
1778 ; GFX1164-NEXT: s_cbranch_execz .LBB3_5
1779 ; GFX1164-NEXT: ; %bb.3:
1780 ; GFX1164-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
1781 ; GFX1164-NEXT: v_mov_b32_e32 v3, 0
1782 ; GFX1164-NEXT: v_max_f32_e32 v2, v2, v2
1783 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
1784 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
1785 ; GFX1164-NEXT: global_load_b32 v1, v3, s[0:1]
1786 ; GFX1164-NEXT: .LBB3_4: ; %atomicrmw.start
1787 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
1788 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
1789 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
1790 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
1791 ; GFX1164-NEXT: v_min_f32_e32 v0, v0, v2
1792 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v3, v[0:1], s[0:1] glc
1793 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
1794 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
1795 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
1796 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
1797 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1798 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
1799 ; GFX1164-NEXT: s_cbranch_execnz .LBB3_4
1800 ; GFX1164-NEXT: .LBB3_5:
1801 ; GFX1164-NEXT: s_endpgm
1803 ; GFX1132-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1805 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
1806 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
1807 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
1808 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
1809 ; GFX1132-NEXT: s_getpc_b64 s[2:3]
1810 ; GFX1132-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1811 ; GFX1132-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1812 ; GFX1132-NEXT: s_mov_b32 s12, s13
1813 ; GFX1132-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
1814 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[4:5]
1815 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[0:1]
1816 ; GFX1132-NEXT: s_mov_b32 s13, s14
1817 ; GFX1132-NEXT: s_mov_b32 s14, s15
1818 ; GFX1132-NEXT: s_mov_b32 s32, 0
1819 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
1820 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[2:3]
1821 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0x7fc00000
1822 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
1823 ; GFX1132-NEXT: .LBB3_1: ; %ComputeLoop
1824 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
1825 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1826 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
1827 ; GFX1132-NEXT: v_max_f32_e32 v1, v2, v2
1828 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
1829 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
1830 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
1831 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
1832 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
1833 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1834 ; GFX1132-NEXT: v_max_f32_e64 v2, s2, s2
1835 ; GFX1132-NEXT: v_min_f32_e32 v2, v1, v2
1836 ; GFX1132-NEXT: s_cbranch_scc1 .LBB3_1
1837 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
1838 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
1839 ; GFX1132-NEXT: s_mov_b32 s2, 0
1840 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
1841 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
1842 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
1843 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
1844 ; GFX1132-NEXT: s_cbranch_execz .LBB3_5
1845 ; GFX1132-NEXT: ; %bb.3:
1846 ; GFX1132-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
1847 ; GFX1132-NEXT: v_dual_mov_b32 v3, 0 :: v_dual_max_f32 v2, v2, v2
1848 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
1849 ; GFX1132-NEXT: global_load_b32 v1, v3, s[0:1]
1850 ; GFX1132-NEXT: .LBB3_4: ; %atomicrmw.start
1851 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
1852 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
1853 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
1854 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
1855 ; GFX1132-NEXT: v_min_f32_e32 v0, v0, v2
1856 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v3, v[0:1], s[0:1] glc
1857 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
1858 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
1859 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
1860 ; GFX1132-NEXT: s_or_b32 s2, vcc_lo, s2
1861 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
1862 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
1863 ; GFX1132-NEXT: s_cbranch_execnz .LBB3_4
1864 ; GFX1132-NEXT: .LBB3_5:
1865 ; GFX1132-NEXT: s_endpgm
1867 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1868 ; GFX7LESS-DPP: ; %bb.0:
1869 ; GFX7LESS-DPP-NEXT: s_mov_b32 s32, 0
1870 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, SCRATCH_RSRC_DWORD0
1871 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, SCRATCH_RSRC_DWORD1
1872 ; GFX7LESS-DPP-NEXT: s_mov_b32 s42, -1
1873 ; GFX7LESS-DPP-NEXT: s_mov_b32 s43, 0xe8f000
1874 ; GFX7LESS-DPP-NEXT: s_add_u32 s40, s40, s9
1875 ; GFX7LESS-DPP-NEXT: s_addc_u32 s41, s41, 0
1876 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s8
1877 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
1878 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[36:37], s[2:3], 0x9
1879 ; GFX7LESS-DPP-NEXT: s_mov_b32 s39, 0xf000
1880 ; GFX7LESS-DPP-NEXT: s_mov_b32 s38, -1
1881 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s2, 44
1882 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s3, 0
1883 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[2:3]
1884 ; GFX7LESS-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1885 ; GFX7LESS-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1886 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1887 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1888 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1889 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
1890 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v31, v0, v2
1891 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
1892 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s6
1893 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s7
1894 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[40:41]
1895 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[42:43]
1896 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
1897 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
1898 ; GFX7LESS-DPP-NEXT: buffer_load_dword v1, off, s[36:39], 0
1899 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], 0
1900 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v2, 1.0, v0
1901 ; GFX7LESS-DPP-NEXT: .LBB3_1: ; %atomicrmw.start
1902 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
1903 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
1904 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
1905 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, v0, v2
1906 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
1907 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, v1
1908 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v0
1909 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[3:4], off, s[36:39], 0 glc
1910 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
1911 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
1912 ; GFX7LESS-DPP-NEXT: s_or_b64 s[0:1], vcc, s[0:1]
1913 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v3
1914 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[0:1]
1915 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB3_1
1916 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
1917 ; GFX7LESS-DPP-NEXT: s_endpgm
1919 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
1920 ; GFX9-DPP: ; %bb.0:
1921 ; GFX9-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
1922 ; GFX9-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
1923 ; GFX9-DPP-NEXT: s_mov_b32 s38, -1
1924 ; GFX9-DPP-NEXT: s_mov_b32 s39, 0xe00000
1925 ; GFX9-DPP-NEXT: s_add_u32 s36, s36, s9
1926 ; GFX9-DPP-NEXT: s_addc_u32 s37, s37, 0
1927 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
1928 ; GFX9-DPP-NEXT: s_mov_b32 s14, s8
1929 ; GFX9-DPP-NEXT: s_add_u32 s8, s34, 44
1930 ; GFX9-DPP-NEXT: s_addc_u32 s9, s35, 0
1931 ; GFX9-DPP-NEXT: s_getpc_b64 s[2:3]
1932 ; GFX9-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
1933 ; GFX9-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
1934 ; GFX9-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
1935 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
1936 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
1937 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
1938 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
1939 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
1940 ; GFX9-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
1941 ; GFX9-DPP-NEXT: s_mov_b32 s12, s6
1942 ; GFX9-DPP-NEXT: s_mov_b32 s13, s7
1943 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
1944 ; GFX9-DPP-NEXT: s_mov_b32 s32, 0
1945 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
1946 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
1947 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
1948 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
1949 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
1950 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
1951 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
1952 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, v0
1953 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
1954 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
1955 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
1956 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
1957 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
1958 ; GFX9-DPP-NEXT: s_nop 1
1959 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:1 row_mask:0xf bank_mask:0xf
1960 ; GFX9-DPP-NEXT: v_max_f32_e32 v4, v4, v4
1961 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
1962 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
1963 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
1964 ; GFX9-DPP-NEXT: s_nop 1
1965 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:2 row_mask:0xf bank_mask:0xf
1966 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
1967 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
1968 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
1969 ; GFX9-DPP-NEXT: s_nop 1
1970 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:4 row_mask:0xf bank_mask:0xf
1971 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
1972 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
1973 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
1974 ; GFX9-DPP-NEXT: s_nop 1
1975 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:8 row_mask:0xf bank_mask:0xf
1976 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
1977 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
1978 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
1979 ; GFX9-DPP-NEXT: s_nop 1
1980 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_bcast:15 row_mask:0xa bank_mask:0xf
1981 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
1982 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
1983 ; GFX9-DPP-NEXT: s_nop 1
1984 ; GFX9-DPP-NEXT: v_mov_b32_dpp v3, v4 row_bcast:31 row_mask:0xc bank_mask:0xf
1985 ; GFX9-DPP-NEXT: v_max_f32_e32 v3, v3, v3
1986 ; GFX9-DPP-NEXT: v_min_f32_e32 v3, v4, v3
1987 ; GFX9-DPP-NEXT: v_readlane_b32 s4, v3, 63
1988 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
1989 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
1990 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
1991 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB3_3
1992 ; GFX9-DPP-NEXT: ; %bb.1:
1993 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
1994 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
1995 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
1996 ; GFX9-DPP-NEXT: v_max_f32_e64 v6, s4, s4
1997 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
1998 ; GFX9-DPP-NEXT: global_load_dword v1, v2, s[0:1]
1999 ; GFX9-DPP-NEXT: .LBB3_2: ; %atomicrmw.start
2000 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2001 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
2002 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2003 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, v0, v6
2004 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2005 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
2006 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2007 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2008 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
2009 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
2010 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB3_2
2011 ; GFX9-DPP-NEXT: .LBB3_3:
2012 ; GFX9-DPP-NEXT: s_endpgm
2014 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
2015 ; GFX1064-DPP: ; %bb.0:
2016 ; GFX1064-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2017 ; GFX1064-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2018 ; GFX1064-DPP-NEXT: s_mov_b32 s38, -1
2019 ; GFX1064-DPP-NEXT: s_mov_b32 s39, 0x31e16000
2020 ; GFX1064-DPP-NEXT: s_add_u32 s36, s36, s9
2021 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
2022 ; GFX1064-DPP-NEXT: s_addc_u32 s37, s37, 0
2023 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s8
2024 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
2025 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
2026 ; GFX1064-DPP-NEXT: s_getpc_b64 s[2:3]
2027 ; GFX1064-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2028 ; GFX1064-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2029 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2030 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2031 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2032 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
2033 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
2034 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
2035 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s6
2036 ; GFX1064-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
2037 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s7
2038 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
2039 ; GFX1064-DPP-NEXT: s_mov_b32 s32, 0
2040 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
2041 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
2042 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2043 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
2044 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
2045 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v0
2046 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
2047 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
2048 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
2049 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2050 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
2051 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
2052 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2053 ; GFX1064-DPP-NEXT: v_max_f32_e32 v3, v3, v3
2054 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
2055 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
2056 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2057 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2058 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2059 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
2060 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2061 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2062 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2063 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
2064 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2065 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2066 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v3
2067 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
2068 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
2069 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2070 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v3, 32
2071 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v3, 0
2072 ; GFX1064-DPP-NEXT: v_max_f32_e64 v3, s2, s2
2073 ; GFX1064-DPP-NEXT: v_max_f32_e64 v4, s3, s3
2074 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
2075 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2076 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2077 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
2078 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
2079 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v0
2080 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, v3
2081 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
2082 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
2083 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB3_3
2084 ; GFX1064-DPP-NEXT: ; %bb.1:
2085 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
2086 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
2087 ; GFX1064-DPP-NEXT: v_max_f32_e32 v6, v0, v0
2088 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
2089 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
2090 ; GFX1064-DPP-NEXT: global_load_dword v1, v2, s[0:1]
2091 ; GFX1064-DPP-NEXT: .LBB3_2: ; %atomicrmw.start
2092 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2093 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
2094 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2095 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, v0, v6
2096 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2097 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
2098 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2099 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
2100 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2101 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
2102 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB3_2
2103 ; GFX1064-DPP-NEXT: .LBB3_3:
2104 ; GFX1064-DPP-NEXT: s_endpgm
2106 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
2107 ; GFX1032-DPP: ; %bb.0:
2108 ; GFX1032-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2109 ; GFX1032-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2110 ; GFX1032-DPP-NEXT: s_mov_b32 s38, -1
2111 ; GFX1032-DPP-NEXT: s_mov_b32 s39, 0x31c16000
2112 ; GFX1032-DPP-NEXT: s_add_u32 s36, s36, s9
2113 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
2114 ; GFX1032-DPP-NEXT: s_addc_u32 s37, s37, 0
2115 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s8
2116 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
2117 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
2118 ; GFX1032-DPP-NEXT: s_getpc_b64 s[2:3]
2119 ; GFX1032-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2120 ; GFX1032-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2121 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2122 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2123 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2124 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
2125 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
2126 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
2127 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s6
2128 ; GFX1032-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
2129 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s7
2130 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
2131 ; GFX1032-DPP-NEXT: s_mov_b32 s32, 0
2132 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
2133 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
2134 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
2135 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
2136 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
2137 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v0
2138 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
2139 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
2140 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
2141 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
2142 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
2143 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
2144 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2145 ; GFX1032-DPP-NEXT: v_max_f32_e32 v3, v3, v3
2146 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v4, v3
2147 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
2148 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2149 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2150 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2151 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
2152 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2153 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
2154 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2155 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
2156 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2157 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2158 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v3
2159 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
2160 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
2161 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
2162 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
2163 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
2164 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, v3
2165 ; GFX1032-DPP-NEXT: s_mov_b32 s2, 0
2166 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v1
2167 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
2168 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB3_3
2169 ; GFX1032-DPP-NEXT: ; %bb.1:
2170 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
2171 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
2172 ; GFX1032-DPP-NEXT: v_max_f32_e32 v6, v0, v0
2173 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
2174 ; GFX1032-DPP-NEXT: global_load_dword v1, v2, s[0:1]
2175 ; GFX1032-DPP-NEXT: .LBB3_2: ; %atomicrmw.start
2176 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2177 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
2178 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2179 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, v0, v6
2180 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2181 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
2182 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
2183 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
2184 ; GFX1032-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
2185 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
2186 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB3_2
2187 ; GFX1032-DPP-NEXT: .LBB3_3:
2188 ; GFX1032-DPP-NEXT: s_endpgm
2190 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
2191 ; GFX1164-DPP: ; %bb.0:
2192 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
2193 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s8
2194 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
2195 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
2196 ; GFX1164-DPP-NEXT: s_getpc_b64 s[2:3]
2197 ; GFX1164-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2198 ; GFX1164-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2199 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
2200 ; GFX1164-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
2201 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
2202 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
2203 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
2204 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
2205 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 0
2206 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
2207 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
2208 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2209 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
2210 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
2211 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v0
2212 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
2213 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2214 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
2215 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2216 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
2217 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
2218 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
2219 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
2220 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
2221 ; GFX1164-DPP-NEXT: v_max_f32_e32 v1, v1, v1
2222 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v2, v1
2223 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2224 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
2225 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
2226 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
2227 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
2228 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2229 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
2230 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
2231 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
2232 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
2233 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2234 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2235 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
2236 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
2237 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2238 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2239 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v1
2240 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2241 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
2242 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
2243 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2244 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2245 ; GFX1164-DPP-NEXT: v_permlane64_b32 v2, v1
2246 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
2247 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
2248 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
2249 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2250 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
2251 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
2252 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2253 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
2254 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
2255 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2256 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
2257 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v1
2258 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
2259 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
2260 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB3_3
2261 ; GFX1164-DPP-NEXT: ; %bb.1:
2262 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
2263 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 0
2264 ; GFX1164-DPP-NEXT: v_max_f32_e32 v6, v4, v4
2265 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
2266 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
2267 ; GFX1164-DPP-NEXT: global_load_b32 v5, v0, s[0:1]
2268 ; GFX1164-DPP-NEXT: .LBB3_2: ; %atomicrmw.start
2269 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2270 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
2271 ; GFX1164-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2272 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
2273 ; GFX1164-DPP-NEXT: v_min_f32_e32 v4, v4, v6
2274 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v4, v0, v[4:5], s[0:1] glc
2275 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
2276 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v4, v5
2277 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, v4
2278 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2279 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2280 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
2281 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB3_2
2282 ; GFX1164-DPP-NEXT: .LBB3_3:
2283 ; GFX1164-DPP-NEXT: s_endpgm
2285 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_div_value_one_as_scope_unsafe:
2286 ; GFX1132-DPP: ; %bb.0:
2287 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
2288 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
2289 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
2290 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
2291 ; GFX1132-DPP-NEXT: s_getpc_b64 s[2:3]
2292 ; GFX1132-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2293 ; GFX1132-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2294 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
2295 ; GFX1132-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
2296 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
2297 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
2298 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
2299 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
2300 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 0
2301 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
2302 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
2303 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
2304 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
2305 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
2306 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v0
2307 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
2308 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2309 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
2310 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
2311 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
2312 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
2313 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v2, v2 :: v_dual_mov_b32 v3, 0x7fc00000
2314 ; GFX1132-DPP-NEXT: v_max_f32_e32 v1, v1, v1
2315 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2316 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v2, v1
2317 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
2318 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2319 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
2320 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2321 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2322 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
2323 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
2324 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2325 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2326 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
2327 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2328 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v3, v3
2329 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2330 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2331 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v1
2332 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
2333 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2334 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v2, v2
2335 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
2336 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
2337 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
2338 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2339 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v1
2340 ; GFX1132-DPP-NEXT: s_mov_b32 s2, 0
2341 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
2342 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
2343 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
2344 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB3_3
2345 ; GFX1132-DPP-NEXT: ; %bb.1:
2346 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
2347 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, 0
2348 ; GFX1132-DPP-NEXT: v_max_f32_e32 v6, v4, v4
2349 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
2350 ; GFX1132-DPP-NEXT: global_load_b32 v5, v0, s[0:1]
2351 ; GFX1132-DPP-NEXT: .LBB3_2: ; %atomicrmw.start
2352 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2353 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
2354 ; GFX1132-DPP-NEXT: v_max_f32_e32 v4, v5, v5
2355 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
2356 ; GFX1132-DPP-NEXT: v_min_f32_e32 v4, v4, v6
2357 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v4, v0, v[4:5], s[0:1] glc
2358 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
2359 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v4, v5
2360 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v5, v4
2361 ; GFX1132-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
2362 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2363 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
2364 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB3_2
2365 ; GFX1132-DPP-NEXT: .LBB3_3:
2366 ; GFX1132-DPP-NEXT: s_endpgm
2367 %divValue = call float @div.float.value()
2368 %result = atomicrmw fmin ptr addrspace(1) %ptr, float %divValue syncscope("one-as") monotonic
2373 define amdgpu_kernel void @global_atomic_fmin_uni_address_uni_value_default_scope_unsafe(ptr addrspace(1) %ptr) #0 {
2374 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2375 ; GFX7LESS: ; %bb.0:
2376 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
2377 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
2378 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2379 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
2380 ; GFX7LESS-NEXT: s_cbranch_execz .LBB4_3
2381 ; GFX7LESS-NEXT: ; %bb.1:
2382 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
2383 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
2384 ; GFX7LESS-NEXT: s_load_dword s2, s[0:1], 0x0
2385 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
2386 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
2387 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
2388 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s2
2389 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
2390 ; GFX7LESS-NEXT: .LBB4_2: ; %atomicrmw.start
2391 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
2392 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
2393 ; GFX7LESS-NEXT: v_min_f32_e32 v0, 4.0, v0
2394 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
2395 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v1
2396 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v0
2397 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
2398 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
2399 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
2400 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
2401 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v2
2402 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
2403 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB4_2
2404 ; GFX7LESS-NEXT: .LBB4_3:
2405 ; GFX7LESS-NEXT: s_endpgm
2407 ; GFX9-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2409 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2410 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2411 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2412 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
2413 ; GFX9-NEXT: s_cbranch_execz .LBB4_3
2414 ; GFX9-NEXT: ; %bb.1:
2415 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2416 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
2417 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
2418 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
2419 ; GFX9-NEXT: s_load_dword s4, s[0:1], 0x0
2420 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
2421 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
2422 ; GFX9-NEXT: .LBB4_2: ; %atomicrmw.start
2423 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
2424 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
2425 ; GFX9-NEXT: v_min_f32_e32 v0, 4.0, v0
2426 ; GFX9-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2427 ; GFX9-NEXT: s_waitcnt vmcnt(0)
2428 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2429 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2430 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
2431 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
2432 ; GFX9-NEXT: s_cbranch_execnz .LBB4_2
2433 ; GFX9-NEXT: .LBB4_3:
2434 ; GFX9-NEXT: s_endpgm
2436 ; GFX1064-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2438 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2439 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2440 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2441 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
2442 ; GFX1064-NEXT: s_cbranch_execz .LBB4_3
2443 ; GFX1064-NEXT: ; %bb.1:
2444 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2445 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0
2446 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
2447 ; GFX1064-NEXT: s_load_dword s2, s[0:1], 0x0
2448 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
2449 ; GFX1064-NEXT: v_mov_b32_e32 v1, s2
2450 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
2451 ; GFX1064-NEXT: .LBB4_2: ; %atomicrmw.start
2452 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
2453 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
2454 ; GFX1064-NEXT: v_min_f32_e32 v0, 4.0, v0
2455 ; GFX1064-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2456 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
2457 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2458 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
2459 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2460 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
2461 ; GFX1064-NEXT: s_cbranch_execnz .LBB4_2
2462 ; GFX1064-NEXT: .LBB4_3:
2463 ; GFX1064-NEXT: s_endpgm
2465 ; GFX1032-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2467 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2468 ; GFX1032-NEXT: s_mov_b32 s4, 0
2469 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
2470 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
2471 ; GFX1032-NEXT: s_cbranch_execz .LBB4_3
2472 ; GFX1032-NEXT: ; %bb.1:
2473 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2474 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
2475 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
2476 ; GFX1032-NEXT: s_load_dword s2, s[0:1], 0x0
2477 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
2478 ; GFX1032-NEXT: v_mov_b32_e32 v1, s2
2479 ; GFX1032-NEXT: .LBB4_2: ; %atomicrmw.start
2480 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
2481 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
2482 ; GFX1032-NEXT: v_min_f32_e32 v0, 4.0, v0
2483 ; GFX1032-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2484 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
2485 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
2486 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
2487 ; GFX1032-NEXT: s_or_b32 s4, vcc_lo, s4
2488 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
2489 ; GFX1032-NEXT: s_cbranch_execnz .LBB4_2
2490 ; GFX1032-NEXT: .LBB4_3:
2491 ; GFX1032-NEXT: s_endpgm
2493 ; GFX1164-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2495 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2496 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
2497 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2498 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2499 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
2500 ; GFX1164-NEXT: s_cbranch_execz .LBB4_3
2501 ; GFX1164-NEXT: ; %bb.1:
2502 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
2503 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
2504 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
2505 ; GFX1164-NEXT: s_load_b32 s2, s[0:1], 0x0
2506 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
2507 ; GFX1164-NEXT: v_mov_b32_e32 v1, s2
2508 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
2509 ; GFX1164-NEXT: .LBB4_2: ; %atomicrmw.start
2510 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
2511 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2512 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
2513 ; GFX1164-NEXT: v_min_f32_e32 v0, 4.0, v0
2514 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
2515 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
2516 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2517 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
2518 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2519 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2520 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
2521 ; GFX1164-NEXT: s_cbranch_execnz .LBB4_2
2522 ; GFX1164-NEXT: .LBB4_3:
2523 ; GFX1164-NEXT: s_endpgm
2525 ; GFX1132-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2527 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2528 ; GFX1132-NEXT: s_mov_b32 s4, 0
2529 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
2530 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
2531 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
2532 ; GFX1132-NEXT: s_cbranch_execz .LBB4_3
2533 ; GFX1132-NEXT: ; %bb.1:
2534 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
2535 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
2536 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
2537 ; GFX1132-NEXT: s_load_b32 s2, s[0:1], 0x0
2538 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
2539 ; GFX1132-NEXT: v_mov_b32_e32 v1, s2
2540 ; GFX1132-NEXT: .LBB4_2: ; %atomicrmw.start
2541 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
2542 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2543 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
2544 ; GFX1132-NEXT: v_min_f32_e32 v0, 4.0, v0
2545 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
2546 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
2547 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
2548 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
2549 ; GFX1132-NEXT: s_or_b32 s4, vcc_lo, s4
2550 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2551 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
2552 ; GFX1132-NEXT: s_cbranch_execnz .LBB4_2
2553 ; GFX1132-NEXT: .LBB4_3:
2554 ; GFX1132-NEXT: s_endpgm
2556 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2557 ; GFX7LESS-DPP: ; %bb.0:
2558 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
2559 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
2560 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2561 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
2562 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB4_3
2563 ; GFX7LESS-DPP-NEXT: ; %bb.1:
2564 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
2565 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
2566 ; GFX7LESS-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
2567 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
2568 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
2569 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
2570 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s2
2571 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
2572 ; GFX7LESS-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2573 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2574 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
2575 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2576 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
2577 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v1
2578 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v0
2579 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
2580 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
2581 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
2582 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
2583 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v2
2584 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
2585 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB4_2
2586 ; GFX7LESS-DPP-NEXT: .LBB4_3:
2587 ; GFX7LESS-DPP-NEXT: s_endpgm
2589 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2590 ; GFX9-DPP: ; %bb.0:
2591 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2592 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2593 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2594 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
2595 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB4_3
2596 ; GFX9-DPP-NEXT: ; %bb.1:
2597 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2598 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
2599 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
2600 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
2601 ; GFX9-DPP-NEXT: s_load_dword s4, s[0:1], 0x0
2602 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
2603 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s4
2604 ; GFX9-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2605 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2606 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2607 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2608 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2609 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
2610 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2611 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2612 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
2613 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
2614 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB4_2
2615 ; GFX9-DPP-NEXT: .LBB4_3:
2616 ; GFX9-DPP-NEXT: s_endpgm
2618 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2619 ; GFX1064-DPP: ; %bb.0:
2620 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2621 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2622 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2623 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
2624 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB4_3
2625 ; GFX1064-DPP-NEXT: ; %bb.1:
2626 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2627 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
2628 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
2629 ; GFX1064-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
2630 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
2631 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s2
2632 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
2633 ; GFX1064-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2634 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2635 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2636 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2637 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2638 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
2639 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2640 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
2641 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2642 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
2643 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB4_2
2644 ; GFX1064-DPP-NEXT: .LBB4_3:
2645 ; GFX1064-DPP-NEXT: s_endpgm
2647 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2648 ; GFX1032-DPP: ; %bb.0:
2649 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2650 ; GFX1032-DPP-NEXT: s_mov_b32 s4, 0
2651 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
2652 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
2653 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB4_3
2654 ; GFX1032-DPP-NEXT: ; %bb.1:
2655 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
2656 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
2657 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
2658 ; GFX1032-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
2659 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
2660 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s2
2661 ; GFX1032-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2662 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2663 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2664 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2665 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
2666 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
2667 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
2668 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
2669 ; GFX1032-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
2670 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
2671 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB4_2
2672 ; GFX1032-DPP-NEXT: .LBB4_3:
2673 ; GFX1032-DPP-NEXT: s_endpgm
2675 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2676 ; GFX1164-DPP: ; %bb.0:
2677 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2678 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
2679 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2680 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2681 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
2682 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB4_3
2683 ; GFX1164-DPP-NEXT: ; %bb.1:
2684 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
2685 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0
2686 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
2687 ; GFX1164-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
2688 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
2689 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s2
2690 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
2691 ; GFX1164-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2692 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2693 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2694 ; GFX1164-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2695 ; GFX1164-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2696 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
2697 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
2698 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2699 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, v0
2700 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2701 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2702 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
2703 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB4_2
2704 ; GFX1164-DPP-NEXT: .LBB4_3:
2705 ; GFX1164-DPP-NEXT: s_endpgm
2707 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_default_scope_unsafe:
2708 ; GFX1132-DPP: ; %bb.0:
2709 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2710 ; GFX1132-DPP-NEXT: s_mov_b32 s4, 0
2711 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
2712 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
2713 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
2714 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB4_3
2715 ; GFX1132-DPP-NEXT: ; %bb.1:
2716 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
2717 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0
2718 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
2719 ; GFX1132-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
2720 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
2721 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, s2
2722 ; GFX1132-DPP-NEXT: .LBB4_2: ; %atomicrmw.start
2723 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
2724 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
2725 ; GFX1132-DPP-NEXT: v_max_f32_e32 v0, v1, v1
2726 ; GFX1132-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
2727 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
2728 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
2729 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
2730 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, v0
2731 ; GFX1132-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
2732 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
2733 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
2734 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB4_2
2735 ; GFX1132-DPP-NEXT: .LBB4_3:
2736 ; GFX1132-DPP-NEXT: s_endpgm
2737 %result = atomicrmw fmin ptr addrspace(1) %ptr, float 4.0 monotonic, align 4
2741 define amdgpu_kernel void @global_atomic_fmin_uni_address_div_value_default_scope_unsafe(ptr addrspace(1) %ptr) #0 {
2742 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
2743 ; GFX7LESS: ; %bb.0:
2744 ; GFX7LESS-NEXT: s_mov_b32 s32, 0
2745 ; GFX7LESS-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2746 ; GFX7LESS-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2747 ; GFX7LESS-NEXT: s_mov_b32 s38, -1
2748 ; GFX7LESS-NEXT: s_mov_b32 s39, 0xe8f000
2749 ; GFX7LESS-NEXT: s_add_u32 s36, s36, s9
2750 ; GFX7LESS-NEXT: s_addc_u32 s37, s37, 0
2751 ; GFX7LESS-NEXT: s_mov_b32 s14, s8
2752 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[4:5]
2753 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[2:3]
2754 ; GFX7LESS-NEXT: s_add_u32 s8, s34, 44
2755 ; GFX7LESS-NEXT: s_addc_u32 s9, s35, 0
2756 ; GFX7LESS-NEXT: s_getpc_b64 s[2:3]
2757 ; GFX7LESS-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2758 ; GFX7LESS-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2759 ; GFX7LESS-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2760 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2761 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2762 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
2763 ; GFX7LESS-NEXT: v_or_b32_e32 v31, v0, v2
2764 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[0:1]
2765 ; GFX7LESS-NEXT: s_mov_b32 s12, s6
2766 ; GFX7LESS-NEXT: s_mov_b32 s13, s7
2767 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[36:37]
2768 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[38:39]
2769 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
2770 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[16:17]
2771 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
2772 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2773 ; GFX7LESS-NEXT: .LBB5_1: ; %ComputeLoop
2774 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
2775 ; GFX7LESS-NEXT: s_ff1_i32_b64 s2, s[0:1]
2776 ; GFX7LESS-NEXT: v_mul_f32_e32 v1, 1.0, v2
2777 ; GFX7LESS-NEXT: v_readlane_b32 s4, v0, s2
2778 ; GFX7LESS-NEXT: s_lshl_b64 s[2:3], 1, s2
2779 ; GFX7LESS-NEXT: v_mul_f32_e64 v2, 1.0, s4
2780 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
2781 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
2782 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
2783 ; GFX7LESS-NEXT: v_min_f32_e32 v2, v1, v2
2784 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB5_1
2785 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
2786 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
2787 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
2788 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2789 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
2790 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
2791 ; GFX7LESS-NEXT: s_cbranch_execz .LBB5_5
2792 ; GFX7LESS-NEXT: ; %bb.3:
2793 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x9
2794 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
2795 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
2796 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
2797 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[0:3], 0
2798 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
2799 ; GFX7LESS-NEXT: v_mul_f32_e32 v2, 1.0, v2
2800 ; GFX7LESS-NEXT: .LBB5_4: ; %atomicrmw.start
2801 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
2802 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
2803 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
2804 ; GFX7LESS-NEXT: v_min_f32_e32 v0, v0, v2
2805 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
2806 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, v1
2807 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v0
2808 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[3:4], off, s[0:3], 0 glc
2809 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
2810 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
2811 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
2812 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v3
2813 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
2814 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB5_4
2815 ; GFX7LESS-NEXT: .LBB5_5:
2816 ; GFX7LESS-NEXT: s_endpgm
2818 ; GFX9-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
2820 ; GFX9-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2821 ; GFX9-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2822 ; GFX9-NEXT: s_mov_b32 s38, -1
2823 ; GFX9-NEXT: s_mov_b32 s39, 0xe00000
2824 ; GFX9-NEXT: s_add_u32 s36, s36, s9
2825 ; GFX9-NEXT: s_addc_u32 s37, s37, 0
2826 ; GFX9-NEXT: s_mov_b64 s[34:35], s[2:3]
2827 ; GFX9-NEXT: s_mov_b32 s14, s8
2828 ; GFX9-NEXT: s_add_u32 s8, s34, 44
2829 ; GFX9-NEXT: s_addc_u32 s9, s35, 0
2830 ; GFX9-NEXT: s_getpc_b64 s[2:3]
2831 ; GFX9-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2832 ; GFX9-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2833 ; GFX9-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2834 ; GFX9-NEXT: s_mov_b64 s[10:11], s[4:5]
2835 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2836 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2837 ; GFX9-NEXT: s_mov_b64 s[4:5], s[0:1]
2838 ; GFX9-NEXT: s_mov_b64 s[0:1], s[36:37]
2839 ; GFX9-NEXT: v_or3_b32 v31, v0, v1, v2
2840 ; GFX9-NEXT: s_mov_b32 s12, s6
2841 ; GFX9-NEXT: s_mov_b32 s13, s7
2842 ; GFX9-NEXT: s_mov_b64 s[2:3], s[38:39]
2843 ; GFX9-NEXT: s_mov_b32 s32, 0
2844 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
2845 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[16:17]
2846 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
2847 ; GFX9-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2848 ; GFX9-NEXT: .LBB5_1: ; %ComputeLoop
2849 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
2850 ; GFX9-NEXT: s_ff1_i32_b64 s2, s[0:1]
2851 ; GFX9-NEXT: v_readlane_b32 s4, v0, s2
2852 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s2
2853 ; GFX9-NEXT: v_max_f32_e32 v1, v2, v2
2854 ; GFX9-NEXT: v_max_f32_e64 v2, s4, s4
2855 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
2856 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
2857 ; GFX9-NEXT: v_min_f32_e32 v2, v1, v2
2858 ; GFX9-NEXT: s_cbranch_scc1 .LBB5_1
2859 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
2860 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2861 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2862 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2863 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
2864 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
2865 ; GFX9-NEXT: s_cbranch_execz .LBB5_5
2866 ; GFX9-NEXT: ; %bb.3:
2867 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
2868 ; GFX9-NEXT: v_mov_b32_e32 v3, 0
2869 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
2870 ; GFX9-NEXT: v_max_f32_e32 v2, v2, v2
2871 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
2872 ; GFX9-NEXT: global_load_dword v1, v3, s[0:1]
2873 ; GFX9-NEXT: .LBB5_4: ; %atomicrmw.start
2874 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
2875 ; GFX9-NEXT: s_waitcnt vmcnt(0)
2876 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
2877 ; GFX9-NEXT: v_min_f32_e32 v0, v0, v2
2878 ; GFX9-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
2879 ; GFX9-NEXT: s_waitcnt vmcnt(0)
2880 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2881 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2882 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
2883 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
2884 ; GFX9-NEXT: s_cbranch_execnz .LBB5_4
2885 ; GFX9-NEXT: .LBB5_5:
2886 ; GFX9-NEXT: s_endpgm
2888 ; GFX1064-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
2890 ; GFX1064-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2891 ; GFX1064-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2892 ; GFX1064-NEXT: s_mov_b32 s38, -1
2893 ; GFX1064-NEXT: s_mov_b32 s39, 0x31e16000
2894 ; GFX1064-NEXT: s_add_u32 s36, s36, s9
2895 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
2896 ; GFX1064-NEXT: s_addc_u32 s37, s37, 0
2897 ; GFX1064-NEXT: s_mov_b32 s14, s8
2898 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
2899 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
2900 ; GFX1064-NEXT: s_getpc_b64 s[2:3]
2901 ; GFX1064-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2902 ; GFX1064-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2903 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2904 ; GFX1064-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2905 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2906 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[4:5]
2907 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[0:1]
2908 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[36:37]
2909 ; GFX1064-NEXT: s_mov_b32 s12, s6
2910 ; GFX1064-NEXT: v_or3_b32 v31, v0, v1, v2
2911 ; GFX1064-NEXT: s_mov_b32 s13, s7
2912 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[38:39]
2913 ; GFX1064-NEXT: s_mov_b32 s32, 0
2914 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
2915 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[16:17]
2916 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2917 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
2918 ; GFX1064-NEXT: .LBB5_1: ; %ComputeLoop
2919 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
2920 ; GFX1064-NEXT: s_ff1_i32_b64 s2, s[0:1]
2921 ; GFX1064-NEXT: v_max_f32_e32 v1, v2, v2
2922 ; GFX1064-NEXT: v_readlane_b32 s3, v0, s2
2923 ; GFX1064-NEXT: v_max_f32_e64 v2, s3, s3
2924 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s2
2925 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
2926 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
2927 ; GFX1064-NEXT: v_min_f32_e32 v2, v1, v2
2928 ; GFX1064-NEXT: s_cbranch_scc1 .LBB5_1
2929 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
2930 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
2931 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
2932 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
2933 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
2934 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
2935 ; GFX1064-NEXT: s_cbranch_execz .LBB5_5
2936 ; GFX1064-NEXT: ; %bb.3:
2937 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
2938 ; GFX1064-NEXT: v_mov_b32_e32 v3, 0
2939 ; GFX1064-NEXT: v_max_f32_e32 v2, v2, v2
2940 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
2941 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
2942 ; GFX1064-NEXT: global_load_dword v1, v3, s[0:1]
2943 ; GFX1064-NEXT: .LBB5_4: ; %atomicrmw.start
2944 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
2945 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
2946 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
2947 ; GFX1064-NEXT: v_min_f32_e32 v0, v0, v2
2948 ; GFX1064-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
2949 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
2950 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
2951 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
2952 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
2953 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
2954 ; GFX1064-NEXT: s_cbranch_execnz .LBB5_4
2955 ; GFX1064-NEXT: .LBB5_5:
2956 ; GFX1064-NEXT: s_endpgm
2958 ; GFX1032-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
2960 ; GFX1032-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
2961 ; GFX1032-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
2962 ; GFX1032-NEXT: s_mov_b32 s38, -1
2963 ; GFX1032-NEXT: s_mov_b32 s39, 0x31c16000
2964 ; GFX1032-NEXT: s_add_u32 s36, s36, s9
2965 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
2966 ; GFX1032-NEXT: s_addc_u32 s37, s37, 0
2967 ; GFX1032-NEXT: s_mov_b32 s14, s8
2968 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
2969 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
2970 ; GFX1032-NEXT: s_getpc_b64 s[2:3]
2971 ; GFX1032-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
2972 ; GFX1032-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
2973 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
2974 ; GFX1032-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
2975 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
2976 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[4:5]
2977 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[0:1]
2978 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[36:37]
2979 ; GFX1032-NEXT: s_mov_b32 s12, s6
2980 ; GFX1032-NEXT: v_or3_b32 v31, v0, v1, v2
2981 ; GFX1032-NEXT: s_mov_b32 s13, s7
2982 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[38:39]
2983 ; GFX1032-NEXT: s_mov_b32 s32, 0
2984 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
2985 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[16:17]
2986 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0x7fc00000
2987 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
2988 ; GFX1032-NEXT: .LBB5_1: ; %ComputeLoop
2989 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
2990 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
2991 ; GFX1032-NEXT: v_max_f32_e32 v1, v2, v2
2992 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
2993 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
2994 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
2995 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
2996 ; GFX1032-NEXT: v_max_f32_e64 v2, s2, s2
2997 ; GFX1032-NEXT: v_min_f32_e32 v2, v1, v2
2998 ; GFX1032-NEXT: s_cbranch_scc1 .LBB5_1
2999 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
3000 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3001 ; GFX1032-NEXT: s_mov_b32 s2, 0
3002 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
3003 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
3004 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
3005 ; GFX1032-NEXT: s_cbranch_execz .LBB5_5
3006 ; GFX1032-NEXT: ; %bb.3:
3007 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
3008 ; GFX1032-NEXT: v_mov_b32_e32 v3, 0
3009 ; GFX1032-NEXT: v_max_f32_e32 v2, v2, v2
3010 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
3011 ; GFX1032-NEXT: global_load_dword v1, v3, s[0:1]
3012 ; GFX1032-NEXT: .LBB5_4: ; %atomicrmw.start
3013 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
3014 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
3015 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
3016 ; GFX1032-NEXT: v_min_f32_e32 v0, v0, v2
3017 ; GFX1032-NEXT: global_atomic_cmpswap v0, v3, v[0:1], s[0:1] glc
3018 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
3019 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
3020 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
3021 ; GFX1032-NEXT: s_or_b32 s2, vcc_lo, s2
3022 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
3023 ; GFX1032-NEXT: s_cbranch_execnz .LBB5_4
3024 ; GFX1032-NEXT: .LBB5_5:
3025 ; GFX1032-NEXT: s_endpgm
3027 ; GFX1164-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3029 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
3030 ; GFX1164-NEXT: s_mov_b32 s14, s8
3031 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
3032 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
3033 ; GFX1164-NEXT: s_getpc_b64 s[2:3]
3034 ; GFX1164-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3035 ; GFX1164-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3036 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
3037 ; GFX1164-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
3038 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[4:5]
3039 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[0:1]
3040 ; GFX1164-NEXT: s_mov_b32 s12, s6
3041 ; GFX1164-NEXT: s_mov_b32 s13, s7
3042 ; GFX1164-NEXT: s_mov_b32 s32, 0
3043 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
3044 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[2:3]
3045 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0x7fc00000
3046 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
3047 ; GFX1164-NEXT: .LBB5_1: ; %ComputeLoop
3048 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
3049 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3050 ; GFX1164-NEXT: s_ctz_i32_b64 s2, s[0:1]
3051 ; GFX1164-NEXT: v_max_f32_e32 v1, v2, v2
3052 ; GFX1164-NEXT: v_readlane_b32 s3, v0, s2
3053 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
3054 ; GFX1164-NEXT: v_max_f32_e64 v2, s3, s3
3055 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s2
3056 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
3057 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3058 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
3059 ; GFX1164-NEXT: v_min_f32_e32 v2, v1, v2
3060 ; GFX1164-NEXT: s_cbranch_scc1 .LBB5_1
3061 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
3062 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3063 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
3064 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3065 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
3066 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
3067 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
3068 ; GFX1164-NEXT: s_cbranch_execz .LBB5_5
3069 ; GFX1164-NEXT: ; %bb.3:
3070 ; GFX1164-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
3071 ; GFX1164-NEXT: v_mov_b32_e32 v3, 0
3072 ; GFX1164-NEXT: v_max_f32_e32 v2, v2, v2
3073 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
3074 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
3075 ; GFX1164-NEXT: global_load_b32 v1, v3, s[0:1]
3076 ; GFX1164-NEXT: .LBB5_4: ; %atomicrmw.start
3077 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
3078 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
3079 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
3080 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
3081 ; GFX1164-NEXT: v_min_f32_e32 v0, v0, v2
3082 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v3, v[0:1], s[0:1] glc
3083 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
3084 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
3085 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
3086 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
3087 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
3088 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
3089 ; GFX1164-NEXT: s_cbranch_execnz .LBB5_4
3090 ; GFX1164-NEXT: .LBB5_5:
3091 ; GFX1164-NEXT: s_endpgm
3093 ; GFX1132-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3095 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
3096 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
3097 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
3098 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
3099 ; GFX1132-NEXT: s_getpc_b64 s[2:3]
3100 ; GFX1132-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3101 ; GFX1132-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3102 ; GFX1132-NEXT: s_mov_b32 s12, s13
3103 ; GFX1132-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
3104 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[4:5]
3105 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[0:1]
3106 ; GFX1132-NEXT: s_mov_b32 s13, s14
3107 ; GFX1132-NEXT: s_mov_b32 s14, s15
3108 ; GFX1132-NEXT: s_mov_b32 s32, 0
3109 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
3110 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[2:3]
3111 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0x7fc00000
3112 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
3113 ; GFX1132-NEXT: .LBB5_1: ; %ComputeLoop
3114 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
3115 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3116 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
3117 ; GFX1132-NEXT: v_max_f32_e32 v1, v2, v2
3118 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
3119 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
3120 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
3121 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
3122 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
3123 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3124 ; GFX1132-NEXT: v_max_f32_e64 v2, s2, s2
3125 ; GFX1132-NEXT: v_min_f32_e32 v2, v1, v2
3126 ; GFX1132-NEXT: s_cbranch_scc1 .LBB5_1
3127 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
3128 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3129 ; GFX1132-NEXT: s_mov_b32 s2, 0
3130 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
3131 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
3132 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
3133 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
3134 ; GFX1132-NEXT: s_cbranch_execz .LBB5_5
3135 ; GFX1132-NEXT: ; %bb.3:
3136 ; GFX1132-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
3137 ; GFX1132-NEXT: v_dual_mov_b32 v3, 0 :: v_dual_max_f32 v2, v2, v2
3138 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
3139 ; GFX1132-NEXT: global_load_b32 v1, v3, s[0:1]
3140 ; GFX1132-NEXT: .LBB5_4: ; %atomicrmw.start
3141 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
3142 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
3143 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
3144 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
3145 ; GFX1132-NEXT: v_min_f32_e32 v0, v0, v2
3146 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v3, v[0:1], s[0:1] glc
3147 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
3148 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
3149 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
3150 ; GFX1132-NEXT: s_or_b32 s2, vcc_lo, s2
3151 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
3152 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
3153 ; GFX1132-NEXT: s_cbranch_execnz .LBB5_4
3154 ; GFX1132-NEXT: .LBB5_5:
3155 ; GFX1132-NEXT: s_endpgm
3157 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3158 ; GFX7LESS-DPP: ; %bb.0:
3159 ; GFX7LESS-DPP-NEXT: s_mov_b32 s32, 0
3160 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, SCRATCH_RSRC_DWORD0
3161 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, SCRATCH_RSRC_DWORD1
3162 ; GFX7LESS-DPP-NEXT: s_mov_b32 s42, -1
3163 ; GFX7LESS-DPP-NEXT: s_mov_b32 s43, 0xe8f000
3164 ; GFX7LESS-DPP-NEXT: s_add_u32 s40, s40, s9
3165 ; GFX7LESS-DPP-NEXT: s_addc_u32 s41, s41, 0
3166 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s8
3167 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3168 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[36:37], s[2:3], 0x9
3169 ; GFX7LESS-DPP-NEXT: s_mov_b32 s39, 0xf000
3170 ; GFX7LESS-DPP-NEXT: s_mov_b32 s38, -1
3171 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s2, 44
3172 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s3, 0
3173 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[2:3]
3174 ; GFX7LESS-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3175 ; GFX7LESS-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3176 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
3177 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
3178 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
3179 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
3180 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v31, v0, v2
3181 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3182 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s6
3183 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s7
3184 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[40:41]
3185 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[42:43]
3186 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
3187 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
3188 ; GFX7LESS-DPP-NEXT: buffer_load_dword v1, off, s[36:39], 0
3189 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], 0
3190 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v2, 1.0, v0
3191 ; GFX7LESS-DPP-NEXT: .LBB5_1: ; %atomicrmw.start
3192 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3193 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
3194 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
3195 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, v0, v2
3196 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
3197 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, v1
3198 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v0
3199 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[3:4], off, s[36:39], 0 glc
3200 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
3201 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v1
3202 ; GFX7LESS-DPP-NEXT: s_or_b64 s[0:1], vcc, s[0:1]
3203 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v3
3204 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[0:1]
3205 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB5_1
3206 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
3207 ; GFX7LESS-DPP-NEXT: s_endpgm
3209 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3210 ; GFX9-DPP: ; %bb.0:
3211 ; GFX9-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
3212 ; GFX9-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
3213 ; GFX9-DPP-NEXT: s_mov_b32 s38, -1
3214 ; GFX9-DPP-NEXT: s_mov_b32 s39, 0xe00000
3215 ; GFX9-DPP-NEXT: s_add_u32 s36, s36, s9
3216 ; GFX9-DPP-NEXT: s_addc_u32 s37, s37, 0
3217 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
3218 ; GFX9-DPP-NEXT: s_mov_b32 s14, s8
3219 ; GFX9-DPP-NEXT: s_add_u32 s8, s34, 44
3220 ; GFX9-DPP-NEXT: s_addc_u32 s9, s35, 0
3221 ; GFX9-DPP-NEXT: s_getpc_b64 s[2:3]
3222 ; GFX9-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3223 ; GFX9-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3224 ; GFX9-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
3225 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3226 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
3227 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
3228 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3229 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
3230 ; GFX9-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
3231 ; GFX9-DPP-NEXT: s_mov_b32 s12, s6
3232 ; GFX9-DPP-NEXT: s_mov_b32 s13, s7
3233 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
3234 ; GFX9-DPP-NEXT: s_mov_b32 s32, 0
3235 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
3236 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
3237 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
3238 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
3239 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3240 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3241 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
3242 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, v0
3243 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
3244 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
3245 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
3246 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3247 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3248 ; GFX9-DPP-NEXT: s_nop 1
3249 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:1 row_mask:0xf bank_mask:0xf
3250 ; GFX9-DPP-NEXT: v_max_f32_e32 v4, v4, v4
3251 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
3252 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
3253 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3254 ; GFX9-DPP-NEXT: s_nop 1
3255 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:2 row_mask:0xf bank_mask:0xf
3256 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
3257 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
3258 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3259 ; GFX9-DPP-NEXT: s_nop 1
3260 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:4 row_mask:0xf bank_mask:0xf
3261 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
3262 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
3263 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3264 ; GFX9-DPP-NEXT: s_nop 1
3265 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_shr:8 row_mask:0xf bank_mask:0xf
3266 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
3267 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
3268 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3269 ; GFX9-DPP-NEXT: s_nop 1
3270 ; GFX9-DPP-NEXT: v_mov_b32_dpp v5, v4 row_bcast:15 row_mask:0xa bank_mask:0xf
3271 ; GFX9-DPP-NEXT: v_max_f32_e32 v5, v5, v5
3272 ; GFX9-DPP-NEXT: v_min_f32_e32 v4, v4, v5
3273 ; GFX9-DPP-NEXT: s_nop 1
3274 ; GFX9-DPP-NEXT: v_mov_b32_dpp v3, v4 row_bcast:31 row_mask:0xc bank_mask:0xf
3275 ; GFX9-DPP-NEXT: v_max_f32_e32 v3, v3, v3
3276 ; GFX9-DPP-NEXT: v_min_f32_e32 v3, v4, v3
3277 ; GFX9-DPP-NEXT: v_readlane_b32 s4, v3, 63
3278 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
3279 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
3280 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
3281 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB5_3
3282 ; GFX9-DPP-NEXT: ; %bb.1:
3283 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
3284 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
3285 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
3286 ; GFX9-DPP-NEXT: v_max_f32_e64 v6, s4, s4
3287 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
3288 ; GFX9-DPP-NEXT: global_load_dword v1, v2, s[0:1]
3289 ; GFX9-DPP-NEXT: .LBB5_2: ; %atomicrmw.start
3290 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3291 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
3292 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
3293 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, v0, v6
3294 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
3295 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
3296 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
3297 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
3298 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
3299 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
3300 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB5_2
3301 ; GFX9-DPP-NEXT: .LBB5_3:
3302 ; GFX9-DPP-NEXT: s_endpgm
3304 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3305 ; GFX1064-DPP: ; %bb.0:
3306 ; GFX1064-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
3307 ; GFX1064-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
3308 ; GFX1064-DPP-NEXT: s_mov_b32 s38, -1
3309 ; GFX1064-DPP-NEXT: s_mov_b32 s39, 0x31e16000
3310 ; GFX1064-DPP-NEXT: s_add_u32 s36, s36, s9
3311 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
3312 ; GFX1064-DPP-NEXT: s_addc_u32 s37, s37, 0
3313 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s8
3314 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
3315 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
3316 ; GFX1064-DPP-NEXT: s_getpc_b64 s[2:3]
3317 ; GFX1064-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3318 ; GFX1064-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3319 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
3320 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
3321 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
3322 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3323 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3324 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
3325 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s6
3326 ; GFX1064-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
3327 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s7
3328 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
3329 ; GFX1064-DPP-NEXT: s_mov_b32 s32, 0
3330 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
3331 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
3332 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3333 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3334 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
3335 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v0
3336 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
3337 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
3338 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
3339 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3340 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
3341 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
3342 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3343 ; GFX1064-DPP-NEXT: v_max_f32_e32 v3, v3, v3
3344 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
3345 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
3346 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3347 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3348 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3349 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
3350 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3351 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3352 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3353 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
3354 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3355 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3356 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, v3
3357 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
3358 ; GFX1064-DPP-NEXT: v_max_f32_e32 v4, v4, v4
3359 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3360 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v3, 32
3361 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v3, 0
3362 ; GFX1064-DPP-NEXT: v_max_f32_e64 v3, s2, s2
3363 ; GFX1064-DPP-NEXT: v_max_f32_e64 v4, s3, s3
3364 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
3365 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3366 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3367 ; GFX1064-DPP-NEXT: v_min_f32_e32 v3, v4, v3
3368 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
3369 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v0
3370 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, v3
3371 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
3372 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
3373 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB5_3
3374 ; GFX1064-DPP-NEXT: ; %bb.1:
3375 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
3376 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
3377 ; GFX1064-DPP-NEXT: v_max_f32_e32 v6, v0, v0
3378 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
3379 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
3380 ; GFX1064-DPP-NEXT: global_load_dword v1, v2, s[0:1]
3381 ; GFX1064-DPP-NEXT: .LBB5_2: ; %atomicrmw.start
3382 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3383 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
3384 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
3385 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, v0, v6
3386 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
3387 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
3388 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
3389 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
3390 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
3391 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
3392 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB5_2
3393 ; GFX1064-DPP-NEXT: .LBB5_3:
3394 ; GFX1064-DPP-NEXT: s_endpgm
3396 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3397 ; GFX1032-DPP: ; %bb.0:
3398 ; GFX1032-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
3399 ; GFX1032-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
3400 ; GFX1032-DPP-NEXT: s_mov_b32 s38, -1
3401 ; GFX1032-DPP-NEXT: s_mov_b32 s39, 0x31c16000
3402 ; GFX1032-DPP-NEXT: s_add_u32 s36, s36, s9
3403 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
3404 ; GFX1032-DPP-NEXT: s_addc_u32 s37, s37, 0
3405 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s8
3406 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
3407 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
3408 ; GFX1032-DPP-NEXT: s_getpc_b64 s[2:3]
3409 ; GFX1032-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3410 ; GFX1032-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3411 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
3412 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
3413 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
3414 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3415 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3416 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
3417 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s6
3418 ; GFX1032-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
3419 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s7
3420 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
3421 ; GFX1032-DPP-NEXT: s_mov_b32 s32, 0
3422 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
3423 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
3424 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
3425 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3426 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
3427 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v0
3428 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
3429 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0x7fc00000
3430 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
3431 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
3432 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v3, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
3433 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
3434 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3435 ; GFX1032-DPP-NEXT: v_max_f32_e32 v3, v3, v3
3436 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v4, v3
3437 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:2 row_mask:0xf bank_mask:0xf
3438 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3439 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3440 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3441 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:4 row_mask:0xf bank_mask:0xf
3442 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3443 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 0x7fc00000
3444 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3445 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v5, v3 row_xmask:8 row_mask:0xf bank_mask:0xf
3446 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3447 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3448 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v3
3449 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
3450 ; GFX1032-DPP-NEXT: v_max_f32_e32 v4, v4, v4
3451 ; GFX1032-DPP-NEXT: v_min_f32_e32 v3, v3, v4
3452 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
3453 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
3454 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, v3
3455 ; GFX1032-DPP-NEXT: s_mov_b32 s2, 0
3456 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v1
3457 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
3458 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB5_3
3459 ; GFX1032-DPP-NEXT: ; %bb.1:
3460 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
3461 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
3462 ; GFX1032-DPP-NEXT: v_max_f32_e32 v6, v0, v0
3463 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
3464 ; GFX1032-DPP-NEXT: global_load_dword v1, v2, s[0:1]
3465 ; GFX1032-DPP-NEXT: .LBB5_2: ; %atomicrmw.start
3466 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3467 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
3468 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
3469 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, v0, v6
3470 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
3471 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
3472 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
3473 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
3474 ; GFX1032-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
3475 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
3476 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB5_2
3477 ; GFX1032-DPP-NEXT: .LBB5_3:
3478 ; GFX1032-DPP-NEXT: s_endpgm
3480 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3481 ; GFX1164-DPP: ; %bb.0:
3482 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
3483 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s8
3484 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
3485 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
3486 ; GFX1164-DPP-NEXT: s_getpc_b64 s[2:3]
3487 ; GFX1164-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3488 ; GFX1164-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3489 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
3490 ; GFX1164-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
3491 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3492 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3493 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
3494 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
3495 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 0
3496 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
3497 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
3498 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3499 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
3500 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
3501 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v0
3502 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
3503 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
3504 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
3505 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3506 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
3507 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
3508 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
3509 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3510 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
3511 ; GFX1164-DPP-NEXT: v_max_f32_e32 v1, v1, v1
3512 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v2, v1
3513 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3514 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
3515 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
3516 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3517 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
3518 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3519 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
3520 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
3521 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
3522 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7fc00000
3523 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3524 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3525 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
3526 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v3, v3
3527 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3528 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3529 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v1
3530 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3531 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
3532 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
3533 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3534 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3535 ; GFX1164-DPP-NEXT: v_permlane64_b32 v2, v1
3536 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
3537 ; GFX1164-DPP-NEXT: v_max_f32_e32 v2, v2, v2
3538 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
3539 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3540 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
3541 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
3542 ; GFX1164-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3543 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
3544 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
3545 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
3546 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
3547 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v1
3548 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
3549 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
3550 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB5_3
3551 ; GFX1164-DPP-NEXT: ; %bb.1:
3552 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
3553 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 0
3554 ; GFX1164-DPP-NEXT: v_max_f32_e32 v6, v4, v4
3555 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
3556 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
3557 ; GFX1164-DPP-NEXT: global_load_b32 v5, v0, s[0:1]
3558 ; GFX1164-DPP-NEXT: .LBB5_2: ; %atomicrmw.start
3559 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3560 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
3561 ; GFX1164-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3562 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
3563 ; GFX1164-DPP-NEXT: v_min_f32_e32 v4, v4, v6
3564 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v4, v0, v[4:5], s[0:1] glc
3565 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
3566 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v4, v5
3567 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, v4
3568 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
3569 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
3570 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
3571 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB5_2
3572 ; GFX1164-DPP-NEXT: .LBB5_3:
3573 ; GFX1164-DPP-NEXT: s_endpgm
3575 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_div_value_default_scope_unsafe:
3576 ; GFX1132-DPP: ; %bb.0:
3577 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
3578 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
3579 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
3580 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
3581 ; GFX1132-DPP-NEXT: s_getpc_b64 s[2:3]
3582 ; GFX1132-DPP-NEXT: s_add_u32 s2, s2, div.float.value@gotpcrel32@lo+4
3583 ; GFX1132-DPP-NEXT: s_addc_u32 s3, s3, div.float.value@gotpcrel32@hi+12
3584 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
3585 ; GFX1132-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
3586 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
3587 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
3588 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
3589 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
3590 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 0
3591 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
3592 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
3593 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
3594 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, 0x7fc00000
3595 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
3596 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v0
3597 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
3598 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0x7fc00000
3599 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
3600 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
3601 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
3602 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v1, v2 row_xmask:1 row_mask:0xf bank_mask:0xf
3603 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v2, v2 :: v_dual_mov_b32 v3, 0x7fc00000
3604 ; GFX1132-DPP-NEXT: v_max_f32_e32 v1, v1, v1
3605 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3606 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v2, v1
3607 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:2 row_mask:0xf bank_mask:0xf
3608 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3609 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
3610 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3611 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3612 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:4 row_mask:0xf bank_mask:0xf
3613 ; GFX1132-DPP-NEXT: v_dual_max_f32 v2, v3, v3 :: v_dual_mov_b32 v3, 0x7fc00000
3614 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3615 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3616 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v1 row_xmask:8 row_mask:0xf bank_mask:0xf
3617 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3618 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v3, v3
3619 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3620 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3621 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, v1
3622 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v2, v2, -1, -1
3623 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3624 ; GFX1132-DPP-NEXT: v_max_f32_e32 v2, v2, v2
3625 ; GFX1132-DPP-NEXT: v_min_f32_e32 v1, v1, v2
3626 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
3627 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
3628 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3629 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v1
3630 ; GFX1132-DPP-NEXT: s_mov_b32 s2, 0
3631 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
3632 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2)
3633 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
3634 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB5_3
3635 ; GFX1132-DPP-NEXT: ; %bb.1:
3636 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
3637 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, 0
3638 ; GFX1132-DPP-NEXT: v_max_f32_e32 v6, v4, v4
3639 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
3640 ; GFX1132-DPP-NEXT: global_load_b32 v5, v0, s[0:1]
3641 ; GFX1132-DPP-NEXT: .LBB5_2: ; %atomicrmw.start
3642 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
3643 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
3644 ; GFX1132-DPP-NEXT: v_max_f32_e32 v4, v5, v5
3645 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
3646 ; GFX1132-DPP-NEXT: v_min_f32_e32 v4, v4, v6
3647 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v4, v0, v[4:5], s[0:1] glc
3648 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
3649 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v4, v5
3650 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v5, v4
3651 ; GFX1132-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
3652 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
3653 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
3654 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB5_2
3655 ; GFX1132-DPP-NEXT: .LBB5_3:
3656 ; GFX1132-DPP-NEXT: s_endpgm
3657 %divValue = call float @div.float.value()
3658 %result = atomicrmw fmin ptr addrspace(1) %ptr, float %divValue monotonic, align 4
3662 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe(ptr addrspace(1) %ptr) #0 {
3663 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
3664 ; GFX7LESS: ; %bb.0:
3665 ; GFX7LESS-NEXT: s_movk_i32 s32, 0x800
3666 ; GFX7LESS-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
3667 ; GFX7LESS-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
3668 ; GFX7LESS-NEXT: s_mov_b32 s50, -1
3669 ; GFX7LESS-NEXT: s_mov_b32 s51, 0xe8f000
3670 ; GFX7LESS-NEXT: s_add_u32 s48, s48, s9
3671 ; GFX7LESS-NEXT: s_addc_u32 s49, s49, 0
3672 ; GFX7LESS-NEXT: s_mov_b64 s[38:39], s[0:1]
3673 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v3, exec_lo, 0
3674 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v3, exec_hi, v3
3675 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
3676 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
3677 ; GFX7LESS-NEXT: s_cbranch_execz .LBB6_3
3678 ; GFX7LESS-NEXT: ; %bb.1:
3679 ; GFX7LESS-NEXT: s_mov_b32 s33, s8
3680 ; GFX7LESS-NEXT: s_mov_b32 s40, s7
3681 ; GFX7LESS-NEXT: s_mov_b32 s41, s6
3682 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[4:5]
3683 ; GFX7LESS-NEXT: s_mov_b64 s[36:37], s[2:3]
3684 ; GFX7LESS-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x9
3685 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
3686 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
3687 ; GFX7LESS-NEXT: s_mov_b64 s[44:45], 0
3688 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
3689 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
3690 ; GFX7LESS-NEXT: v_or_b32_e32 v3, v0, v1
3691 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
3692 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, s0
3693 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s1
3694 ; GFX7LESS-NEXT: v_or_b32_e32 v40, v3, v2
3695 ; GFX7LESS-NEXT: .LBB6_2: ; %atomicrmw.start
3696 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
3697 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
3698 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
3699 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
3700 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0
3701 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
3702 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
3703 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[2:3], 4.0
3704 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
3705 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
3706 ; GFX7LESS-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
3707 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
3708 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
3709 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
3710 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
3711 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
3712 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, 8
3713 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
3714 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, 0
3715 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, 8
3716 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, 0
3717 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, 0
3718 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
3719 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
3720 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
3721 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
3722 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
3723 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
3724 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
3725 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
3726 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, s42
3727 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, s43
3728 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
3729 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
3730 ; GFX7LESS-NEXT: v_and_b32_e32 v2, 1, v0
3731 ; GFX7LESS-NEXT: buffer_load_dword v0, off, s[48:51], 0
3732 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
3733 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
3734 ; GFX7LESS-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
3735 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[44:45]
3736 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB6_2
3737 ; GFX7LESS-NEXT: .LBB6_3:
3738 ; GFX7LESS-NEXT: s_endpgm
3740 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
3742 ; GFX9-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
3743 ; GFX9-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
3744 ; GFX9-NEXT: s_mov_b32 s50, -1
3745 ; GFX9-NEXT: s_mov_b32 s51, 0xe00000
3746 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
3747 ; GFX9-NEXT: s_add_u32 s48, s48, s9
3748 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
3749 ; GFX9-NEXT: s_addc_u32 s49, s49, 0
3750 ; GFX9-NEXT: s_mov_b64 s[38:39], s[0:1]
3751 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
3752 ; GFX9-NEXT: s_movk_i32 s32, 0x800
3753 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
3754 ; GFX9-NEXT: s_cbranch_execz .LBB6_3
3755 ; GFX9-NEXT: ; %bb.1:
3756 ; GFX9-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
3757 ; GFX9-NEXT: v_lshlrev_b32_e32 v3, 20, v2
3758 ; GFX9-NEXT: v_lshlrev_b32_e32 v4, 10, v1
3759 ; GFX9-NEXT: s_mov_b32 s33, s8
3760 ; GFX9-NEXT: s_mov_b32 s40, s7
3761 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
3762 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
3763 ; GFX9-NEXT: s_mov_b32 s41, s6
3764 ; GFX9-NEXT: s_mov_b64 s[34:35], s[4:5]
3765 ; GFX9-NEXT: s_mov_b64 s[36:37], s[2:3]
3766 ; GFX9-NEXT: s_mov_b64 s[44:45], 0
3767 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
3768 ; GFX9-NEXT: v_mov_b32_e32 v2, s1
3769 ; GFX9-NEXT: v_mov_b32_e32 v1, s0
3770 ; GFX9-NEXT: v_or3_b32 v40, v0, v4, v3
3771 ; GFX9-NEXT: .LBB6_2: ; %atomicrmw.start
3772 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
3773 ; GFX9-NEXT: s_waitcnt vmcnt(0)
3774 ; GFX9-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
3775 ; GFX9-NEXT: s_add_u32 s8, s36, 44
3776 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
3777 ; GFX9-NEXT: s_getpc_b64 s[0:1]
3778 ; GFX9-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
3779 ; GFX9-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
3780 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
3781 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
3782 ; GFX9-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
3783 ; GFX9-NEXT: buffer_store_dword v1, off, s[48:51], 0
3784 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
3785 ; GFX9-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
3786 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
3787 ; GFX9-NEXT: s_mov_b32 s12, s41
3788 ; GFX9-NEXT: s_mov_b32 s13, s40
3789 ; GFX9-NEXT: s_mov_b32 s14, s33
3790 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
3791 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
3792 ; GFX9-NEXT: v_mov_b32_e32 v0, 8
3793 ; GFX9-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
3794 ; GFX9-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
3795 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
3796 ; GFX9-NEXT: v_mov_b32_e32 v2, s42
3797 ; GFX9-NEXT: v_mov_b32_e32 v3, s43
3798 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
3799 ; GFX9-NEXT: v_mov_b32_e32 v5, 8
3800 ; GFX9-NEXT: v_mov_b32_e32 v6, 0
3801 ; GFX9-NEXT: v_mov_b32_e32 v7, 0
3802 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
3803 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
3804 ; GFX9-NEXT: buffer_load_dword v1, off, s[48:51], 0
3805 ; GFX9-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
3806 ; GFX9-NEXT: v_and_b32_e32 v0, 1, v0
3807 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
3808 ; GFX9-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
3809 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[44:45]
3810 ; GFX9-NEXT: s_cbranch_execnz .LBB6_2
3811 ; GFX9-NEXT: .LBB6_3:
3812 ; GFX9-NEXT: s_endpgm
3814 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
3816 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
3817 ; GFX1064-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
3818 ; GFX1064-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
3819 ; GFX1064-NEXT: s_mov_b32 s50, -1
3820 ; GFX1064-NEXT: s_mov_b32 s51, 0x31e16000
3821 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
3822 ; GFX1064-NEXT: s_add_u32 s48, s48, s9
3823 ; GFX1064-NEXT: s_addc_u32 s49, s49, 0
3824 ; GFX1064-NEXT: s_mov_b64 s[38:39], s[0:1]
3825 ; GFX1064-NEXT: s_movk_i32 s32, 0x800
3826 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
3827 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
3828 ; GFX1064-NEXT: s_cbranch_execz .LBB6_3
3829 ; GFX1064-NEXT: ; %bb.1:
3830 ; GFX1064-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
3831 ; GFX1064-NEXT: v_lshlrev_b32_e32 v3, 20, v2
3832 ; GFX1064-NEXT: v_lshlrev_b32_e32 v4, 10, v1
3833 ; GFX1064-NEXT: s_mov_b32 s33, s8
3834 ; GFX1064-NEXT: s_mov_b32 s40, s7
3835 ; GFX1064-NEXT: s_mov_b32 s41, s6
3836 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[4:5]
3837 ; GFX1064-NEXT: v_or3_b32 v40, v0, v4, v3
3838 ; GFX1064-NEXT: s_mov_b64 s[36:37], s[2:3]
3839 ; GFX1064-NEXT: s_mov_b64 s[44:45], 0
3840 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
3841 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
3842 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
3843 ; GFX1064-NEXT: v_mov_b32_e32 v2, s1
3844 ; GFX1064-NEXT: v_mov_b32_e32 v1, s0
3845 ; GFX1064-NEXT: .LBB6_2: ; %atomicrmw.start
3846 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
3847 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
3848 ; GFX1064-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
3849 ; GFX1064-NEXT: s_add_u32 s8, s36, 44
3850 ; GFX1064-NEXT: s_addc_u32 s9, s37, 0
3851 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
3852 ; GFX1064-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
3853 ; GFX1064-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
3854 ; GFX1064-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
3855 ; GFX1064-NEXT: buffer_store_dword v1, off, s[48:51], 0
3856 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
3857 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
3858 ; GFX1064-NEXT: v_mov_b32_e32 v0, 8
3859 ; GFX1064-NEXT: v_mov_b32_e32 v1, 0
3860 ; GFX1064-NEXT: v_mov_b32_e32 v2, s42
3861 ; GFX1064-NEXT: v_mov_b32_e32 v5, 8
3862 ; GFX1064-NEXT: v_mov_b32_e32 v6, 0
3863 ; GFX1064-NEXT: v_mov_b32_e32 v7, 0
3864 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
3865 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
3866 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[34:35]
3867 ; GFX1064-NEXT: s_mov_b32 s12, s41
3868 ; GFX1064-NEXT: s_mov_b32 s13, s40
3869 ; GFX1064-NEXT: s_mov_b32 s14, s33
3870 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
3871 ; GFX1064-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
3872 ; GFX1064-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
3873 ; GFX1064-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
3874 ; GFX1064-NEXT: v_mov_b32_e32 v3, s43
3875 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
3876 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
3877 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
3878 ; GFX1064-NEXT: s_clause 0x1
3879 ; GFX1064-NEXT: buffer_load_dword v1, off, s[48:51], 0
3880 ; GFX1064-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
3881 ; GFX1064-NEXT: v_and_b32_e32 v0, 1, v0
3882 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
3883 ; GFX1064-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
3884 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[44:45]
3885 ; GFX1064-NEXT: s_cbranch_execnz .LBB6_2
3886 ; GFX1064-NEXT: .LBB6_3:
3887 ; GFX1064-NEXT: s_endpgm
3889 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
3891 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
3892 ; GFX1032-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
3893 ; GFX1032-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
3894 ; GFX1032-NEXT: s_mov_b32 s50, -1
3895 ; GFX1032-NEXT: s_mov_b32 s51, 0x31c16000
3896 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
3897 ; GFX1032-NEXT: s_add_u32 s48, s48, s9
3898 ; GFX1032-NEXT: s_addc_u32 s49, s49, 0
3899 ; GFX1032-NEXT: s_mov_b64 s[38:39], s[0:1]
3900 ; GFX1032-NEXT: s_mov_b32 s44, 0
3901 ; GFX1032-NEXT: s_movk_i32 s32, 0x400
3902 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
3903 ; GFX1032-NEXT: s_cbranch_execz .LBB6_3
3904 ; GFX1032-NEXT: ; %bb.1:
3905 ; GFX1032-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
3906 ; GFX1032-NEXT: v_lshlrev_b32_e32 v3, 20, v2
3907 ; GFX1032-NEXT: v_lshlrev_b32_e32 v4, 10, v1
3908 ; GFX1032-NEXT: s_mov_b32 s33, s8
3909 ; GFX1032-NEXT: s_mov_b32 s40, s7
3910 ; GFX1032-NEXT: s_mov_b32 s41, s6
3911 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[4:5]
3912 ; GFX1032-NEXT: v_or3_b32 v40, v0, v4, v3
3913 ; GFX1032-NEXT: s_mov_b64 s[36:37], s[2:3]
3914 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
3915 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
3916 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
3917 ; GFX1032-NEXT: v_mov_b32_e32 v2, s1
3918 ; GFX1032-NEXT: v_mov_b32_e32 v1, s0
3919 ; GFX1032-NEXT: .LBB6_2: ; %atomicrmw.start
3920 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
3921 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
3922 ; GFX1032-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
3923 ; GFX1032-NEXT: s_add_u32 s8, s36, 44
3924 ; GFX1032-NEXT: s_addc_u32 s9, s37, 0
3925 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
3926 ; GFX1032-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
3927 ; GFX1032-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
3928 ; GFX1032-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
3929 ; GFX1032-NEXT: buffer_store_dword v1, off, s[48:51], 0
3930 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
3931 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
3932 ; GFX1032-NEXT: v_mov_b32_e32 v0, 8
3933 ; GFX1032-NEXT: v_mov_b32_e32 v1, 0
3934 ; GFX1032-NEXT: v_mov_b32_e32 v2, s42
3935 ; GFX1032-NEXT: v_mov_b32_e32 v5, 8
3936 ; GFX1032-NEXT: v_mov_b32_e32 v6, 0
3937 ; GFX1032-NEXT: v_mov_b32_e32 v7, 0
3938 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
3939 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
3940 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[34:35]
3941 ; GFX1032-NEXT: s_mov_b32 s12, s41
3942 ; GFX1032-NEXT: s_mov_b32 s13, s40
3943 ; GFX1032-NEXT: s_mov_b32 s14, s33
3944 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
3945 ; GFX1032-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
3946 ; GFX1032-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
3947 ; GFX1032-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
3948 ; GFX1032-NEXT: v_mov_b32_e32 v3, s43
3949 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
3950 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
3951 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
3952 ; GFX1032-NEXT: s_clause 0x1
3953 ; GFX1032-NEXT: buffer_load_dword v1, off, s[48:51], 0
3954 ; GFX1032-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
3955 ; GFX1032-NEXT: v_and_b32_e32 v0, 1, v0
3956 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
3957 ; GFX1032-NEXT: s_or_b32 s44, vcc_lo, s44
3958 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
3959 ; GFX1032-NEXT: s_cbranch_execnz .LBB6_2
3960 ; GFX1032-NEXT: .LBB6_3:
3961 ; GFX1032-NEXT: s_endpgm
3963 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
3965 ; GFX1164-NEXT: v_mov_b32_e32 v40, v0
3966 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
3967 ; GFX1164-NEXT: s_mov_b64 s[38:39], s[0:1]
3968 ; GFX1164-NEXT: s_mov_b32 s32, 32
3969 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
3970 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
3971 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
3972 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
3973 ; GFX1164-NEXT: s_cbranch_execz .LBB6_3
3974 ; GFX1164-NEXT: ; %bb.1:
3975 ; GFX1164-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
3976 ; GFX1164-NEXT: s_mov_b32 s33, s8
3977 ; GFX1164-NEXT: s_mov_b32 s40, s7
3978 ; GFX1164-NEXT: s_mov_b32 s41, s6
3979 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[4:5]
3980 ; GFX1164-NEXT: s_mov_b64 s[36:37], s[2:3]
3981 ; GFX1164-NEXT: s_mov_b64 s[44:45], 0
3982 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
3983 ; GFX1164-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
3984 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
3985 ; GFX1164-NEXT: v_mov_b32_e32 v2, s1
3986 ; GFX1164-NEXT: v_mov_b32_e32 v1, s0
3987 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x1
3988 ; GFX1164-NEXT: .p2align 6
3989 ; GFX1164-NEXT: .LBB6_2: ; %atomicrmw.start
3990 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
3991 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
3992 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
3993 ; GFX1164-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
3994 ; GFX1164-NEXT: s_add_u32 s8, s36, 44
3995 ; GFX1164-NEXT: s_addc_u32 s9, s37, 0
3996 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
3997 ; GFX1164-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
3998 ; GFX1164-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
3999 ; GFX1164-NEXT: v_mov_b32_e32 v31, v40
4000 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
4001 ; GFX1164-NEXT: v_mov_b32_e32 v0, 8
4002 ; GFX1164-NEXT: v_mov_b32_e32 v5, 8
4003 ; GFX1164-NEXT: v_mov_b32_e32 v6, 0
4004 ; GFX1164-NEXT: v_mov_b32_e32 v7, 0
4005 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
4006 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[34:35]
4007 ; GFX1164-NEXT: s_mov_b32 s12, s41
4008 ; GFX1164-NEXT: s_mov_b32 s13, s40
4009 ; GFX1164-NEXT: s_mov_b32 s14, s33
4010 ; GFX1164-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4011 ; GFX1164-NEXT: s_clause 0x1
4012 ; GFX1164-NEXT: scratch_store_b64 off, v[1:2], off
4013 ; GFX1164-NEXT: scratch_store_b64 off, v[3:4], off offset:8
4014 ; GFX1164-NEXT: v_mov_b32_e32 v1, 0
4015 ; GFX1164-NEXT: v_mov_b32_e32 v2, s42
4016 ; GFX1164-NEXT: v_mov_b32_e32 v3, s43
4017 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
4018 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
4019 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
4020 ; GFX1164-NEXT: scratch_load_b64 v[1:2], off, off
4021 ; GFX1164-NEXT: v_and_b32_e32 v0, 1, v0
4022 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
4023 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4024 ; GFX1164-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4025 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[44:45]
4026 ; GFX1164-NEXT: s_cbranch_execnz .LBB6_2
4027 ; GFX1164-NEXT: .LBB6_3:
4028 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x2
4029 ; GFX1164-NEXT: s_endpgm
4031 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4033 ; GFX1132-NEXT: v_mov_b32_e32 v40, v0
4034 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4035 ; GFX1132-NEXT: s_mov_b64 s[38:39], s[0:1]
4036 ; GFX1132-NEXT: s_mov_b32 s44, 0
4037 ; GFX1132-NEXT: s_mov_b32 s32, 32
4038 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
4039 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
4040 ; GFX1132-NEXT: s_cbranch_execz .LBB6_3
4041 ; GFX1132-NEXT: ; %bb.1:
4042 ; GFX1132-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
4043 ; GFX1132-NEXT: s_mov_b32 s33, s15
4044 ; GFX1132-NEXT: s_mov_b32 s40, s14
4045 ; GFX1132-NEXT: s_mov_b32 s41, s13
4046 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[4:5]
4047 ; GFX1132-NEXT: s_mov_b64 s[36:37], s[2:3]
4048 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
4049 ; GFX1132-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
4050 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
4051 ; GFX1132-NEXT: v_dual_mov_b32 v2, s1 :: v_dual_mov_b32 v1, s0
4052 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x1
4053 ; GFX1132-NEXT: .p2align 6
4054 ; GFX1132-NEXT: .LBB6_2: ; %atomicrmw.start
4055 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
4056 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
4057 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
4058 ; GFX1132-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4059 ; GFX1132-NEXT: s_add_u32 s8, s36, 44
4060 ; GFX1132-NEXT: s_addc_u32 s9, s37, 0
4061 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
4062 ; GFX1132-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4063 ; GFX1132-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4064 ; GFX1132-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
4065 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
4066 ; GFX1132-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
4067 ; GFX1132-NEXT: v_mov_b32_e32 v7, 0
4068 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
4069 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[34:35]
4070 ; GFX1132-NEXT: s_mov_b32 s12, s41
4071 ; GFX1132-NEXT: s_mov_b32 s13, s40
4072 ; GFX1132-NEXT: s_mov_b32 s14, s33
4073 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_4)
4074 ; GFX1132-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4075 ; GFX1132-NEXT: s_clause 0x1
4076 ; GFX1132-NEXT: scratch_store_b64 off, v[1:2], off
4077 ; GFX1132-NEXT: scratch_store_b64 off, v[3:4], off offset:8
4078 ; GFX1132-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
4079 ; GFX1132-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
4080 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
4081 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
4082 ; GFX1132-NEXT: scratch_load_b64 v[1:2], off, off
4083 ; GFX1132-NEXT: v_and_b32_e32 v0, 1, v0
4084 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
4085 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
4086 ; GFX1132-NEXT: s_or_b32 s44, vcc_lo, s44
4087 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
4088 ; GFX1132-NEXT: s_cbranch_execnz .LBB6_2
4089 ; GFX1132-NEXT: .LBB6_3:
4090 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x2
4091 ; GFX1132-NEXT: s_endpgm
4093 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4094 ; GFX7LESS-DPP: ; %bb.0:
4095 ; GFX7LESS-DPP-NEXT: s_movk_i32 s32, 0x800
4096 ; GFX7LESS-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4097 ; GFX7LESS-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4098 ; GFX7LESS-DPP-NEXT: s_mov_b32 s50, -1
4099 ; GFX7LESS-DPP-NEXT: s_mov_b32 s51, 0xe8f000
4100 ; GFX7LESS-DPP-NEXT: s_add_u32 s48, s48, s9
4101 ; GFX7LESS-DPP-NEXT: s_addc_u32 s49, s49, 0
4102 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4103 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v3, exec_lo, 0
4104 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v3, exec_hi, v3
4105 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
4106 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
4107 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB6_3
4108 ; GFX7LESS-DPP-NEXT: ; %bb.1:
4109 ; GFX7LESS-DPP-NEXT: s_mov_b32 s33, s8
4110 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, s7
4111 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, s6
4112 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4113 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4114 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x9
4115 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
4116 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
4117 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[44:45], 0
4118 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
4119 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
4120 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v3, v0, v1
4121 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
4122 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, s0
4123 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s1
4124 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v40, v3, v2
4125 ; GFX7LESS-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4126 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4127 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
4128 ; GFX7LESS-DPP-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
4129 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
4130 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0
4131 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
4132 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
4133 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[2:3], 4.0
4134 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
4135 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
4136 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4137 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4138 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
4139 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
4140 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4141 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
4142 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, 8
4143 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, 0
4144 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, 0
4145 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v5, 8
4146 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, 0
4147 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, 0
4148 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4149 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4150 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
4151 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
4152 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
4153 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
4154 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
4155 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
4156 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, s42
4157 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, s43
4158 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
4159 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
4160 ; GFX7LESS-DPP-NEXT: v_and_b32_e32 v2, 1, v0
4161 ; GFX7LESS-DPP-NEXT: buffer_load_dword v0, off, s[48:51], 0
4162 ; GFX7LESS-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
4163 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
4164 ; GFX7LESS-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4165 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
4166 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB6_2
4167 ; GFX7LESS-DPP-NEXT: .LBB6_3:
4168 ; GFX7LESS-DPP-NEXT: s_endpgm
4170 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4171 ; GFX9-DPP: ; %bb.0:
4172 ; GFX9-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4173 ; GFX9-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4174 ; GFX9-DPP-NEXT: s_mov_b32 s50, -1
4175 ; GFX9-DPP-NEXT: s_mov_b32 s51, 0xe00000
4176 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
4177 ; GFX9-DPP-NEXT: s_add_u32 s48, s48, s9
4178 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
4179 ; GFX9-DPP-NEXT: s_addc_u32 s49, s49, 0
4180 ; GFX9-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4181 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
4182 ; GFX9-DPP-NEXT: s_movk_i32 s32, 0x800
4183 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
4184 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB6_3
4185 ; GFX9-DPP-NEXT: ; %bb.1:
4186 ; GFX9-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
4187 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
4188 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
4189 ; GFX9-DPP-NEXT: s_mov_b32 s33, s8
4190 ; GFX9-DPP-NEXT: s_mov_b32 s40, s7
4191 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
4192 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
4193 ; GFX9-DPP-NEXT: s_mov_b32 s41, s6
4194 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4195 ; GFX9-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4196 ; GFX9-DPP-NEXT: s_mov_b64 s[44:45], 0
4197 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
4198 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s1
4199 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s0
4200 ; GFX9-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
4201 ; GFX9-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4202 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4203 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
4204 ; GFX9-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4205 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
4206 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
4207 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
4208 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4209 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4210 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4211 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
4212 ; GFX9-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
4213 ; GFX9-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
4214 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4215 ; GFX9-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4216 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4217 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
4218 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
4219 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
4220 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
4221 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
4222 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 8
4223 ; GFX9-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
4224 ; GFX9-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
4225 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, 0
4226 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s42
4227 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, s43
4228 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0
4229 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 8
4230 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, 0
4231 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, 0
4232 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
4233 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
4234 ; GFX9-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
4235 ; GFX9-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
4236 ; GFX9-DPP-NEXT: v_and_b32_e32 v0, 1, v0
4237 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4238 ; GFX9-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4239 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
4240 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB6_2
4241 ; GFX9-DPP-NEXT: .LBB6_3:
4242 ; GFX9-DPP-NEXT: s_endpgm
4244 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4245 ; GFX1064-DPP: ; %bb.0:
4246 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
4247 ; GFX1064-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4248 ; GFX1064-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4249 ; GFX1064-DPP-NEXT: s_mov_b32 s50, -1
4250 ; GFX1064-DPP-NEXT: s_mov_b32 s51, 0x31e16000
4251 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
4252 ; GFX1064-DPP-NEXT: s_add_u32 s48, s48, s9
4253 ; GFX1064-DPP-NEXT: s_addc_u32 s49, s49, 0
4254 ; GFX1064-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4255 ; GFX1064-DPP-NEXT: s_movk_i32 s32, 0x800
4256 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
4257 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
4258 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB6_3
4259 ; GFX1064-DPP-NEXT: ; %bb.1:
4260 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
4261 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
4262 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
4263 ; GFX1064-DPP-NEXT: s_mov_b32 s33, s8
4264 ; GFX1064-DPP-NEXT: s_mov_b32 s40, s7
4265 ; GFX1064-DPP-NEXT: s_mov_b32 s41, s6
4266 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4267 ; GFX1064-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
4268 ; GFX1064-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4269 ; GFX1064-DPP-NEXT: s_mov_b64 s[44:45], 0
4270 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
4271 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
4272 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
4273 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s1
4274 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s0
4275 ; GFX1064-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4276 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4277 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
4278 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4279 ; GFX1064-DPP-NEXT: s_add_u32 s8, s36, 44
4280 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s37, 0
4281 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
4282 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4283 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4284 ; GFX1064-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
4285 ; GFX1064-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
4286 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4287 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
4288 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 8
4289 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 0
4290 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s42
4291 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 8
4292 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, 0
4293 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, 0
4294 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
4295 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4296 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4297 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
4298 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
4299 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
4300 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
4301 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4302 ; GFX1064-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
4303 ; GFX1064-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
4304 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, s43
4305 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0
4306 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
4307 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
4308 ; GFX1064-DPP-NEXT: s_clause 0x1
4309 ; GFX1064-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
4310 ; GFX1064-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
4311 ; GFX1064-DPP-NEXT: v_and_b32_e32 v0, 1, v0
4312 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4313 ; GFX1064-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4314 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
4315 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB6_2
4316 ; GFX1064-DPP-NEXT: .LBB6_3:
4317 ; GFX1064-DPP-NEXT: s_endpgm
4319 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4320 ; GFX1032-DPP: ; %bb.0:
4321 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
4322 ; GFX1032-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4323 ; GFX1032-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4324 ; GFX1032-DPP-NEXT: s_mov_b32 s50, -1
4325 ; GFX1032-DPP-NEXT: s_mov_b32 s51, 0x31c16000
4326 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
4327 ; GFX1032-DPP-NEXT: s_add_u32 s48, s48, s9
4328 ; GFX1032-DPP-NEXT: s_addc_u32 s49, s49, 0
4329 ; GFX1032-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4330 ; GFX1032-DPP-NEXT: s_mov_b32 s44, 0
4331 ; GFX1032-DPP-NEXT: s_movk_i32 s32, 0x400
4332 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
4333 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB6_3
4334 ; GFX1032-DPP-NEXT: ; %bb.1:
4335 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
4336 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
4337 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
4338 ; GFX1032-DPP-NEXT: s_mov_b32 s33, s8
4339 ; GFX1032-DPP-NEXT: s_mov_b32 s40, s7
4340 ; GFX1032-DPP-NEXT: s_mov_b32 s41, s6
4341 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4342 ; GFX1032-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
4343 ; GFX1032-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4344 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
4345 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
4346 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
4347 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s1
4348 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s0
4349 ; GFX1032-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4350 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4351 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
4352 ; GFX1032-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4353 ; GFX1032-DPP-NEXT: s_add_u32 s8, s36, 44
4354 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s37, 0
4355 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
4356 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4357 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4358 ; GFX1032-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
4359 ; GFX1032-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
4360 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4361 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
4362 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 8
4363 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 0
4364 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s42
4365 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 8
4366 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, 0
4367 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, 0
4368 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
4369 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4370 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4371 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
4372 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
4373 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
4374 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
4375 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4376 ; GFX1032-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
4377 ; GFX1032-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
4378 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, s43
4379 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0
4380 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
4381 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
4382 ; GFX1032-DPP-NEXT: s_clause 0x1
4383 ; GFX1032-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
4384 ; GFX1032-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
4385 ; GFX1032-DPP-NEXT: v_and_b32_e32 v0, 1, v0
4386 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
4387 ; GFX1032-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
4388 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
4389 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB6_2
4390 ; GFX1032-DPP-NEXT: .LBB6_3:
4391 ; GFX1032-DPP-NEXT: s_endpgm
4393 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4394 ; GFX1164-DPP: ; %bb.0:
4395 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v40, v0
4396 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4397 ; GFX1164-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4398 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 32
4399 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
4400 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
4401 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
4402 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
4403 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB6_3
4404 ; GFX1164-DPP-NEXT: ; %bb.1:
4405 ; GFX1164-DPP-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
4406 ; GFX1164-DPP-NEXT: s_mov_b32 s33, s8
4407 ; GFX1164-DPP-NEXT: s_mov_b32 s40, s7
4408 ; GFX1164-DPP-NEXT: s_mov_b32 s41, s6
4409 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4410 ; GFX1164-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4411 ; GFX1164-DPP-NEXT: s_mov_b64 s[44:45], 0
4412 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
4413 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
4414 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
4415 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s1
4416 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s0
4417 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x1
4418 ; GFX1164-DPP-NEXT: .p2align 6
4419 ; GFX1164-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4420 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4421 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
4422 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
4423 ; GFX1164-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4424 ; GFX1164-DPP-NEXT: s_add_u32 s8, s36, 44
4425 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s37, 0
4426 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
4427 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4428 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4429 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v40
4430 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
4431 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 8
4432 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, 8
4433 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, 0
4434 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, 0
4435 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4436 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4437 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s41
4438 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s40
4439 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
4440 ; GFX1164-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4441 ; GFX1164-DPP-NEXT: s_clause 0x1
4442 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[1:2], off
4443 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
4444 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0
4445 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s42
4446 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, s43
4447 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
4448 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
4449 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
4450 ; GFX1164-DPP-NEXT: scratch_load_b64 v[1:2], off, off
4451 ; GFX1164-DPP-NEXT: v_and_b32_e32 v0, 1, v0
4452 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
4453 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4454 ; GFX1164-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4455 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[44:45]
4456 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB6_2
4457 ; GFX1164-DPP-NEXT: .LBB6_3:
4458 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x2
4459 ; GFX1164-DPP-NEXT: s_endpgm
4461 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_agent_scope_unsafe:
4462 ; GFX1132-DPP: ; %bb.0:
4463 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v40, v0
4464 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4465 ; GFX1132-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
4466 ; GFX1132-DPP-NEXT: s_mov_b32 s44, 0
4467 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 32
4468 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
4469 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
4470 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB6_3
4471 ; GFX1132-DPP-NEXT: ; %bb.1:
4472 ; GFX1132-DPP-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
4473 ; GFX1132-DPP-NEXT: s_mov_b32 s33, s15
4474 ; GFX1132-DPP-NEXT: s_mov_b32 s40, s14
4475 ; GFX1132-DPP-NEXT: s_mov_b32 s41, s13
4476 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
4477 ; GFX1132-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
4478 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
4479 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
4480 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
4481 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v2, s1 :: v_dual_mov_b32 v1, s0
4482 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x1
4483 ; GFX1132-DPP-NEXT: .p2align 6
4484 ; GFX1132-DPP-NEXT: .LBB6_2: ; %atomicrmw.start
4485 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
4486 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
4487 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
4488 ; GFX1132-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4489 ; GFX1132-DPP-NEXT: s_add_u32 s8, s36, 44
4490 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s37, 0
4491 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
4492 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4493 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4494 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
4495 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
4496 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
4497 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v7, 0
4498 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
4499 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
4500 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s41
4501 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s40
4502 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s33
4503 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_4)
4504 ; GFX1132-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
4505 ; GFX1132-DPP-NEXT: s_clause 0x1
4506 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[1:2], off
4507 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
4508 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
4509 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
4510 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
4511 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
4512 ; GFX1132-DPP-NEXT: scratch_load_b64 v[1:2], off, off
4513 ; GFX1132-DPP-NEXT: v_and_b32_e32 v0, 1, v0
4514 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
4515 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
4516 ; GFX1132-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
4517 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
4518 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB6_2
4519 ; GFX1132-DPP-NEXT: .LBB6_3:
4520 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x2
4521 ; GFX1132-DPP-NEXT: s_endpgm
4522 %result = atomicrmw fmin ptr addrspace(1) %ptr, double 4.0 syncscope("agent") monotonic, align 4
4526 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe(ptr addrspace(1) %ptr) #0 {
4527 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
4528 ; GFX7LESS: ; %bb.0:
4529 ; GFX7LESS-NEXT: s_movk_i32 s32, 0x800
4530 ; GFX7LESS-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4531 ; GFX7LESS-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4532 ; GFX7LESS-NEXT: s_mov_b32 s50, -1
4533 ; GFX7LESS-NEXT: s_mov_b32 s51, 0xe8f000
4534 ; GFX7LESS-NEXT: s_add_u32 s48, s48, s9
4535 ; GFX7LESS-NEXT: s_addc_u32 s49, s49, 0
4536 ; GFX7LESS-NEXT: s_mov_b32 s33, s8
4537 ; GFX7LESS-NEXT: s_mov_b32 s40, s7
4538 ; GFX7LESS-NEXT: s_mov_b32 s41, s6
4539 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[4:5]
4540 ; GFX7LESS-NEXT: s_mov_b64 s[36:37], s[2:3]
4541 ; GFX7LESS-NEXT: s_mov_b64 s[38:39], s[0:1]
4542 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
4543 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
4544 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
4545 ; GFX7LESS-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
4546 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
4547 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4548 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
4549 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
4550 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
4551 ; GFX7LESS-NEXT: v_or_b32_e32 v40, v0, v2
4552 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
4553 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
4554 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
4555 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
4556 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
4557 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
4558 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
4559 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
4560 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
4561 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
4562 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
4563 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0
4564 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0x7ff80000
4565 ; GFX7LESS-NEXT: .LBB7_1: ; %ComputeLoop
4566 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
4567 ; GFX7LESS-NEXT: s_ff1_i32_b64 s4, s[0:1]
4568 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
4569 ; GFX7LESS-NEXT: v_readlane_b32 s3, v1, s4
4570 ; GFX7LESS-NEXT: v_readlane_b32 s2, v0, s4
4571 ; GFX7LESS-NEXT: s_lshl_b64 s[4:5], 1, s4
4572 ; GFX7LESS-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
4573 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[4:5]
4574 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
4575 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
4576 ; GFX7LESS-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
4577 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB7_1
4578 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
4579 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
4580 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
4581 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
4582 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
4583 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
4584 ; GFX7LESS-NEXT: s_cbranch_execz .LBB7_5
4585 ; GFX7LESS-NEXT: ; %bb.3:
4586 ; GFX7LESS-NEXT: s_load_dwordx2 s[44:45], s[36:37], 0x9
4587 ; GFX7LESS-NEXT: s_mov_b32 s47, 0xf000
4588 ; GFX7LESS-NEXT: s_mov_b32 s46, -1
4589 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
4590 ; GFX7LESS-NEXT: buffer_load_dwordx2 v[0:1], off, s[44:47], 0
4591 ; GFX7LESS-NEXT: s_mov_b64 s[42:43], 0
4592 ; GFX7LESS-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
4593 ; GFX7LESS-NEXT: .LBB7_4: ; %atomicrmw.start
4594 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
4595 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
4596 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
4597 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
4598 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0
4599 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
4600 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
4601 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[2:3], v[41:42]
4602 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
4603 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
4604 ; GFX7LESS-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4605 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4606 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
4607 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
4608 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4609 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
4610 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, 8
4611 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
4612 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, 0
4613 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, 8
4614 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, 0
4615 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, 0
4616 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
4617 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
4618 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
4619 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
4620 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
4621 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
4622 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
4623 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
4624 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, s44
4625 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, s45
4626 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
4627 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
4628 ; GFX7LESS-NEXT: v_and_b32_e32 v2, 1, v0
4629 ; GFX7LESS-NEXT: buffer_load_dword v0, off, s[48:51], 0
4630 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
4631 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
4632 ; GFX7LESS-NEXT: s_or_b64 s[42:43], vcc, s[42:43]
4633 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[42:43]
4634 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB7_4
4635 ; GFX7LESS-NEXT: .LBB7_5:
4636 ; GFX7LESS-NEXT: s_endpgm
4638 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
4640 ; GFX9-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4641 ; GFX9-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4642 ; GFX9-NEXT: s_mov_b32 s50, -1
4643 ; GFX9-NEXT: s_mov_b32 s51, 0xe00000
4644 ; GFX9-NEXT: s_add_u32 s48, s48, s9
4645 ; GFX9-NEXT: s_addc_u32 s49, s49, 0
4646 ; GFX9-NEXT: s_mov_b64 s[36:37], s[2:3]
4647 ; GFX9-NEXT: s_mov_b32 s33, s8
4648 ; GFX9-NEXT: s_add_u32 s8, s36, 44
4649 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
4650 ; GFX9-NEXT: s_mov_b64 s[38:39], s[0:1]
4651 ; GFX9-NEXT: s_getpc_b64 s[0:1]
4652 ; GFX9-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
4653 ; GFX9-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
4654 ; GFX9-NEXT: s_mov_b32 s40, s7
4655 ; GFX9-NEXT: s_mov_b32 s41, s6
4656 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4657 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
4658 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
4659 ; GFX9-NEXT: s_mov_b64 s[34:35], s[4:5]
4660 ; GFX9-NEXT: v_or3_b32 v40, v0, v1, v2
4661 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
4662 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
4663 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
4664 ; GFX9-NEXT: s_mov_b32 s12, s41
4665 ; GFX9-NEXT: s_mov_b32 s13, s40
4666 ; GFX9-NEXT: s_mov_b32 s14, s33
4667 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
4668 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
4669 ; GFX9-NEXT: s_movk_i32 s32, 0x800
4670 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
4671 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
4672 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
4673 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
4674 ; GFX9-NEXT: v_mov_b32_e32 v3, 0x7ff80000
4675 ; GFX9-NEXT: .LBB7_1: ; %ComputeLoop
4676 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
4677 ; GFX9-NEXT: s_ff1_i32_b64 s4, s[0:1]
4678 ; GFX9-NEXT: v_readlane_b32 s3, v1, s4
4679 ; GFX9-NEXT: v_readlane_b32 s2, v0, s4
4680 ; GFX9-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
4681 ; GFX9-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
4682 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s4
4683 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
4684 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
4685 ; GFX9-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
4686 ; GFX9-NEXT: s_cbranch_scc1 .LBB7_1
4687 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
4688 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4689 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
4690 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
4691 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
4692 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
4693 ; GFX9-NEXT: s_cbranch_execz .LBB7_5
4694 ; GFX9-NEXT: ; %bb.3:
4695 ; GFX9-NEXT: s_load_dwordx2 s[42:43], s[36:37], 0x24
4696 ; GFX9-NEXT: v_mov_b32_e32 v0, 0
4697 ; GFX9-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
4698 ; GFX9-NEXT: s_mov_b64 s[44:45], 0
4699 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
4700 ; GFX9-NEXT: global_load_dwordx2 v[4:5], v0, s[42:43]
4701 ; GFX9-NEXT: .LBB7_4: ; %atomicrmw.start
4702 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
4703 ; GFX9-NEXT: s_waitcnt vmcnt(0)
4704 ; GFX9-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
4705 ; GFX9-NEXT: s_add_u32 s8, s36, 44
4706 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
4707 ; GFX9-NEXT: s_getpc_b64 s[0:1]
4708 ; GFX9-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4709 ; GFX9-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4710 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4711 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
4712 ; GFX9-NEXT: buffer_store_dword v5, off, s[48:51], 0 offset:4
4713 ; GFX9-NEXT: buffer_store_dword v4, off, s[48:51], 0
4714 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
4715 ; GFX9-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
4716 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
4717 ; GFX9-NEXT: s_mov_b32 s12, s41
4718 ; GFX9-NEXT: s_mov_b32 s13, s40
4719 ; GFX9-NEXT: s_mov_b32 s14, s33
4720 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
4721 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
4722 ; GFX9-NEXT: v_mov_b32_e32 v2, s42
4723 ; GFX9-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
4724 ; GFX9-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
4725 ; GFX9-NEXT: v_mov_b32_e32 v0, 8
4726 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
4727 ; GFX9-NEXT: v_mov_b32_e32 v3, s43
4728 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
4729 ; GFX9-NEXT: v_mov_b32_e32 v5, 8
4730 ; GFX9-NEXT: v_mov_b32_e32 v6, 0
4731 ; GFX9-NEXT: v_mov_b32_e32 v7, 0
4732 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
4733 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
4734 ; GFX9-NEXT: buffer_load_dword v4, off, s[48:51], 0
4735 ; GFX9-NEXT: buffer_load_dword v5, off, s[48:51], 0 offset:4
4736 ; GFX9-NEXT: v_and_b32_e32 v0, 1, v0
4737 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4738 ; GFX9-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4739 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[44:45]
4740 ; GFX9-NEXT: s_cbranch_execnz .LBB7_4
4741 ; GFX9-NEXT: .LBB7_5:
4742 ; GFX9-NEXT: s_endpgm
4744 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
4746 ; GFX1064-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4747 ; GFX1064-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4748 ; GFX1064-NEXT: s_mov_b32 s50, -1
4749 ; GFX1064-NEXT: s_mov_b32 s51, 0x31e16000
4750 ; GFX1064-NEXT: s_add_u32 s48, s48, s9
4751 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
4752 ; GFX1064-NEXT: s_addc_u32 s49, s49, 0
4753 ; GFX1064-NEXT: s_mov_b32 s33, s8
4754 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
4755 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
4756 ; GFX1064-NEXT: s_mov_b64 s[38:39], s[0:1]
4757 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
4758 ; GFX1064-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
4759 ; GFX1064-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
4760 ; GFX1064-NEXT: s_mov_b32 s40, s7
4761 ; GFX1064-NEXT: s_mov_b32 s41, s6
4762 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4763 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
4764 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
4765 ; GFX1064-NEXT: s_mov_b64 s[36:37], s[4:5]
4766 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
4767 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
4768 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[36:37]
4769 ; GFX1064-NEXT: v_or3_b32 v40, v0, v1, v2
4770 ; GFX1064-NEXT: s_mov_b32 s12, s41
4771 ; GFX1064-NEXT: s_mov_b32 s13, s40
4772 ; GFX1064-NEXT: s_mov_b32 s14, s33
4773 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
4774 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
4775 ; GFX1064-NEXT: s_movk_i32 s32, 0x800
4776 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
4777 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
4778 ; GFX1064-NEXT: v_mov_b32_e32 v3, 0
4779 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0x7ff80000
4780 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
4781 ; GFX1064-NEXT: .LBB7_1: ; %ComputeLoop
4782 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
4783 ; GFX1064-NEXT: s_ff1_i32_b64 s4, s[0:1]
4784 ; GFX1064-NEXT: v_max_f64 v[2:3], v[3:4], v[3:4]
4785 ; GFX1064-NEXT: v_readlane_b32 s3, v1, s4
4786 ; GFX1064-NEXT: v_readlane_b32 s2, v0, s4
4787 ; GFX1064-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
4788 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s4
4789 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
4790 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
4791 ; GFX1064-NEXT: v_min_f64 v[3:4], v[2:3], v[4:5]
4792 ; GFX1064-NEXT: s_cbranch_scc1 .LBB7_1
4793 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
4794 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4795 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
4796 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
4797 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
4798 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
4799 ; GFX1064-NEXT: s_cbranch_execz .LBB7_5
4800 ; GFX1064-NEXT: ; %bb.3:
4801 ; GFX1064-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
4802 ; GFX1064-NEXT: v_mov_b32_e32 v0, 0
4803 ; GFX1064-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
4804 ; GFX1064-NEXT: s_mov_b64 s[44:45], 0
4805 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
4806 ; GFX1064-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
4807 ; GFX1064-NEXT: .LBB7_4: ; %atomicrmw.start
4808 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
4809 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
4810 ; GFX1064-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
4811 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
4812 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
4813 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
4814 ; GFX1064-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4815 ; GFX1064-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4816 ; GFX1064-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
4817 ; GFX1064-NEXT: buffer_store_dword v1, off, s[48:51], 0
4818 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4819 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
4820 ; GFX1064-NEXT: v_mov_b32_e32 v0, 8
4821 ; GFX1064-NEXT: v_mov_b32_e32 v1, 0
4822 ; GFX1064-NEXT: v_mov_b32_e32 v2, s42
4823 ; GFX1064-NEXT: v_mov_b32_e32 v5, 8
4824 ; GFX1064-NEXT: v_mov_b32_e32 v6, 0
4825 ; GFX1064-NEXT: v_mov_b32_e32 v7, 0
4826 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
4827 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
4828 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[36:37]
4829 ; GFX1064-NEXT: s_mov_b32 s12, s41
4830 ; GFX1064-NEXT: s_mov_b32 s13, s40
4831 ; GFX1064-NEXT: s_mov_b32 s14, s33
4832 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
4833 ; GFX1064-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
4834 ; GFX1064-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
4835 ; GFX1064-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
4836 ; GFX1064-NEXT: v_mov_b32_e32 v3, s43
4837 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
4838 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
4839 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
4840 ; GFX1064-NEXT: s_clause 0x1
4841 ; GFX1064-NEXT: buffer_load_dword v1, off, s[48:51], 0
4842 ; GFX1064-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
4843 ; GFX1064-NEXT: v_and_b32_e32 v0, 1, v0
4844 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
4845 ; GFX1064-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
4846 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[44:45]
4847 ; GFX1064-NEXT: s_cbranch_execnz .LBB7_4
4848 ; GFX1064-NEXT: .LBB7_5:
4849 ; GFX1064-NEXT: s_endpgm
4851 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
4853 ; GFX1032-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
4854 ; GFX1032-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
4855 ; GFX1032-NEXT: s_mov_b32 s50, -1
4856 ; GFX1032-NEXT: s_mov_b32 s51, 0x31c16000
4857 ; GFX1032-NEXT: s_add_u32 s48, s48, s9
4858 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
4859 ; GFX1032-NEXT: s_addc_u32 s49, s49, 0
4860 ; GFX1032-NEXT: s_mov_b32 s33, s8
4861 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
4862 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
4863 ; GFX1032-NEXT: s_mov_b64 s[38:39], s[0:1]
4864 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
4865 ; GFX1032-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
4866 ; GFX1032-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
4867 ; GFX1032-NEXT: s_mov_b32 s40, s7
4868 ; GFX1032-NEXT: s_mov_b32 s41, s6
4869 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4870 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
4871 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
4872 ; GFX1032-NEXT: s_mov_b64 s[36:37], s[4:5]
4873 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
4874 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
4875 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[36:37]
4876 ; GFX1032-NEXT: v_or3_b32 v40, v0, v1, v2
4877 ; GFX1032-NEXT: s_mov_b32 s12, s41
4878 ; GFX1032-NEXT: s_mov_b32 s13, s40
4879 ; GFX1032-NEXT: s_mov_b32 s14, s33
4880 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
4881 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
4882 ; GFX1032-NEXT: s_movk_i32 s32, 0x400
4883 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
4884 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
4885 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
4886 ; GFX1032-NEXT: v_mov_b32_e32 v3, 0x7ff80000
4887 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
4888 ; GFX1032-NEXT: .LBB7_1: ; %ComputeLoop
4889 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
4890 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
4891 ; GFX1032-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
4892 ; GFX1032-NEXT: v_readlane_b32 s3, v1, s1
4893 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
4894 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
4895 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
4896 ; GFX1032-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
4897 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
4898 ; GFX1032-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
4899 ; GFX1032-NEXT: s_cbranch_scc1 .LBB7_1
4900 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
4901 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
4902 ; GFX1032-NEXT: s_mov_b32 s44, 0
4903 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
4904 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
4905 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
4906 ; GFX1032-NEXT: s_cbranch_execz .LBB7_5
4907 ; GFX1032-NEXT: ; %bb.3:
4908 ; GFX1032-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
4909 ; GFX1032-NEXT: v_mov_b32_e32 v0, 0
4910 ; GFX1032-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
4911 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
4912 ; GFX1032-NEXT: global_load_dwordx2 v[4:5], v0, s[42:43]
4913 ; GFX1032-NEXT: .LBB7_4: ; %atomicrmw.start
4914 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
4915 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
4916 ; GFX1032-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
4917 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
4918 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
4919 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
4920 ; GFX1032-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
4921 ; GFX1032-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
4922 ; GFX1032-NEXT: buffer_store_dword v5, off, s[48:51], 0 offset:4
4923 ; GFX1032-NEXT: buffer_store_dword v4, off, s[48:51], 0
4924 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
4925 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
4926 ; GFX1032-NEXT: v_mov_b32_e32 v2, s42
4927 ; GFX1032-NEXT: v_mov_b32_e32 v3, s43
4928 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
4929 ; GFX1032-NEXT: v_mov_b32_e32 v5, 8
4930 ; GFX1032-NEXT: v_mov_b32_e32 v6, 0
4931 ; GFX1032-NEXT: v_mov_b32_e32 v7, 0
4932 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
4933 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
4934 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[36:37]
4935 ; GFX1032-NEXT: s_mov_b32 s12, s41
4936 ; GFX1032-NEXT: s_mov_b32 s13, s40
4937 ; GFX1032-NEXT: s_mov_b32 s14, s33
4938 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
4939 ; GFX1032-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
4940 ; GFX1032-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
4941 ; GFX1032-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
4942 ; GFX1032-NEXT: v_mov_b32_e32 v0, 8
4943 ; GFX1032-NEXT: v_mov_b32_e32 v1, 0
4944 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
4945 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
4946 ; GFX1032-NEXT: s_clause 0x1
4947 ; GFX1032-NEXT: buffer_load_dword v4, off, s[48:51], 0
4948 ; GFX1032-NEXT: buffer_load_dword v5, off, s[48:51], 0 offset:4
4949 ; GFX1032-NEXT: v_and_b32_e32 v0, 1, v0
4950 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
4951 ; GFX1032-NEXT: s_or_b32 s44, vcc_lo, s44
4952 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
4953 ; GFX1032-NEXT: s_cbranch_execnz .LBB7_4
4954 ; GFX1032-NEXT: .LBB7_5:
4955 ; GFX1032-NEXT: s_endpgm
4957 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
4959 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
4960 ; GFX1164-NEXT: s_mov_b32 s33, s8
4961 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
4962 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
4963 ; GFX1164-NEXT: s_mov_b64 s[38:39], s[0:1]
4964 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
4965 ; GFX1164-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
4966 ; GFX1164-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
4967 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
4968 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
4969 ; GFX1164-NEXT: s_mov_b64 s[36:37], s[4:5]
4970 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
4971 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[36:37]
4972 ; GFX1164-NEXT: s_mov_b32 s12, s6
4973 ; GFX1164-NEXT: s_mov_b32 s13, s7
4974 ; GFX1164-NEXT: s_mov_b32 s14, s33
4975 ; GFX1164-NEXT: s_mov_b32 s32, 32
4976 ; GFX1164-NEXT: v_mov_b32_e32 v40, v0
4977 ; GFX1164-NEXT: s_mov_b32 s40, s7
4978 ; GFX1164-NEXT: s_mov_b32 s41, s6
4979 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
4980 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
4981 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
4982 ; GFX1164-NEXT: v_mov_b32_e32 v3, 0x7ff80000
4983 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
4984 ; GFX1164-NEXT: .LBB7_1: ; %ComputeLoop
4985 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
4986 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
4987 ; GFX1164-NEXT: s_ctz_i32_b64 s4, s[0:1]
4988 ; GFX1164-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
4989 ; GFX1164-NEXT: v_readlane_b32 s3, v1, s4
4990 ; GFX1164-NEXT: v_readlane_b32 s2, v0, s4
4991 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
4992 ; GFX1164-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
4993 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s4
4994 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
4995 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
4996 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
4997 ; GFX1164-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
4998 ; GFX1164-NEXT: s_cbranch_scc1 .LBB7_1
4999 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
5000 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5001 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
5002 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5003 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
5004 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
5005 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
5006 ; GFX1164-NEXT: s_cbranch_execz .LBB7_5
5007 ; GFX1164-NEXT: ; %bb.3:
5008 ; GFX1164-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
5009 ; GFX1164-NEXT: v_mov_b32_e32 v0, 0
5010 ; GFX1164-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
5011 ; GFX1164-NEXT: s_mov_b64 s[44:45], 0
5012 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
5013 ; GFX1164-NEXT: global_load_b64 v[4:5], v0, s[42:43]
5014 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x1
5015 ; GFX1164-NEXT: .p2align 6
5016 ; GFX1164-NEXT: .LBB7_4: ; %atomicrmw.start
5017 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
5018 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
5019 ; GFX1164-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
5020 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
5021 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
5022 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
5023 ; GFX1164-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5024 ; GFX1164-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5025 ; GFX1164-NEXT: v_mov_b32_e32 v31, v40
5026 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5027 ; GFX1164-NEXT: v_mov_b32_e32 v2, s42
5028 ; GFX1164-NEXT: v_mov_b32_e32 v3, s43
5029 ; GFX1164-NEXT: v_mov_b32_e32 v6, 0
5030 ; GFX1164-NEXT: v_mov_b32_e32 v7, 0
5031 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
5032 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[36:37]
5033 ; GFX1164-NEXT: s_mov_b32 s12, s41
5034 ; GFX1164-NEXT: s_mov_b32 s13, s40
5035 ; GFX1164-NEXT: s_mov_b32 s14, s33
5036 ; GFX1164-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
5037 ; GFX1164-NEXT: s_clause 0x1
5038 ; GFX1164-NEXT: scratch_store_b64 off, v[4:5], off
5039 ; GFX1164-NEXT: scratch_store_b64 off, v[0:1], off offset:8
5040 ; GFX1164-NEXT: v_mov_b32_e32 v0, 8
5041 ; GFX1164-NEXT: v_mov_b32_e32 v1, 0
5042 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
5043 ; GFX1164-NEXT: v_mov_b32_e32 v5, 8
5044 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
5045 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
5046 ; GFX1164-NEXT: scratch_load_b64 v[4:5], off, off
5047 ; GFX1164-NEXT: v_and_b32_e32 v0, 1, v0
5048 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
5049 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
5050 ; GFX1164-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
5051 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[44:45]
5052 ; GFX1164-NEXT: s_cbranch_execnz .LBB7_4
5053 ; GFX1164-NEXT: .LBB7_5:
5054 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x2
5055 ; GFX1164-NEXT: s_endpgm
5057 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5059 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
5060 ; GFX1132-NEXT: s_mov_b64 s[38:39], s[0:1]
5061 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
5062 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
5063 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
5064 ; GFX1132-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5065 ; GFX1132-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5066 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
5067 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5068 ; GFX1132-NEXT: s_mov_b64 s[36:37], s[4:5]
5069 ; GFX1132-NEXT: s_mov_b32 s40, s14
5070 ; GFX1132-NEXT: s_mov_b32 s41, s13
5071 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
5072 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[36:37]
5073 ; GFX1132-NEXT: s_mov_b32 s12, s13
5074 ; GFX1132-NEXT: s_mov_b32 s13, s14
5075 ; GFX1132-NEXT: s_mov_b32 s14, s15
5076 ; GFX1132-NEXT: s_mov_b32 s32, 32
5077 ; GFX1132-NEXT: s_mov_b32 s33, s15
5078 ; GFX1132-NEXT: v_mov_b32_e32 v40, v0
5079 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
5080 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
5081 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
5082 ; GFX1132-NEXT: v_mov_b32_e32 v3, 0x7ff80000
5083 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
5084 ; GFX1132-NEXT: .LBB7_1: ; %ComputeLoop
5085 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
5086 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5087 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
5088 ; GFX1132-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
5089 ; GFX1132-NEXT: v_readlane_b32 s3, v1, s1
5090 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
5091 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
5092 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5093 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
5094 ; GFX1132-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
5095 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
5096 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
5097 ; GFX1132-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
5098 ; GFX1132-NEXT: s_cbranch_scc1 .LBB7_1
5099 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
5100 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5101 ; GFX1132-NEXT: s_mov_b32 s44, 0
5102 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
5103 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
5104 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
5105 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
5106 ; GFX1132-NEXT: s_cbranch_execz .LBB7_5
5107 ; GFX1132-NEXT: ; %bb.3:
5108 ; GFX1132-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
5109 ; GFX1132-NEXT: v_mov_b32_e32 v0, 0
5110 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_4)
5111 ; GFX1132-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
5112 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
5113 ; GFX1132-NEXT: global_load_b64 v[4:5], v0, s[42:43]
5114 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x1
5115 ; GFX1132-NEXT: .p2align 6
5116 ; GFX1132-NEXT: .LBB7_4: ; %atomicrmw.start
5117 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
5118 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
5119 ; GFX1132-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
5120 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
5121 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
5122 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
5123 ; GFX1132-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5124 ; GFX1132-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5125 ; GFX1132-NEXT: v_mov_b32_e32 v31, v40
5126 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5127 ; GFX1132-NEXT: v_mov_b32_e32 v3, s43
5128 ; GFX1132-NEXT: v_mov_b32_e32 v7, 0
5129 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
5130 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[36:37]
5131 ; GFX1132-NEXT: s_mov_b32 s12, s41
5132 ; GFX1132-NEXT: s_mov_b32 s13, s40
5133 ; GFX1132-NEXT: s_mov_b32 s14, s33
5134 ; GFX1132-NEXT: v_mov_b32_e32 v2, s42
5135 ; GFX1132-NEXT: v_mov_b32_e32 v6, 0
5136 ; GFX1132-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
5137 ; GFX1132-NEXT: s_clause 0x1
5138 ; GFX1132-NEXT: scratch_store_b64 off, v[4:5], off
5139 ; GFX1132-NEXT: scratch_store_b64 off, v[0:1], off offset:8
5140 ; GFX1132-NEXT: v_mov_b32_e32 v4, 0
5141 ; GFX1132-NEXT: v_dual_mov_b32 v0, 8 :: v_dual_mov_b32 v1, 0
5142 ; GFX1132-NEXT: v_mov_b32_e32 v5, 8
5143 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
5144 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
5145 ; GFX1132-NEXT: scratch_load_b64 v[4:5], off, off
5146 ; GFX1132-NEXT: v_and_b32_e32 v0, 1, v0
5147 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
5148 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
5149 ; GFX1132-NEXT: s_or_b32 s44, vcc_lo, s44
5150 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
5151 ; GFX1132-NEXT: s_cbranch_execnz .LBB7_4
5152 ; GFX1132-NEXT: .LBB7_5:
5153 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x2
5154 ; GFX1132-NEXT: s_endpgm
5156 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5157 ; GFX7LESS-DPP: ; %bb.0:
5158 ; GFX7LESS-DPP-NEXT: s_movk_i32 s32, 0x800
5159 ; GFX7LESS-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
5160 ; GFX7LESS-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
5161 ; GFX7LESS-DPP-NEXT: s_mov_b32 s50, -1
5162 ; GFX7LESS-DPP-NEXT: s_mov_b32 s51, 0xe8f000
5163 ; GFX7LESS-DPP-NEXT: s_add_u32 s48, s48, s9
5164 ; GFX7LESS-DPP-NEXT: s_addc_u32 s49, s49, 0
5165 ; GFX7LESS-DPP-NEXT: s_mov_b32 s33, s8
5166 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, s7
5167 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, s6
5168 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
5169 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
5170 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5171 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[44:45], s[2:3], 0x9
5172 ; GFX7LESS-DPP-NEXT: s_mov_b32 s47, 0xf000
5173 ; GFX7LESS-DPP-NEXT: s_mov_b32 s46, -1
5174 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
5175 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
5176 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
5177 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5178 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5179 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5180 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
5181 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
5182 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
5183 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v40, v0, v2
5184 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5185 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
5186 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
5187 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
5188 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
5189 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
5190 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5191 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5192 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
5193 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5194 ; GFX7LESS-DPP-NEXT: buffer_load_dwordx2 v[2:3], off, s[44:47], 0
5195 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[42:43], 0
5196 ; GFX7LESS-DPP-NEXT: v_max_f64 v[41:42], v[0:1], v[0:1]
5197 ; GFX7LESS-DPP-NEXT: .LBB7_1: ; %atomicrmw.start
5198 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5199 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
5200 ; GFX7LESS-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
5201 ; GFX7LESS-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:4
5202 ; GFX7LESS-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0
5203 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
5204 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
5205 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
5206 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
5207 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5208 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5209 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
5210 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
5211 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5212 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
5213 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, 8
5214 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, 0
5215 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, 0
5216 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v5, 8
5217 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, 0
5218 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, 0
5219 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5220 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
5221 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
5222 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
5223 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
5224 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
5225 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5226 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5227 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, s44
5228 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, s45
5229 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
5230 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5231 ; GFX7LESS-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5232 ; GFX7LESS-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0
5233 ; GFX7LESS-DPP-NEXT: buffer_load_dword v3, off, s[48:51], 0 offset:4
5234 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
5235 ; GFX7LESS-DPP-NEXT: s_or_b64 s[42:43], vcc, s[42:43]
5236 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[42:43]
5237 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB7_1
5238 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
5239 ; GFX7LESS-DPP-NEXT: s_endpgm
5241 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5242 ; GFX9-DPP: ; %bb.0:
5243 ; GFX9-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
5244 ; GFX9-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
5245 ; GFX9-DPP-NEXT: s_mov_b32 s50, -1
5246 ; GFX9-DPP-NEXT: s_mov_b32 s51, 0xe00000
5247 ; GFX9-DPP-NEXT: s_add_u32 s48, s48, s9
5248 ; GFX9-DPP-NEXT: s_addc_u32 s49, s49, 0
5249 ; GFX9-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
5250 ; GFX9-DPP-NEXT: s_mov_b32 s33, s8
5251 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
5252 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
5253 ; GFX9-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5254 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
5255 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5256 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5257 ; GFX9-DPP-NEXT: s_mov_b32 s40, s7
5258 ; GFX9-DPP-NEXT: s_mov_b32 s41, s6
5259 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5260 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
5261 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
5262 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
5263 ; GFX9-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
5264 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5265 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5266 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
5267 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
5268 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
5269 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
5270 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
5271 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5272 ; GFX9-DPP-NEXT: s_movk_i32 s32, 0x800
5273 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
5274 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5275 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5276 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, 0
5277 ; GFX9-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
5278 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
5279 ; GFX9-DPP-NEXT: v_mov_b32_e32 v10, v0
5280 ; GFX9-DPP-NEXT: v_mov_b32_e32 v11, v1
5281 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
5282 ; GFX9-DPP-NEXT: v_mov_b32_e32 v10, v8
5283 ; GFX9-DPP-NEXT: v_mov_b32_e32 v11, v9
5284 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
5285 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5286 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
5287 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
5288 ; GFX9-DPP-NEXT: s_nop 0
5289 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:1 row_mask:0xf bank_mask:0xf
5290 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:1 row_mask:0xf bank_mask:0xf
5291 ; GFX9-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5292 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5293 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5294 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
5295 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
5296 ; GFX9-DPP-NEXT: s_nop 0
5297 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:2 row_mask:0xf bank_mask:0xf
5298 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:2 row_mask:0xf bank_mask:0xf
5299 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5300 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5301 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
5302 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
5303 ; GFX9-DPP-NEXT: s_nop 0
5304 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:4 row_mask:0xf bank_mask:0xf
5305 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:4 row_mask:0xf bank_mask:0xf
5306 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5307 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5308 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
5309 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
5310 ; GFX9-DPP-NEXT: s_nop 0
5311 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:8 row_mask:0xf bank_mask:0xf
5312 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:8 row_mask:0xf bank_mask:0xf
5313 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5314 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5315 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
5316 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
5317 ; GFX9-DPP-NEXT: s_nop 0
5318 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_bcast:15 row_mask:0xa bank_mask:0xf
5319 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_bcast:15 row_mask:0xa bank_mask:0xf
5320 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5321 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5322 ; GFX9-DPP-NEXT: s_nop 1
5323 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v10 row_bcast:31 row_mask:0xc bank_mask:0xf
5324 ; GFX9-DPP-NEXT: v_mov_b32_dpp v9, v11 row_bcast:31 row_mask:0xc bank_mask:0xf
5325 ; GFX9-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
5326 ; GFX9-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5327 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
5328 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5329 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
5330 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5331 ; GFX9-DPP-NEXT: v_readlane_b32 s43, v9, 63
5332 ; GFX9-DPP-NEXT: v_readlane_b32 s42, v8, 63
5333 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
5334 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
5335 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
5336 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB7_3
5337 ; GFX9-DPP-NEXT: ; %bb.1:
5338 ; GFX9-DPP-NEXT: s_load_dwordx2 s[44:45], s[36:37], 0x24
5339 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 0
5340 ; GFX9-DPP-NEXT: s_mov_b64 s[46:47], 0
5341 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
5342 ; GFX9-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[44:45]
5343 ; GFX9-DPP-NEXT: .LBB7_2: ; %atomicrmw.start
5344 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5345 ; GFX9-DPP-NEXT: v_max_f64 v[3:4], s[42:43], s[42:43]
5346 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
5347 ; GFX9-DPP-NEXT: v_max_f64 v[5:6], v[1:2], v[1:2]
5348 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
5349 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
5350 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
5351 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5352 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5353 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5354 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5355 ; GFX9-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
5356 ; GFX9-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
5357 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5358 ; GFX9-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
5359 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
5360 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
5361 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
5362 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
5363 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
5364 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5365 ; GFX9-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
5366 ; GFX9-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
5367 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 8
5368 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, 0
5369 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s44
5370 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, s45
5371 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0
5372 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 8
5373 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, 0
5374 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, 0
5375 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
5376 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5377 ; GFX9-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
5378 ; GFX9-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
5379 ; GFX9-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5380 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
5381 ; GFX9-DPP-NEXT: s_or_b64 s[46:47], vcc, s[46:47]
5382 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[46:47]
5383 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB7_2
5384 ; GFX9-DPP-NEXT: .LBB7_3:
5385 ; GFX9-DPP-NEXT: s_endpgm
5387 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5388 ; GFX1064-DPP: ; %bb.0:
5389 ; GFX1064-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
5390 ; GFX1064-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
5391 ; GFX1064-DPP-NEXT: s_mov_b32 s50, -1
5392 ; GFX1064-DPP-NEXT: s_mov_b32 s51, 0x31e16000
5393 ; GFX1064-DPP-NEXT: s_add_u32 s48, s48, s9
5394 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
5395 ; GFX1064-DPP-NEXT: s_addc_u32 s49, s49, 0
5396 ; GFX1064-DPP-NEXT: s_mov_b32 s33, s8
5397 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
5398 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
5399 ; GFX1064-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5400 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
5401 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5402 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5403 ; GFX1064-DPP-NEXT: s_mov_b32 s40, s7
5404 ; GFX1064-DPP-NEXT: s_mov_b32 s41, s6
5405 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5406 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
5407 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
5408 ; GFX1064-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
5409 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5410 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5411 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5412 ; GFX1064-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
5413 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
5414 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
5415 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
5416 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5417 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
5418 ; GFX1064-DPP-NEXT: s_movk_i32 s32, 0x800
5419 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
5420 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5421 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5422 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v8, 0
5423 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
5424 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
5425 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v0
5426 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v1
5427 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
5428 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v8
5429 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v9
5430 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
5431 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5432 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
5433 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
5434 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
5435 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
5436 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5437 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5438 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5439 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
5440 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
5441 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
5442 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
5443 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5444 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5445 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
5446 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
5447 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
5448 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
5449 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5450 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5451 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
5452 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
5453 ; GFX1064-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
5454 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5455 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v9
5456 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v8
5457 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
5458 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
5459 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5460 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
5461 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v9, 0
5462 ; GFX1064-DPP-NEXT: v_readlane_b32 s5, v9, 32
5463 ; GFX1064-DPP-NEXT: v_readlane_b32 s4, v8, 32
5464 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v8, 0
5465 ; GFX1064-DPP-NEXT: v_max_f64 v[8:9], s[4:5], s[4:5]
5466 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], s[2:3], s[2:3]
5467 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5468 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
5469 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5470 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v41, v8
5471 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v42, v9
5472 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
5473 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
5474 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
5475 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB7_3
5476 ; GFX1064-DPP-NEXT: ; %bb.1:
5477 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
5478 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 0
5479 ; GFX1064-DPP-NEXT: s_mov_b64 s[44:45], 0
5480 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
5481 ; GFX1064-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
5482 ; GFX1064-DPP-NEXT: .LBB7_2: ; %atomicrmw.start
5483 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5484 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], v[41:42], v[41:42]
5485 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
5486 ; GFX1064-DPP-NEXT: v_max_f64 v[5:6], v[1:2], v[1:2]
5487 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
5488 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
5489 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
5490 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5491 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5492 ; GFX1064-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
5493 ; GFX1064-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
5494 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5495 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
5496 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 8
5497 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 0
5498 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s42
5499 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, 0
5500 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5501 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5502 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5503 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
5504 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
5505 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
5506 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5507 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
5508 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 8
5509 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, 0
5510 ; GFX1064-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
5511 ; GFX1064-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
5512 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, s43
5513 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0
5514 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
5515 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5516 ; GFX1064-DPP-NEXT: s_clause 0x1
5517 ; GFX1064-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
5518 ; GFX1064-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
5519 ; GFX1064-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5520 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
5521 ; GFX1064-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
5522 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
5523 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB7_2
5524 ; GFX1064-DPP-NEXT: .LBB7_3:
5525 ; GFX1064-DPP-NEXT: s_endpgm
5527 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5528 ; GFX1032-DPP: ; %bb.0:
5529 ; GFX1032-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
5530 ; GFX1032-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
5531 ; GFX1032-DPP-NEXT: s_mov_b32 s50, -1
5532 ; GFX1032-DPP-NEXT: s_mov_b32 s51, 0x31c16000
5533 ; GFX1032-DPP-NEXT: s_add_u32 s48, s48, s9
5534 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
5535 ; GFX1032-DPP-NEXT: s_addc_u32 s49, s49, 0
5536 ; GFX1032-DPP-NEXT: s_mov_b32 s33, s8
5537 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
5538 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
5539 ; GFX1032-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5540 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
5541 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5542 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5543 ; GFX1032-DPP-NEXT: s_mov_b32 s40, s7
5544 ; GFX1032-DPP-NEXT: s_mov_b32 s41, s6
5545 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5546 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
5547 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
5548 ; GFX1032-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
5549 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5550 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5551 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5552 ; GFX1032-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
5553 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
5554 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
5555 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
5556 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5557 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
5558 ; GFX1032-DPP-NEXT: s_movk_i32 s32, 0x400
5559 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
5560 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5561 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
5562 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v8, 0
5563 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
5564 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
5565 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v0
5566 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v1
5567 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
5568 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v8
5569 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v9
5570 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
5571 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
5572 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
5573 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
5574 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
5575 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
5576 ; GFX1032-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5577 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5578 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5579 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
5580 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
5581 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
5582 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
5583 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5584 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5585 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
5586 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
5587 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
5588 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
5589 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5590 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5591 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
5592 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
5593 ; GFX1032-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
5594 ; GFX1032-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5595 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v9
5596 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v8
5597 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
5598 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
5599 ; GFX1032-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5600 ; GFX1032-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
5601 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
5602 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5603 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, v8
5604 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v9
5605 ; GFX1032-DPP-NEXT: s_mov_b32 s44, 0
5606 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
5607 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
5608 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB7_3
5609 ; GFX1032-DPP-NEXT: ; %bb.1:
5610 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
5611 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 0
5612 ; GFX1032-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
5613 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
5614 ; GFX1032-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
5615 ; GFX1032-DPP-NEXT: .LBB7_2: ; %atomicrmw.start
5616 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5617 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
5618 ; GFX1032-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
5619 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
5620 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
5621 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
5622 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5623 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5624 ; GFX1032-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
5625 ; GFX1032-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
5626 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5627 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
5628 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 8
5629 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 0
5630 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s42
5631 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 8
5632 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, 0
5633 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, 0
5634 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
5635 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5636 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5637 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
5638 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
5639 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
5640 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
5641 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
5642 ; GFX1032-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
5643 ; GFX1032-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
5644 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, s43
5645 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0
5646 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
5647 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
5648 ; GFX1032-DPP-NEXT: s_clause 0x1
5649 ; GFX1032-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
5650 ; GFX1032-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
5651 ; GFX1032-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5652 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
5653 ; GFX1032-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
5654 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
5655 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB7_2
5656 ; GFX1032-DPP-NEXT: .LBB7_3:
5657 ; GFX1032-DPP-NEXT: s_endpgm
5659 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5660 ; GFX1164-DPP: ; %bb.0:
5661 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
5662 ; GFX1164-DPP-NEXT: s_mov_b32 s33, s8
5663 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
5664 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
5665 ; GFX1164-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5666 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
5667 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5668 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5669 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
5670 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5671 ; GFX1164-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
5672 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5673 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5674 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
5675 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
5676 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
5677 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 32
5678 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v40, v0
5679 ; GFX1164-DPP-NEXT: s_mov_b32 s40, s7
5680 ; GFX1164-DPP-NEXT: s_mov_b32 s41, s6
5681 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
5682 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
5683 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5684 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v8, 0
5685 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
5686 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
5687 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v0
5688 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v1
5689 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
5690 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v8
5691 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v9
5692 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
5693 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
5694 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
5695 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
5696 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
5697 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
5698 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
5699 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5700 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
5701 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5702 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5703 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
5704 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
5705 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
5706 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
5707 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
5708 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5709 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5710 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5711 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
5712 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
5713 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
5714 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
5715 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
5716 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5717 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5718 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5719 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5720 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
5721 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
5722 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5723 ; GFX1164-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
5724 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5725 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5726 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v9
5727 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v8
5728 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
5729 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
5730 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
5731 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5732 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5733 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
5734 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5735 ; GFX1164-DPP-NEXT: v_permlane64_b32 v11, v9
5736 ; GFX1164-DPP-NEXT: v_permlane64_b32 v10, v8
5737 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5738 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5739 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
5740 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
5741 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5742 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5743 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, v8
5744 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
5745 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v9
5746 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
5747 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
5748 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
5749 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
5750 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB7_3
5751 ; GFX1164-DPP-NEXT: ; %bb.1:
5752 ; GFX1164-DPP-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
5753 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 0
5754 ; GFX1164-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
5755 ; GFX1164-DPP-NEXT: s_mov_b64 s[44:45], 0
5756 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
5757 ; GFX1164-DPP-NEXT: global_load_b64 v[1:2], v0, s[42:43]
5758 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x1
5759 ; GFX1164-DPP-NEXT: .p2align 6
5760 ; GFX1164-DPP-NEXT: .LBB7_2: ; %atomicrmw.start
5761 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5762 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
5763 ; GFX1164-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
5764 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
5765 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
5766 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
5767 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5768 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5769 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v40
5770 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5771 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 8
5772 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, 8
5773 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, 0
5774 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, 0
5775 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5776 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5777 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s41
5778 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s40
5779 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
5780 ; GFX1164-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
5781 ; GFX1164-DPP-NEXT: s_clause 0x1
5782 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[1:2], off
5783 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
5784 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0
5785 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s42
5786 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, s43
5787 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
5788 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
5789 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
5790 ; GFX1164-DPP-NEXT: scratch_load_b64 v[1:2], off, off
5791 ; GFX1164-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5792 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
5793 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
5794 ; GFX1164-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
5795 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[44:45]
5796 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB7_2
5797 ; GFX1164-DPP-NEXT: .LBB7_3:
5798 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x2
5799 ; GFX1164-DPP-NEXT: s_endpgm
5801 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_agent_scope_unsafe:
5802 ; GFX1132-DPP: ; %bb.0:
5803 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
5804 ; GFX1132-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
5805 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
5806 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
5807 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
5808 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
5809 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
5810 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
5811 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5812 ; GFX1132-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
5813 ; GFX1132-DPP-NEXT: s_mov_b32 s40, s14
5814 ; GFX1132-DPP-NEXT: s_mov_b32 s41, s13
5815 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5816 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5817 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
5818 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
5819 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
5820 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 32
5821 ; GFX1132-DPP-NEXT: s_mov_b32 s33, s15
5822 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v40, v0
5823 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
5824 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
5825 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
5826 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v8, 0
5827 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
5828 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
5829 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v10, v0
5830 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v11, v1
5831 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
5832 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v10, v8
5833 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v11, v9
5834 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
5835 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
5836 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
5837 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5838 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
5839 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
5840 ; GFX1132-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5841 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
5842 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5843 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5844 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
5845 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5846 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
5847 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
5848 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5849 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5850 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5851 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
5852 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5853 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
5854 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
5855 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5856 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
5857 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
5858 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
5859 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
5860 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
5861 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5862 ; GFX1132-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
5863 ; GFX1132-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
5864 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
5865 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
5866 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
5867 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
5868 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
5869 ; GFX1132-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
5870 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
5871 ; GFX1132-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
5872 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
5873 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v3, v8
5874 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5875 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_2)
5876 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v9
5877 ; GFX1132-DPP-NEXT: s_mov_b32 s44, 0
5878 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
5879 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
5880 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB7_3
5881 ; GFX1132-DPP-NEXT: ; %bb.1:
5882 ; GFX1132-DPP-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
5883 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, 0
5884 ; GFX1132-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
5885 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
5886 ; GFX1132-DPP-NEXT: global_load_b64 v[1:2], v0, s[42:43]
5887 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x1
5888 ; GFX1132-DPP-NEXT: .p2align 6
5889 ; GFX1132-DPP-NEXT: .LBB7_2: ; %atomicrmw.start
5890 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
5891 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
5892 ; GFX1132-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
5893 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
5894 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
5895 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
5896 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
5897 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
5898 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
5899 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
5900 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
5901 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v7, 0
5902 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
5903 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
5904 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s41
5905 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s40
5906 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s33
5907 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_4)
5908 ; GFX1132-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
5909 ; GFX1132-DPP-NEXT: s_clause 0x1
5910 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[1:2], off
5911 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
5912 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
5913 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
5914 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
5915 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
5916 ; GFX1132-DPP-NEXT: scratch_load_b64 v[1:2], off, off
5917 ; GFX1132-DPP-NEXT: v_and_b32_e32 v0, 1, v0
5918 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
5919 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
5920 ; GFX1132-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
5921 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
5922 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB7_2
5923 ; GFX1132-DPP-NEXT: .LBB7_3:
5924 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x2
5925 ; GFX1132-DPP-NEXT: s_endpgm
5926 %divValue = call double @div.double.value()
5927 %result = atomicrmw fmin ptr addrspace(1) %ptr, double %divValue syncscope("agent") monotonic, align 4
5931 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe(ptr addrspace(1) %ptr) #0 {
5932 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
5933 ; GFX7LESS: ; %bb.0:
5934 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
5935 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
5936 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
5937 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
5938 ; GFX7LESS-NEXT: s_cbranch_execz .LBB8_3
5939 ; GFX7LESS-NEXT: ; %bb.1:
5940 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
5941 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
5942 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
5943 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
5944 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
5945 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
5946 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, s6
5947 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, s7
5948 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
5949 ; GFX7LESS-NEXT: .LBB8_2: ; %atomicrmw.start
5950 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
5951 ; GFX7LESS-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
5952 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
5953 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
5954 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, v3
5955 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, v2
5956 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, v1
5957 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, v0
5958 ; GFX7LESS-NEXT: buffer_atomic_cmpswap_x2 v[4:7], off, s[0:3], 0 glc
5959 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
5960 ; GFX7LESS-NEXT: v_cmp_eq_u64_e32 vcc, v[4:5], v[2:3]
5961 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
5962 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v4
5963 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v5
5964 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
5965 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB8_2
5966 ; GFX7LESS-NEXT: .LBB8_3:
5967 ; GFX7LESS-NEXT: s_endpgm
5969 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
5971 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
5972 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
5973 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
5974 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
5975 ; GFX9-NEXT: s_cbranch_execz .LBB8_3
5976 ; GFX9-NEXT: ; %bb.1:
5977 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
5978 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
5979 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
5980 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
5981 ; GFX9-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
5982 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
5983 ; GFX9-NEXT: v_mov_b32_e32 v2, s4
5984 ; GFX9-NEXT: v_mov_b32_e32 v3, s5
5985 ; GFX9-NEXT: .LBB8_2: ; %atomicrmw.start
5986 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
5987 ; GFX9-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
5988 ; GFX9-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
5989 ; GFX9-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
5990 ; GFX9-NEXT: s_waitcnt vmcnt(0)
5991 ; GFX9-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
5992 ; GFX9-NEXT: v_mov_b32_e32 v3, v1
5993 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
5994 ; GFX9-NEXT: v_mov_b32_e32 v2, v0
5995 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
5996 ; GFX9-NEXT: s_cbranch_execnz .LBB8_2
5997 ; GFX9-NEXT: .LBB8_3:
5998 ; GFX9-NEXT: s_endpgm
6000 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6002 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6003 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6004 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6005 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
6006 ; GFX1064-NEXT: s_cbranch_execz .LBB8_3
6007 ; GFX1064-NEXT: ; %bb.1:
6008 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
6009 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
6010 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
6011 ; GFX1064-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x0
6012 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
6013 ; GFX1064-NEXT: v_mov_b32_e32 v2, s2
6014 ; GFX1064-NEXT: v_mov_b32_e32 v3, s3
6015 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
6016 ; GFX1064-NEXT: .LBB8_2: ; %atomicrmw.start
6017 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
6018 ; GFX1064-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6019 ; GFX1064-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6020 ; GFX1064-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
6021 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
6022 ; GFX1064-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6023 ; GFX1064-NEXT: v_mov_b32_e32 v3, v1
6024 ; GFX1064-NEXT: v_mov_b32_e32 v2, v0
6025 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6026 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
6027 ; GFX1064-NEXT: s_cbranch_execnz .LBB8_2
6028 ; GFX1064-NEXT: .LBB8_3:
6029 ; GFX1064-NEXT: s_endpgm
6031 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6033 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6034 ; GFX1032-NEXT: s_mov_b32 s4, 0
6035 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
6036 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
6037 ; GFX1032-NEXT: s_cbranch_execz .LBB8_3
6038 ; GFX1032-NEXT: ; %bb.1:
6039 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
6040 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
6041 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
6042 ; GFX1032-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x0
6043 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
6044 ; GFX1032-NEXT: v_mov_b32_e32 v2, s2
6045 ; GFX1032-NEXT: v_mov_b32_e32 v3, s3
6046 ; GFX1032-NEXT: .LBB8_2: ; %atomicrmw.start
6047 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
6048 ; GFX1032-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6049 ; GFX1032-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6050 ; GFX1032-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
6051 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
6052 ; GFX1032-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6053 ; GFX1032-NEXT: v_mov_b32_e32 v3, v1
6054 ; GFX1032-NEXT: v_mov_b32_e32 v2, v0
6055 ; GFX1032-NEXT: s_or_b32 s4, vcc_lo, s4
6056 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
6057 ; GFX1032-NEXT: s_cbranch_execnz .LBB8_2
6058 ; GFX1032-NEXT: .LBB8_3:
6059 ; GFX1032-NEXT: s_endpgm
6061 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6063 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6064 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
6065 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6066 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6067 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
6068 ; GFX1164-NEXT: s_cbranch_execz .LBB8_3
6069 ; GFX1164-NEXT: ; %bb.1:
6070 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
6071 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
6072 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
6073 ; GFX1164-NEXT: s_load_b64 s[2:3], s[0:1], 0x0
6074 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
6075 ; GFX1164-NEXT: v_mov_b32_e32 v2, s2
6076 ; GFX1164-NEXT: v_mov_b32_e32 v3, s3
6077 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
6078 ; GFX1164-NEXT: .LBB8_2: ; %atomicrmw.start
6079 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
6080 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6081 ; GFX1164-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6082 ; GFX1164-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6083 ; GFX1164-NEXT: global_atomic_cmpswap_b64 v[0:1], v4, v[0:3], s[0:1] glc
6084 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
6085 ; GFX1164-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6086 ; GFX1164-NEXT: v_mov_b32_e32 v3, v1
6087 ; GFX1164-NEXT: v_mov_b32_e32 v2, v0
6088 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6089 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6090 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
6091 ; GFX1164-NEXT: s_cbranch_execnz .LBB8_2
6092 ; GFX1164-NEXT: .LBB8_3:
6093 ; GFX1164-NEXT: s_endpgm
6095 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6097 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6098 ; GFX1132-NEXT: s_mov_b32 s4, 0
6099 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
6100 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
6101 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
6102 ; GFX1132-NEXT: s_cbranch_execz .LBB8_3
6103 ; GFX1132-NEXT: ; %bb.1:
6104 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
6105 ; GFX1132-NEXT: v_mov_b32_e32 v4, 0
6106 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
6107 ; GFX1132-NEXT: s_load_b64 s[2:3], s[0:1], 0x0
6108 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
6109 ; GFX1132-NEXT: v_dual_mov_b32 v2, s2 :: v_dual_mov_b32 v3, s3
6110 ; GFX1132-NEXT: .LBB8_2: ; %atomicrmw.start
6111 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
6112 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6113 ; GFX1132-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6114 ; GFX1132-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6115 ; GFX1132-NEXT: global_atomic_cmpswap_b64 v[0:1], v4, v[0:3], s[0:1] glc
6116 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
6117 ; GFX1132-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6118 ; GFX1132-NEXT: v_dual_mov_b32 v3, v1 :: v_dual_mov_b32 v2, v0
6119 ; GFX1132-NEXT: s_or_b32 s4, vcc_lo, s4
6120 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6121 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
6122 ; GFX1132-NEXT: s_cbranch_execnz .LBB8_2
6123 ; GFX1132-NEXT: .LBB8_3:
6124 ; GFX1132-NEXT: s_endpgm
6126 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6127 ; GFX7LESS-DPP: ; %bb.0:
6128 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
6129 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
6130 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6131 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
6132 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB8_3
6133 ; GFX7LESS-DPP-NEXT: ; %bb.1:
6134 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
6135 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
6136 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
6137 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
6138 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
6139 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
6140 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, s6
6141 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, s7
6142 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
6143 ; GFX7LESS-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6144 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6145 ; GFX7LESS-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6146 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6147 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
6148 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, v3
6149 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, v2
6150 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v5, v1
6151 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, v0
6152 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap_x2 v[4:7], off, s[0:3], 0 glc
6153 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
6154 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[4:5], v[2:3]
6155 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
6156 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v4
6157 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v5
6158 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
6159 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB8_2
6160 ; GFX7LESS-DPP-NEXT: .LBB8_3:
6161 ; GFX7LESS-DPP-NEXT: s_endpgm
6163 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6164 ; GFX9-DPP: ; %bb.0:
6165 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6166 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6167 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6168 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
6169 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB8_3
6170 ; GFX9-DPP-NEXT: ; %bb.1:
6171 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
6172 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
6173 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0
6174 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
6175 ; GFX9-DPP-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
6176 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
6177 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s4
6178 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, s5
6179 ; GFX9-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6180 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6181 ; GFX9-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6182 ; GFX9-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6183 ; GFX9-DPP-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
6184 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
6185 ; GFX9-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6186 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, v1
6187 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6188 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, v0
6189 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
6190 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB8_2
6191 ; GFX9-DPP-NEXT: .LBB8_3:
6192 ; GFX9-DPP-NEXT: s_endpgm
6194 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6195 ; GFX1064-DPP: ; %bb.0:
6196 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6197 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6198 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6199 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
6200 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB8_3
6201 ; GFX1064-DPP-NEXT: ; %bb.1:
6202 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
6203 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0
6204 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
6205 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x0
6206 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
6207 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s2
6208 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, s3
6209 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
6210 ; GFX1064-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6211 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6212 ; GFX1064-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6213 ; GFX1064-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6214 ; GFX1064-DPP-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
6215 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
6216 ; GFX1064-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6217 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, v1
6218 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, v0
6219 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6220 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
6221 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB8_2
6222 ; GFX1064-DPP-NEXT: .LBB8_3:
6223 ; GFX1064-DPP-NEXT: s_endpgm
6225 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6226 ; GFX1032-DPP: ; %bb.0:
6227 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6228 ; GFX1032-DPP-NEXT: s_mov_b32 s4, 0
6229 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
6230 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
6231 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB8_3
6232 ; GFX1032-DPP-NEXT: ; %bb.1:
6233 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
6234 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0
6235 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
6236 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x0
6237 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
6238 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s2
6239 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, s3
6240 ; GFX1032-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6241 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6242 ; GFX1032-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6243 ; GFX1032-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6244 ; GFX1032-DPP-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc
6245 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
6246 ; GFX1032-DPP-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6247 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, v1
6248 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, v0
6249 ; GFX1032-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
6250 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
6251 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB8_2
6252 ; GFX1032-DPP-NEXT: .LBB8_3:
6253 ; GFX1032-DPP-NEXT: s_endpgm
6255 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6256 ; GFX1164-DPP: ; %bb.0:
6257 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6258 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
6259 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6260 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6261 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
6262 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB8_3
6263 ; GFX1164-DPP-NEXT: ; %bb.1:
6264 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
6265 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
6266 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
6267 ; GFX1164-DPP-NEXT: s_load_b64 s[2:3], s[0:1], 0x0
6268 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
6269 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s2
6270 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, s3
6271 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
6272 ; GFX1164-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6273 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6274 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6275 ; GFX1164-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6276 ; GFX1164-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6277 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b64 v[0:1], v4, v[0:3], s[0:1] glc
6278 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
6279 ; GFX1164-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6280 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, v1
6281 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, v0
6282 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6283 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6284 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
6285 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB8_2
6286 ; GFX1164-DPP-NEXT: .LBB8_3:
6287 ; GFX1164-DPP-NEXT: s_endpgm
6289 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_one_as_scope_unsafe:
6290 ; GFX1132-DPP: ; %bb.0:
6291 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6292 ; GFX1132-DPP-NEXT: s_mov_b32 s4, 0
6293 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
6294 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
6295 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
6296 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB8_3
6297 ; GFX1132-DPP-NEXT: ; %bb.1:
6298 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
6299 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, 0
6300 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
6301 ; GFX1132-DPP-NEXT: s_load_b64 s[2:3], s[0:1], 0x0
6302 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
6303 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v2, s2 :: v_dual_mov_b32 v3, s3
6304 ; GFX1132-DPP-NEXT: .LBB8_2: ; %atomicrmw.start
6305 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6306 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6307 ; GFX1132-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6308 ; GFX1132-DPP-NEXT: v_min_f64 v[0:1], v[0:1], 4.0
6309 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b64 v[0:1], v4, v[0:3], s[0:1] glc
6310 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
6311 ; GFX1132-DPP-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6312 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v3, v1 :: v_dual_mov_b32 v2, v0
6313 ; GFX1132-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
6314 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6315 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
6316 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB8_2
6317 ; GFX1132-DPP-NEXT: .LBB8_3:
6318 ; GFX1132-DPP-NEXT: s_endpgm
6319 %result = atomicrmw fmin ptr addrspace(1) %ptr, double 4.0 syncscope("one-as") monotonic
6323 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe(ptr addrspace(1) %ptr) #0 {
6324 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6325 ; GFX7LESS: ; %bb.0:
6326 ; GFX7LESS-NEXT: s_mov_b32 s32, 0
6327 ; GFX7LESS-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6328 ; GFX7LESS-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6329 ; GFX7LESS-NEXT: s_mov_b32 s38, -1
6330 ; GFX7LESS-NEXT: s_mov_b32 s39, 0xe8f000
6331 ; GFX7LESS-NEXT: s_add_u32 s36, s36, s9
6332 ; GFX7LESS-NEXT: s_addc_u32 s37, s37, 0
6333 ; GFX7LESS-NEXT: s_mov_b32 s14, s8
6334 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[4:5]
6335 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[2:3]
6336 ; GFX7LESS-NEXT: s_add_u32 s8, s34, 44
6337 ; GFX7LESS-NEXT: s_addc_u32 s9, s35, 0
6338 ; GFX7LESS-NEXT: s_getpc_b64 s[2:3]
6339 ; GFX7LESS-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6340 ; GFX7LESS-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6341 ; GFX7LESS-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6342 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6343 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6344 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
6345 ; GFX7LESS-NEXT: v_or_b32_e32 v31, v0, v2
6346 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[0:1]
6347 ; GFX7LESS-NEXT: s_mov_b32 s12, s6
6348 ; GFX7LESS-NEXT: s_mov_b32 s13, s7
6349 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[36:37]
6350 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[38:39]
6351 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
6352 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[16:17]
6353 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
6354 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, 0
6355 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6356 ; GFX7LESS-NEXT: .LBB9_1: ; %ComputeLoop
6357 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
6358 ; GFX7LESS-NEXT: s_ff1_i32_b64 s4, s[0:1]
6359 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6360 ; GFX7LESS-NEXT: v_readlane_b32 s3, v1, s4
6361 ; GFX7LESS-NEXT: v_readlane_b32 s2, v0, s4
6362 ; GFX7LESS-NEXT: s_lshl_b64 s[4:5], 1, s4
6363 ; GFX7LESS-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6364 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[4:5]
6365 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
6366 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
6367 ; GFX7LESS-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6368 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB9_1
6369 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
6370 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
6371 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
6372 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6373 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
6374 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
6375 ; GFX7LESS-NEXT: s_cbranch_execz .LBB9_5
6376 ; GFX7LESS-NEXT: ; %bb.3:
6377 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x9
6378 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
6379 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
6380 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
6381 ; GFX7LESS-NEXT: buffer_load_dwordx2 v[2:3], off, s[0:3], 0
6382 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
6383 ; GFX7LESS-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6384 ; GFX7LESS-NEXT: .LBB9_4: ; %atomicrmw.start
6385 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
6386 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
6387 ; GFX7LESS-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6388 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6389 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
6390 ; GFX7LESS-NEXT: v_mov_b32_e32 v9, v3
6391 ; GFX7LESS-NEXT: v_mov_b32_e32 v8, v2
6392 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, v1
6393 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, v0
6394 ; GFX7LESS-NEXT: buffer_atomic_cmpswap_x2 v[6:9], off, s[0:3], 0 glc
6395 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
6396 ; GFX7LESS-NEXT: v_cmp_eq_u64_e32 vcc, v[6:7], v[2:3]
6397 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
6398 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v6
6399 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v7
6400 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
6401 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB9_4
6402 ; GFX7LESS-NEXT: .LBB9_5:
6403 ; GFX7LESS-NEXT: s_endpgm
6405 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6407 ; GFX9-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6408 ; GFX9-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6409 ; GFX9-NEXT: s_mov_b32 s38, -1
6410 ; GFX9-NEXT: s_mov_b32 s39, 0xe00000
6411 ; GFX9-NEXT: s_add_u32 s36, s36, s9
6412 ; GFX9-NEXT: s_addc_u32 s37, s37, 0
6413 ; GFX9-NEXT: s_mov_b64 s[34:35], s[2:3]
6414 ; GFX9-NEXT: s_mov_b32 s14, s8
6415 ; GFX9-NEXT: s_add_u32 s8, s34, 44
6416 ; GFX9-NEXT: s_addc_u32 s9, s35, 0
6417 ; GFX9-NEXT: s_getpc_b64 s[2:3]
6418 ; GFX9-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6419 ; GFX9-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6420 ; GFX9-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6421 ; GFX9-NEXT: s_mov_b64 s[10:11], s[4:5]
6422 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6423 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6424 ; GFX9-NEXT: s_mov_b64 s[4:5], s[0:1]
6425 ; GFX9-NEXT: s_mov_b64 s[0:1], s[36:37]
6426 ; GFX9-NEXT: v_or3_b32 v31, v0, v1, v2
6427 ; GFX9-NEXT: s_mov_b32 s12, s6
6428 ; GFX9-NEXT: s_mov_b32 s13, s7
6429 ; GFX9-NEXT: s_mov_b64 s[2:3], s[38:39]
6430 ; GFX9-NEXT: s_mov_b32 s32, 0
6431 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
6432 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[16:17]
6433 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
6434 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
6435 ; GFX9-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6436 ; GFX9-NEXT: .LBB9_1: ; %ComputeLoop
6437 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
6438 ; GFX9-NEXT: s_ff1_i32_b64 s4, s[0:1]
6439 ; GFX9-NEXT: v_readlane_b32 s3, v1, s4
6440 ; GFX9-NEXT: v_readlane_b32 s2, v0, s4
6441 ; GFX9-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6442 ; GFX9-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6443 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s4
6444 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
6445 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
6446 ; GFX9-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6447 ; GFX9-NEXT: s_cbranch_scc1 .LBB9_1
6448 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
6449 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6450 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6451 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6452 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
6453 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
6454 ; GFX9-NEXT: s_cbranch_execz .LBB9_5
6455 ; GFX9-NEXT: ; %bb.3:
6456 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
6457 ; GFX9-NEXT: v_mov_b32_e32 v6, 0
6458 ; GFX9-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6459 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
6460 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
6461 ; GFX9-NEXT: global_load_dwordx2 v[2:3], v6, s[0:1]
6462 ; GFX9-NEXT: .LBB9_4: ; %atomicrmw.start
6463 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
6464 ; GFX9-NEXT: s_waitcnt vmcnt(0)
6465 ; GFX9-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6466 ; GFX9-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6467 ; GFX9-NEXT: global_atomic_cmpswap_x2 v[0:1], v6, v[0:3], s[0:1] glc
6468 ; GFX9-NEXT: s_waitcnt vmcnt(0)
6469 ; GFX9-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6470 ; GFX9-NEXT: v_mov_b32_e32 v3, v1
6471 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6472 ; GFX9-NEXT: v_mov_b32_e32 v2, v0
6473 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
6474 ; GFX9-NEXT: s_cbranch_execnz .LBB9_4
6475 ; GFX9-NEXT: .LBB9_5:
6476 ; GFX9-NEXT: s_endpgm
6478 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6480 ; GFX1064-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6481 ; GFX1064-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6482 ; GFX1064-NEXT: s_mov_b32 s38, -1
6483 ; GFX1064-NEXT: s_mov_b32 s39, 0x31e16000
6484 ; GFX1064-NEXT: s_add_u32 s36, s36, s9
6485 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
6486 ; GFX1064-NEXT: s_addc_u32 s37, s37, 0
6487 ; GFX1064-NEXT: s_mov_b32 s14, s8
6488 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
6489 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
6490 ; GFX1064-NEXT: s_getpc_b64 s[2:3]
6491 ; GFX1064-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6492 ; GFX1064-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6493 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6494 ; GFX1064-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6495 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6496 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[4:5]
6497 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[0:1]
6498 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[36:37]
6499 ; GFX1064-NEXT: s_mov_b32 s12, s6
6500 ; GFX1064-NEXT: v_or3_b32 v31, v0, v1, v2
6501 ; GFX1064-NEXT: s_mov_b32 s13, s7
6502 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[38:39]
6503 ; GFX1064-NEXT: s_mov_b32 s32, 0
6504 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
6505 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[16:17]
6506 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
6507 ; GFX1064-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6508 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
6509 ; GFX1064-NEXT: .LBB9_1: ; %ComputeLoop
6510 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
6511 ; GFX1064-NEXT: s_ff1_i32_b64 s4, s[0:1]
6512 ; GFX1064-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6513 ; GFX1064-NEXT: v_readlane_b32 s3, v1, s4
6514 ; GFX1064-NEXT: v_readlane_b32 s2, v0, s4
6515 ; GFX1064-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6516 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s4
6517 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
6518 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
6519 ; GFX1064-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6520 ; GFX1064-NEXT: s_cbranch_scc1 .LBB9_1
6521 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
6522 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6523 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6524 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6525 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
6526 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
6527 ; GFX1064-NEXT: s_cbranch_execz .LBB9_5
6528 ; GFX1064-NEXT: ; %bb.3:
6529 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
6530 ; GFX1064-NEXT: v_mov_b32_e32 v6, 0
6531 ; GFX1064-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6532 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
6533 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
6534 ; GFX1064-NEXT: global_load_dwordx2 v[2:3], v6, s[0:1]
6535 ; GFX1064-NEXT: .LBB9_4: ; %atomicrmw.start
6536 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
6537 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
6538 ; GFX1064-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6539 ; GFX1064-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6540 ; GFX1064-NEXT: global_atomic_cmpswap_x2 v[0:1], v6, v[0:3], s[0:1] glc
6541 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
6542 ; GFX1064-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6543 ; GFX1064-NEXT: v_mov_b32_e32 v3, v1
6544 ; GFX1064-NEXT: v_mov_b32_e32 v2, v0
6545 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6546 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
6547 ; GFX1064-NEXT: s_cbranch_execnz .LBB9_4
6548 ; GFX1064-NEXT: .LBB9_5:
6549 ; GFX1064-NEXT: s_endpgm
6551 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6553 ; GFX1032-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6554 ; GFX1032-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6555 ; GFX1032-NEXT: s_mov_b32 s38, -1
6556 ; GFX1032-NEXT: s_mov_b32 s39, 0x31c16000
6557 ; GFX1032-NEXT: s_add_u32 s36, s36, s9
6558 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
6559 ; GFX1032-NEXT: s_addc_u32 s37, s37, 0
6560 ; GFX1032-NEXT: s_mov_b32 s14, s8
6561 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
6562 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
6563 ; GFX1032-NEXT: s_getpc_b64 s[2:3]
6564 ; GFX1032-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6565 ; GFX1032-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6566 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6567 ; GFX1032-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6568 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6569 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[4:5]
6570 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[0:1]
6571 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[36:37]
6572 ; GFX1032-NEXT: s_mov_b32 s12, s6
6573 ; GFX1032-NEXT: v_or3_b32 v31, v0, v1, v2
6574 ; GFX1032-NEXT: s_mov_b32 s13, s7
6575 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[38:39]
6576 ; GFX1032-NEXT: s_mov_b32 s32, 0
6577 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
6578 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[16:17]
6579 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
6580 ; GFX1032-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6581 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
6582 ; GFX1032-NEXT: .LBB9_1: ; %ComputeLoop
6583 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
6584 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
6585 ; GFX1032-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6586 ; GFX1032-NEXT: v_readlane_b32 s3, v1, s1
6587 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
6588 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
6589 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
6590 ; GFX1032-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6591 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
6592 ; GFX1032-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6593 ; GFX1032-NEXT: s_cbranch_scc1 .LBB9_1
6594 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
6595 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6596 ; GFX1032-NEXT: s_mov_b32 s2, 0
6597 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
6598 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
6599 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
6600 ; GFX1032-NEXT: s_cbranch_execz .LBB9_5
6601 ; GFX1032-NEXT: ; %bb.3:
6602 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
6603 ; GFX1032-NEXT: v_mov_b32_e32 v6, 0
6604 ; GFX1032-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6605 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
6606 ; GFX1032-NEXT: global_load_dwordx2 v[2:3], v6, s[0:1]
6607 ; GFX1032-NEXT: .LBB9_4: ; %atomicrmw.start
6608 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
6609 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
6610 ; GFX1032-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6611 ; GFX1032-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6612 ; GFX1032-NEXT: global_atomic_cmpswap_x2 v[0:1], v6, v[0:3], s[0:1] glc
6613 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
6614 ; GFX1032-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6615 ; GFX1032-NEXT: v_mov_b32_e32 v3, v1
6616 ; GFX1032-NEXT: v_mov_b32_e32 v2, v0
6617 ; GFX1032-NEXT: s_or_b32 s2, vcc_lo, s2
6618 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
6619 ; GFX1032-NEXT: s_cbranch_execnz .LBB9_4
6620 ; GFX1032-NEXT: .LBB9_5:
6621 ; GFX1032-NEXT: s_endpgm
6623 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6625 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
6626 ; GFX1164-NEXT: s_mov_b32 s14, s8
6627 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
6628 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
6629 ; GFX1164-NEXT: s_getpc_b64 s[2:3]
6630 ; GFX1164-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6631 ; GFX1164-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6632 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
6633 ; GFX1164-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
6634 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[4:5]
6635 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[0:1]
6636 ; GFX1164-NEXT: s_mov_b32 s12, s6
6637 ; GFX1164-NEXT: s_mov_b32 s13, s7
6638 ; GFX1164-NEXT: s_mov_b32 s32, 0
6639 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
6640 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[2:3]
6641 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
6642 ; GFX1164-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6643 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
6644 ; GFX1164-NEXT: .LBB9_1: ; %ComputeLoop
6645 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
6646 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6647 ; GFX1164-NEXT: s_ctz_i32_b64 s4, s[0:1]
6648 ; GFX1164-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6649 ; GFX1164-NEXT: v_readlane_b32 s3, v1, s4
6650 ; GFX1164-NEXT: v_readlane_b32 s2, v0, s4
6651 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
6652 ; GFX1164-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6653 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s4
6654 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
6655 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6656 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
6657 ; GFX1164-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6658 ; GFX1164-NEXT: s_cbranch_scc1 .LBB9_1
6659 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
6660 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6661 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
6662 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6663 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6664 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
6665 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
6666 ; GFX1164-NEXT: s_cbranch_execz .LBB9_5
6667 ; GFX1164-NEXT: ; %bb.3:
6668 ; GFX1164-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
6669 ; GFX1164-NEXT: v_mov_b32_e32 v6, 0
6670 ; GFX1164-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6671 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
6672 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
6673 ; GFX1164-NEXT: global_load_b64 v[2:3], v6, s[0:1]
6674 ; GFX1164-NEXT: .LBB9_4: ; %atomicrmw.start
6675 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
6676 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
6677 ; GFX1164-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6678 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
6679 ; GFX1164-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6680 ; GFX1164-NEXT: global_atomic_cmpswap_b64 v[0:1], v6, v[0:3], s[0:1] glc
6681 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
6682 ; GFX1164-NEXT: v_cmp_eq_u64_e32 vcc, v[0:1], v[2:3]
6683 ; GFX1164-NEXT: v_mov_b32_e32 v3, v1
6684 ; GFX1164-NEXT: v_mov_b32_e32 v2, v0
6685 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
6686 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6687 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
6688 ; GFX1164-NEXT: s_cbranch_execnz .LBB9_4
6689 ; GFX1164-NEXT: .LBB9_5:
6690 ; GFX1164-NEXT: s_endpgm
6692 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6694 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
6695 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
6696 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
6697 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
6698 ; GFX1132-NEXT: s_getpc_b64 s[2:3]
6699 ; GFX1132-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6700 ; GFX1132-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6701 ; GFX1132-NEXT: s_mov_b32 s12, s13
6702 ; GFX1132-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
6703 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[4:5]
6704 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[0:1]
6705 ; GFX1132-NEXT: s_mov_b32 s13, s14
6706 ; GFX1132-NEXT: s_mov_b32 s14, s15
6707 ; GFX1132-NEXT: s_mov_b32 s32, 0
6708 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
6709 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[2:3]
6710 ; GFX1132-NEXT: v_mov_b32_e32 v4, 0
6711 ; GFX1132-NEXT: v_mov_b32_e32 v5, 0x7ff80000
6712 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
6713 ; GFX1132-NEXT: .LBB9_1: ; %ComputeLoop
6714 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
6715 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6716 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
6717 ; GFX1132-NEXT: v_max_f64 v[2:3], v[4:5], v[4:5]
6718 ; GFX1132-NEXT: v_readlane_b32 s3, v1, s1
6719 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
6720 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
6721 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
6722 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
6723 ; GFX1132-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
6724 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
6725 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
6726 ; GFX1132-NEXT: v_min_f64 v[4:5], v[2:3], v[4:5]
6727 ; GFX1132-NEXT: s_cbranch_scc1 .LBB9_1
6728 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
6729 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6730 ; GFX1132-NEXT: s_mov_b32 s2, 0
6731 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
6732 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
6733 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
6734 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
6735 ; GFX1132-NEXT: s_cbranch_execz .LBB9_5
6736 ; GFX1132-NEXT: ; %bb.3:
6737 ; GFX1132-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
6738 ; GFX1132-NEXT: v_mov_b32_e32 v6, 0
6739 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_4)
6740 ; GFX1132-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
6741 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
6742 ; GFX1132-NEXT: global_load_b64 v[2:3], v6, s[0:1]
6743 ; GFX1132-NEXT: .LBB9_4: ; %atomicrmw.start
6744 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
6745 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
6746 ; GFX1132-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6747 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
6748 ; GFX1132-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6749 ; GFX1132-NEXT: global_atomic_cmpswap_b64 v[0:1], v6, v[0:3], s[0:1] glc
6750 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
6751 ; GFX1132-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
6752 ; GFX1132-NEXT: v_dual_mov_b32 v3, v1 :: v_dual_mov_b32 v2, v0
6753 ; GFX1132-NEXT: s_or_b32 s2, vcc_lo, s2
6754 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
6755 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
6756 ; GFX1132-NEXT: s_cbranch_execnz .LBB9_4
6757 ; GFX1132-NEXT: .LBB9_5:
6758 ; GFX1132-NEXT: s_endpgm
6760 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6761 ; GFX7LESS-DPP: ; %bb.0:
6762 ; GFX7LESS-DPP-NEXT: s_mov_b32 s32, 0
6763 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, SCRATCH_RSRC_DWORD0
6764 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, SCRATCH_RSRC_DWORD1
6765 ; GFX7LESS-DPP-NEXT: s_mov_b32 s42, -1
6766 ; GFX7LESS-DPP-NEXT: s_mov_b32 s43, 0xe8f000
6767 ; GFX7LESS-DPP-NEXT: s_add_u32 s40, s40, s9
6768 ; GFX7LESS-DPP-NEXT: s_addc_u32 s41, s41, 0
6769 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s8
6770 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
6771 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[36:37], s[2:3], 0x9
6772 ; GFX7LESS-DPP-NEXT: s_mov_b32 s39, 0xf000
6773 ; GFX7LESS-DPP-NEXT: s_mov_b32 s38, -1
6774 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s2, 44
6775 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s3, 0
6776 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[2:3]
6777 ; GFX7LESS-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6778 ; GFX7LESS-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6779 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6780 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6781 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6782 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
6783 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v31, v0, v2
6784 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
6785 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s6
6786 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s7
6787 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[40:41]
6788 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[42:43]
6789 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
6790 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
6791 ; GFX7LESS-DPP-NEXT: buffer_load_dwordx2 v[2:3], off, s[36:39], 0
6792 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], 0
6793 ; GFX7LESS-DPP-NEXT: v_max_f64 v[4:5], v[0:1], v[0:1]
6794 ; GFX7LESS-DPP-NEXT: .LBB9_1: ; %atomicrmw.start
6795 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6796 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
6797 ; GFX7LESS-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
6798 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[0:1], v[4:5]
6799 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
6800 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v9, v3
6801 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v8, v2
6802 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, v1
6803 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, v0
6804 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap_x2 v[6:9], off, s[36:39], 0 glc
6805 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
6806 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[6:7], v[2:3]
6807 ; GFX7LESS-DPP-NEXT: s_or_b64 s[0:1], vcc, s[0:1]
6808 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v6
6809 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v7
6810 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[0:1]
6811 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB9_1
6812 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
6813 ; GFX7LESS-DPP-NEXT: s_endpgm
6815 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6816 ; GFX9-DPP: ; %bb.0:
6817 ; GFX9-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6818 ; GFX9-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6819 ; GFX9-DPP-NEXT: s_mov_b32 s38, -1
6820 ; GFX9-DPP-NEXT: s_mov_b32 s39, 0xe00000
6821 ; GFX9-DPP-NEXT: s_add_u32 s36, s36, s9
6822 ; GFX9-DPP-NEXT: s_addc_u32 s37, s37, 0
6823 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
6824 ; GFX9-DPP-NEXT: s_mov_b32 s14, s8
6825 ; GFX9-DPP-NEXT: s_add_u32 s8, s34, 44
6826 ; GFX9-DPP-NEXT: s_addc_u32 s9, s35, 0
6827 ; GFX9-DPP-NEXT: s_getpc_b64 s[2:3]
6828 ; GFX9-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6829 ; GFX9-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6830 ; GFX9-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6831 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
6832 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6833 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6834 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
6835 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
6836 ; GFX9-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
6837 ; GFX9-DPP-NEXT: s_mov_b32 s12, s6
6838 ; GFX9-DPP-NEXT: s_mov_b32 s13, s7
6839 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
6840 ; GFX9-DPP-NEXT: s_mov_b32 s32, 0
6841 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
6842 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
6843 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
6844 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, 0
6845 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0x7ff80000
6846 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
6847 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, v0
6848 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, v1
6849 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
6850 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, v3
6851 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, v4
6852 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
6853 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
6854 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, v3
6855 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, v4
6856 ; GFX9-DPP-NEXT: s_nop 0
6857 ; GFX9-DPP-NEXT: v_mov_b32_dpp v7, v5 row_shr:1 row_mask:0xf bank_mask:0xf
6858 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v6 row_shr:1 row_mask:0xf bank_mask:0xf
6859 ; GFX9-DPP-NEXT: v_max_f64 v[5:6], v[5:6], v[5:6]
6860 ; GFX9-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6861 ; GFX9-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6862 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, v3
6863 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, v4
6864 ; GFX9-DPP-NEXT: s_nop 0
6865 ; GFX9-DPP-NEXT: v_mov_b32_dpp v7, v5 row_shr:2 row_mask:0xf bank_mask:0xf
6866 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v6 row_shr:2 row_mask:0xf bank_mask:0xf
6867 ; GFX9-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6868 ; GFX9-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6869 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, v3
6870 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, v4
6871 ; GFX9-DPP-NEXT: s_nop 0
6872 ; GFX9-DPP-NEXT: v_mov_b32_dpp v7, v5 row_shr:4 row_mask:0xf bank_mask:0xf
6873 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v6 row_shr:4 row_mask:0xf bank_mask:0xf
6874 ; GFX9-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6875 ; GFX9-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6876 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, v3
6877 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, v4
6878 ; GFX9-DPP-NEXT: s_nop 0
6879 ; GFX9-DPP-NEXT: v_mov_b32_dpp v7, v5 row_shr:8 row_mask:0xf bank_mask:0xf
6880 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v6 row_shr:8 row_mask:0xf bank_mask:0xf
6881 ; GFX9-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6882 ; GFX9-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6883 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, v3
6884 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, v4
6885 ; GFX9-DPP-NEXT: s_nop 0
6886 ; GFX9-DPP-NEXT: v_mov_b32_dpp v7, v5 row_bcast:15 row_mask:0xa bank_mask:0xf
6887 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v6 row_bcast:15 row_mask:0xa bank_mask:0xf
6888 ; GFX9-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6889 ; GFX9-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6890 ; GFX9-DPP-NEXT: s_nop 1
6891 ; GFX9-DPP-NEXT: v_mov_b32_dpp v3, v5 row_bcast:31 row_mask:0xc bank_mask:0xf
6892 ; GFX9-DPP-NEXT: v_mov_b32_dpp v4, v6 row_bcast:31 row_mask:0xc bank_mask:0xf
6893 ; GFX9-DPP-NEXT: v_max_f64 v[3:4], v[3:4], v[3:4]
6894 ; GFX9-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
6895 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
6896 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
6897 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
6898 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
6899 ; GFX9-DPP-NEXT: v_readlane_b32 s3, v4, 63
6900 ; GFX9-DPP-NEXT: v_readlane_b32 s2, v3, 63
6901 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
6902 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[2:3]
6903 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
6904 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[2:3], vcc
6905 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB9_3
6906 ; GFX9-DPP-NEXT: ; %bb.1:
6907 ; GFX9-DPP-NEXT: s_load_dwordx2 s[2:3], s[34:35], 0x24
6908 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 0
6909 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], 0
6910 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
6911 ; GFX9-DPP-NEXT: global_load_dwordx2 v[11:12], v0, s[2:3]
6912 ; GFX9-DPP-NEXT: .LBB9_2: ; %atomicrmw.start
6913 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
6914 ; GFX9-DPP-NEXT: v_max_f64 v[1:2], s[0:1], s[0:1]
6915 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
6916 ; GFX9-DPP-NEXT: v_max_f64 v[9:10], v[11:12], v[11:12]
6917 ; GFX9-DPP-NEXT: v_min_f64 v[9:10], v[9:10], v[1:2]
6918 ; GFX9-DPP-NEXT: global_atomic_cmpswap_x2 v[1:2], v0, v[9:12], s[2:3] glc
6919 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
6920 ; GFX9-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[1:2], v[11:12]
6921 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v2
6922 ; GFX9-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
6923 ; GFX9-DPP-NEXT: v_mov_b32_e32 v11, v1
6924 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
6925 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB9_2
6926 ; GFX9-DPP-NEXT: .LBB9_3:
6927 ; GFX9-DPP-NEXT: s_endpgm
6929 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
6930 ; GFX1064-DPP: ; %bb.0:
6931 ; GFX1064-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
6932 ; GFX1064-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
6933 ; GFX1064-DPP-NEXT: s_mov_b32 s38, -1
6934 ; GFX1064-DPP-NEXT: s_mov_b32 s39, 0x31e16000
6935 ; GFX1064-DPP-NEXT: s_add_u32 s36, s36, s9
6936 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
6937 ; GFX1064-DPP-NEXT: s_addc_u32 s37, s37, 0
6938 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s8
6939 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
6940 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
6941 ; GFX1064-DPP-NEXT: s_getpc_b64 s[2:3]
6942 ; GFX1064-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
6943 ; GFX1064-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
6944 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
6945 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
6946 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
6947 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
6948 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
6949 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
6950 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s6
6951 ; GFX1064-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
6952 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s7
6953 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
6954 ; GFX1064-DPP-NEXT: s_mov_b32 s32, 0
6955 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
6956 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
6957 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
6958 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, 0
6959 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0x7ff80000
6960 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
6961 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, v0
6962 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, v1
6963 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
6964 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, v3
6965 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, v4
6966 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
6967 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
6968 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, v3
6969 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v8, v4
6970 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:1 row_mask:0xf bank_mask:0xf
6971 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:1 row_mask:0xf bank_mask:0xf
6972 ; GFX1064-DPP-NEXT: v_max_f64 v[5:6], v[5:6], v[5:6]
6973 ; GFX1064-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6974 ; GFX1064-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6975 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, v3
6976 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v8, v4
6977 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:2 row_mask:0xf bank_mask:0xf
6978 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:2 row_mask:0xf bank_mask:0xf
6979 ; GFX1064-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6980 ; GFX1064-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6981 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, v3
6982 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v8, v4
6983 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:4 row_mask:0xf bank_mask:0xf
6984 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:4 row_mask:0xf bank_mask:0xf
6985 ; GFX1064-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
6986 ; GFX1064-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
6987 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v3, v5 row_xmask:8 row_mask:0xf bank_mask:0xf
6988 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v4, v6 row_xmask:8 row_mask:0xf bank_mask:0xf
6989 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], v[3:4], v[3:4]
6990 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
6991 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, v4
6992 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, v3
6993 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v6, v6, -1, -1
6994 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v5, v5, -1, -1
6995 ; GFX1064-DPP-NEXT: v_max_f64 v[5:6], v[5:6], v[5:6]
6996 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[5:6]
6997 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v4, 0
6998 ; GFX1064-DPP-NEXT: v_readlane_b32 s5, v4, 32
6999 ; GFX1064-DPP-NEXT: v_readlane_b32 s4, v3, 32
7000 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v3, 0
7001 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], s[4:5], s[4:5]
7002 ; GFX1064-DPP-NEXT: v_max_f64 v[5:6], s[2:3], s[2:3]
7003 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
7004 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
7005 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
7006 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v0
7007 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, v3
7008 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v4
7009 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
7010 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
7011 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB9_3
7012 ; GFX1064-DPP-NEXT: ; %bb.1:
7013 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
7014 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
7015 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
7016 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
7017 ; GFX1064-DPP-NEXT: global_load_dwordx2 v[11:12], v2, s[0:1]
7018 ; GFX1064-DPP-NEXT: .LBB9_2: ; %atomicrmw.start
7019 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7020 ; GFX1064-DPP-NEXT: v_max_f64 v[9:10], v[0:1], v[0:1]
7021 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
7022 ; GFX1064-DPP-NEXT: v_max_f64 v[13:14], v[11:12], v[11:12]
7023 ; GFX1064-DPP-NEXT: v_min_f64 v[9:10], v[13:14], v[9:10]
7024 ; GFX1064-DPP-NEXT: global_atomic_cmpswap_x2 v[9:10], v2, v[9:12], s[0:1] glc
7025 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
7026 ; GFX1064-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[9:10], v[11:12]
7027 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v10
7028 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v9
7029 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
7030 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
7031 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB9_2
7032 ; GFX1064-DPP-NEXT: .LBB9_3:
7033 ; GFX1064-DPP-NEXT: s_endpgm
7035 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
7036 ; GFX1032-DPP: ; %bb.0:
7037 ; GFX1032-DPP-NEXT: s_mov_b32 s36, SCRATCH_RSRC_DWORD0
7038 ; GFX1032-DPP-NEXT: s_mov_b32 s37, SCRATCH_RSRC_DWORD1
7039 ; GFX1032-DPP-NEXT: s_mov_b32 s38, -1
7040 ; GFX1032-DPP-NEXT: s_mov_b32 s39, 0x31c16000
7041 ; GFX1032-DPP-NEXT: s_add_u32 s36, s36, s9
7042 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
7043 ; GFX1032-DPP-NEXT: s_addc_u32 s37, s37, 0
7044 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s8
7045 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
7046 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
7047 ; GFX1032-DPP-NEXT: s_getpc_b64 s[2:3]
7048 ; GFX1032-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
7049 ; GFX1032-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
7050 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
7051 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[16:17], s[2:3], 0x0
7052 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
7053 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
7054 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
7055 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[36:37]
7056 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s6
7057 ; GFX1032-DPP-NEXT: v_or3_b32 v31, v0, v1, v2
7058 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s7
7059 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[38:39]
7060 ; GFX1032-DPP-NEXT: s_mov_b32 s32, 0
7061 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
7062 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[16:17]
7063 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
7064 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, 0
7065 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0x7ff80000
7066 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
7067 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, v0
7068 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, v1
7069 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
7070 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, v3
7071 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, v4
7072 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
7073 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
7074 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, v3
7075 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v8, v4
7076 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:1 row_mask:0xf bank_mask:0xf
7077 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:1 row_mask:0xf bank_mask:0xf
7078 ; GFX1032-DPP-NEXT: v_max_f64 v[5:6], v[5:6], v[5:6]
7079 ; GFX1032-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
7080 ; GFX1032-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
7081 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, v3
7082 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v8, v4
7083 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:2 row_mask:0xf bank_mask:0xf
7084 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:2 row_mask:0xf bank_mask:0xf
7085 ; GFX1032-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
7086 ; GFX1032-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
7087 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, v3
7088 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v8, v4
7089 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:4 row_mask:0xf bank_mask:0xf
7090 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v8, v6 row_xmask:4 row_mask:0xf bank_mask:0xf
7091 ; GFX1032-DPP-NEXT: v_max_f64 v[7:8], v[7:8], v[7:8]
7092 ; GFX1032-DPP-NEXT: v_min_f64 v[5:6], v[5:6], v[7:8]
7093 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v3, v5 row_xmask:8 row_mask:0xf bank_mask:0xf
7094 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v4, v6 row_xmask:8 row_mask:0xf bank_mask:0xf
7095 ; GFX1032-DPP-NEXT: v_max_f64 v[3:4], v[3:4], v[3:4]
7096 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
7097 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, v4
7098 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, v3
7099 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v6, v6, -1, -1
7100 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v5, v5, -1, -1
7101 ; GFX1032-DPP-NEXT: v_max_f64 v[5:6], v[5:6], v[5:6]
7102 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[5:6]
7103 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
7104 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
7105 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, v3
7106 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v4
7107 ; GFX1032-DPP-NEXT: s_mov_b32 s2, 0
7108 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
7109 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
7110 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB9_3
7111 ; GFX1032-DPP-NEXT: ; %bb.1:
7112 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[34:35], 0x24
7113 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
7114 ; GFX1032-DPP-NEXT: v_max_f64 v[0:1], v[0:1], v[0:1]
7115 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
7116 ; GFX1032-DPP-NEXT: global_load_dwordx2 v[11:12], v2, s[0:1]
7117 ; GFX1032-DPP-NEXT: .LBB9_2: ; %atomicrmw.start
7118 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7119 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
7120 ; GFX1032-DPP-NEXT: v_max_f64 v[9:10], v[11:12], v[11:12]
7121 ; GFX1032-DPP-NEXT: v_min_f64 v[9:10], v[9:10], v[0:1]
7122 ; GFX1032-DPP-NEXT: global_atomic_cmpswap_x2 v[9:10], v2, v[9:12], s[0:1] glc
7123 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
7124 ; GFX1032-DPP-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[9:10], v[11:12]
7125 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v10
7126 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v9
7127 ; GFX1032-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
7128 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s2
7129 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB9_2
7130 ; GFX1032-DPP-NEXT: .LBB9_3:
7131 ; GFX1032-DPP-NEXT: s_endpgm
7133 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
7134 ; GFX1164-DPP: ; %bb.0:
7135 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
7136 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s8
7137 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
7138 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
7139 ; GFX1164-DPP-NEXT: s_getpc_b64 s[2:3]
7140 ; GFX1164-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
7141 ; GFX1164-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
7142 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
7143 ; GFX1164-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
7144 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
7145 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
7146 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
7147 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
7148 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 0
7149 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
7150 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
7151 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
7152 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0
7153 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, 0x7ff80000
7154 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
7155 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v0
7156 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, v1
7157 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
7158 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v2
7159 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, v3
7160 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
7161 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
7162 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, v2
7163 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, v3
7164 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
7165 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
7166 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:1 row_mask:0xf bank_mask:0xf
7167 ; GFX1164-DPP-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
7168 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
7169 ; GFX1164-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7170 ; GFX1164-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7171 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, v2
7172 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, v3
7173 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
7174 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:2 row_mask:0xf bank_mask:0xf
7175 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:2 row_mask:0xf bank_mask:0xf
7176 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7177 ; GFX1164-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7178 ; GFX1164-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7179 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, v2
7180 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, v3
7181 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
7182 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:4 row_mask:0xf bank_mask:0xf
7183 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:4 row_mask:0xf bank_mask:0xf
7184 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7185 ; GFX1164-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7186 ; GFX1164-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7187 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7188 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v2, v4 row_xmask:8 row_mask:0xf bank_mask:0xf
7189 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v3, v5 row_xmask:8 row_mask:0xf bank_mask:0xf
7190 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7191 ; GFX1164-DPP-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
7192 ; GFX1164-DPP-NEXT: v_min_f64 v[2:3], v[4:5], v[2:3]
7193 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7194 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, v3
7195 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v2
7196 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
7197 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v5, v5, -1, -1
7198 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
7199 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7200 ; GFX1164-DPP-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
7201 ; GFX1164-DPP-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
7202 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7203 ; GFX1164-DPP-NEXT: v_permlane64_b32 v5, v3
7204 ; GFX1164-DPP-NEXT: v_permlane64_b32 v4, v2
7205 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7206 ; GFX1164-DPP-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
7207 ; GFX1164-DPP-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
7208 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
7209 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
7210 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
7211 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
7212 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v8, exec_hi, v0
7213 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
7214 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, v2
7215 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, v3
7216 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3)
7217 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v8
7218 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB9_3
7219 ; GFX1164-DPP-NEXT: ; %bb.1:
7220 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
7221 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, 0
7222 ; GFX1164-DPP-NEXT: v_max_f64 v[0:1], v[0:1], v[0:1]
7223 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
7224 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
7225 ; GFX1164-DPP-NEXT: global_load_b64 v[10:11], v12, s[0:1]
7226 ; GFX1164-DPP-NEXT: .LBB9_2: ; %atomicrmw.start
7227 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7228 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
7229 ; GFX1164-DPP-NEXT: v_max_f64 v[8:9], v[10:11], v[10:11]
7230 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
7231 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[0:1]
7232 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b64 v[8:9], v12, v[8:11], s[0:1] glc
7233 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
7234 ; GFX1164-DPP-NEXT: v_cmp_eq_u64_e32 vcc, v[8:9], v[10:11]
7235 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v9
7236 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v8
7237 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
7238 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
7239 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
7240 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB9_2
7241 ; GFX1164-DPP-NEXT: .LBB9_3:
7242 ; GFX1164-DPP-NEXT: s_endpgm
7244 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_one_as_scope_unsafe:
7245 ; GFX1132-DPP: ; %bb.0:
7246 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
7247 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
7248 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
7249 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
7250 ; GFX1132-DPP-NEXT: s_getpc_b64 s[2:3]
7251 ; GFX1132-DPP-NEXT: s_add_u32 s2, s2, div.double.value@gotpcrel32@lo+4
7252 ; GFX1132-DPP-NEXT: s_addc_u32 s3, s3, div.double.value@gotpcrel32@hi+12
7253 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
7254 ; GFX1132-DPP-NEXT: s_load_b64 s[2:3], s[2:3], 0x0
7255 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[4:5]
7256 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[0:1]
7257 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
7258 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
7259 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 0
7260 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
7261 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[2:3]
7262 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
7263 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0
7264 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v3, 0x7ff80000
7265 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
7266 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v0
7267 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v5, v1
7268 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
7269 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v2
7270 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v5, v3
7271 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
7272 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
7273 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v6, v2 :: v_dual_mov_b32 v7, v3
7274 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7275 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:1 row_mask:0xf bank_mask:0xf
7276 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:1 row_mask:0xf bank_mask:0xf
7277 ; GFX1132-DPP-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
7278 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
7279 ; GFX1132-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7280 ; GFX1132-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7281 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v6, v2 :: v_dual_mov_b32 v7, v3
7282 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7283 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:2 row_mask:0xf bank_mask:0xf
7284 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:2 row_mask:0xf bank_mask:0xf
7285 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7286 ; GFX1132-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7287 ; GFX1132-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7288 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v6, v2 :: v_dual_mov_b32 v7, v3
7289 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7290 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v6, v4 row_xmask:4 row_mask:0xf bank_mask:0xf
7291 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v7, v5 row_xmask:4 row_mask:0xf bank_mask:0xf
7292 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7293 ; GFX1132-DPP-NEXT: v_max_f64 v[6:7], v[6:7], v[6:7]
7294 ; GFX1132-DPP-NEXT: v_min_f64 v[4:5], v[4:5], v[6:7]
7295 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
7296 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v2, v4 row_xmask:8 row_mask:0xf bank_mask:0xf
7297 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v3, v5 row_xmask:8 row_mask:0xf bank_mask:0xf
7298 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7299 ; GFX1132-DPP-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
7300 ; GFX1132-DPP-NEXT: v_min_f64 v[2:3], v[4:5], v[2:3]
7301 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7302 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v5, v3 :: v_dual_mov_b32 v4, v2
7303 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v5, v5, -1, -1
7304 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
7305 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v4, v4, -1, -1
7306 ; GFX1132-DPP-NEXT: v_max_f64 v[4:5], v[4:5], v[4:5]
7307 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
7308 ; GFX1132-DPP-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
7309 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
7310 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, v2
7311 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v8, exec_lo, 0
7312 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_2)
7313 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, v3
7314 ; GFX1132-DPP-NEXT: s_mov_b32 s2, 0
7315 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
7316 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v8
7317 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB9_3
7318 ; GFX1132-DPP-NEXT: ; %bb.1:
7319 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[34:35], 0x24
7320 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v12, 0
7321 ; GFX1132-DPP-NEXT: v_max_f64 v[0:1], v[0:1], v[0:1]
7322 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
7323 ; GFX1132-DPP-NEXT: global_load_b64 v[10:11], v12, s[0:1]
7324 ; GFX1132-DPP-NEXT: .LBB9_2: ; %atomicrmw.start
7325 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7326 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
7327 ; GFX1132-DPP-NEXT: v_max_f64 v[8:9], v[10:11], v[10:11]
7328 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
7329 ; GFX1132-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[0:1]
7330 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b64 v[8:9], v12, v[8:11], s[0:1] glc
7331 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
7332 ; GFX1132-DPP-NEXT: v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[10:11]
7333 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
7334 ; GFX1132-DPP-NEXT: s_or_b32 s2, vcc_lo, s2
7335 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
7336 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s2
7337 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB9_2
7338 ; GFX1132-DPP-NEXT: .LBB9_3:
7339 ; GFX1132-DPP-NEXT: s_endpgm
7340 %divValue = call double @div.double.value()
7341 %result = atomicrmw fmin ptr addrspace(1) %ptr, double %divValue syncscope("one-as") monotonic
7345 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe(ptr addrspace(1) %ptr) #0 {
7346 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7347 ; GFX7LESS: ; %bb.0:
7348 ; GFX7LESS-NEXT: s_movk_i32 s32, 0x800
7349 ; GFX7LESS-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7350 ; GFX7LESS-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7351 ; GFX7LESS-NEXT: s_mov_b32 s50, -1
7352 ; GFX7LESS-NEXT: s_mov_b32 s51, 0xe8f000
7353 ; GFX7LESS-NEXT: s_add_u32 s48, s48, s9
7354 ; GFX7LESS-NEXT: s_addc_u32 s49, s49, 0
7355 ; GFX7LESS-NEXT: s_mov_b64 s[38:39], s[0:1]
7356 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v3, exec_lo, 0
7357 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v3, exec_hi, v3
7358 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7359 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
7360 ; GFX7LESS-NEXT: s_cbranch_execz .LBB10_3
7361 ; GFX7LESS-NEXT: ; %bb.1:
7362 ; GFX7LESS-NEXT: s_mov_b32 s33, s8
7363 ; GFX7LESS-NEXT: s_mov_b32 s40, s7
7364 ; GFX7LESS-NEXT: s_mov_b32 s41, s6
7365 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[4:5]
7366 ; GFX7LESS-NEXT: s_mov_b64 s[36:37], s[2:3]
7367 ; GFX7LESS-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x9
7368 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
7369 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7370 ; GFX7LESS-NEXT: s_mov_b64 s[44:45], 0
7371 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
7372 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
7373 ; GFX7LESS-NEXT: v_or_b32_e32 v3, v0, v1
7374 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
7375 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, s0
7376 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s1
7377 ; GFX7LESS-NEXT: v_or_b32_e32 v40, v3, v2
7378 ; GFX7LESS-NEXT: .LBB10_2: ; %atomicrmw.start
7379 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
7380 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
7381 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
7382 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
7383 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0
7384 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
7385 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
7386 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[2:3], 4.0
7387 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
7388 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
7389 ; GFX7LESS-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7390 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7391 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
7392 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
7393 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7394 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
7395 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, 8
7396 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
7397 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, 0
7398 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, 8
7399 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, 0
7400 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, 0
7401 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
7402 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
7403 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
7404 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
7405 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
7406 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
7407 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
7408 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
7409 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, s42
7410 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, s43
7411 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
7412 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
7413 ; GFX7LESS-NEXT: v_and_b32_e32 v2, 1, v0
7414 ; GFX7LESS-NEXT: buffer_load_dword v0, off, s[48:51], 0
7415 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
7416 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
7417 ; GFX7LESS-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7418 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[44:45]
7419 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB10_2
7420 ; GFX7LESS-NEXT: .LBB10_3:
7421 ; GFX7LESS-NEXT: s_endpgm
7423 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7425 ; GFX9-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7426 ; GFX9-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7427 ; GFX9-NEXT: s_mov_b32 s50, -1
7428 ; GFX9-NEXT: s_mov_b32 s51, 0xe00000
7429 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
7430 ; GFX9-NEXT: s_add_u32 s48, s48, s9
7431 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
7432 ; GFX9-NEXT: s_addc_u32 s49, s49, 0
7433 ; GFX9-NEXT: s_mov_b64 s[38:39], s[0:1]
7434 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7435 ; GFX9-NEXT: s_movk_i32 s32, 0x800
7436 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
7437 ; GFX9-NEXT: s_cbranch_execz .LBB10_3
7438 ; GFX9-NEXT: ; %bb.1:
7439 ; GFX9-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
7440 ; GFX9-NEXT: v_lshlrev_b32_e32 v3, 20, v2
7441 ; GFX9-NEXT: v_lshlrev_b32_e32 v4, 10, v1
7442 ; GFX9-NEXT: s_mov_b32 s33, s8
7443 ; GFX9-NEXT: s_mov_b32 s40, s7
7444 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
7445 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7446 ; GFX9-NEXT: s_mov_b32 s41, s6
7447 ; GFX9-NEXT: s_mov_b64 s[34:35], s[4:5]
7448 ; GFX9-NEXT: s_mov_b64 s[36:37], s[2:3]
7449 ; GFX9-NEXT: s_mov_b64 s[44:45], 0
7450 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
7451 ; GFX9-NEXT: v_mov_b32_e32 v2, s1
7452 ; GFX9-NEXT: v_mov_b32_e32 v1, s0
7453 ; GFX9-NEXT: v_or3_b32 v40, v0, v4, v3
7454 ; GFX9-NEXT: .LBB10_2: ; %atomicrmw.start
7455 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
7456 ; GFX9-NEXT: s_waitcnt vmcnt(0)
7457 ; GFX9-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7458 ; GFX9-NEXT: s_add_u32 s8, s36, 44
7459 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
7460 ; GFX9-NEXT: s_getpc_b64 s[0:1]
7461 ; GFX9-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7462 ; GFX9-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7463 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7464 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
7465 ; GFX9-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
7466 ; GFX9-NEXT: buffer_store_dword v1, off, s[48:51], 0
7467 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
7468 ; GFX9-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7469 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
7470 ; GFX9-NEXT: s_mov_b32 s12, s41
7471 ; GFX9-NEXT: s_mov_b32 s13, s40
7472 ; GFX9-NEXT: s_mov_b32 s14, s33
7473 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
7474 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
7475 ; GFX9-NEXT: v_mov_b32_e32 v0, 8
7476 ; GFX9-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
7477 ; GFX9-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
7478 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
7479 ; GFX9-NEXT: v_mov_b32_e32 v2, s42
7480 ; GFX9-NEXT: v_mov_b32_e32 v3, s43
7481 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
7482 ; GFX9-NEXT: v_mov_b32_e32 v5, 8
7483 ; GFX9-NEXT: v_mov_b32_e32 v6, 0
7484 ; GFX9-NEXT: v_mov_b32_e32 v7, 0
7485 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
7486 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
7487 ; GFX9-NEXT: buffer_load_dword v1, off, s[48:51], 0
7488 ; GFX9-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
7489 ; GFX9-NEXT: v_and_b32_e32 v0, 1, v0
7490 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
7491 ; GFX9-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7492 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[44:45]
7493 ; GFX9-NEXT: s_cbranch_execnz .LBB10_2
7494 ; GFX9-NEXT: .LBB10_3:
7495 ; GFX9-NEXT: s_endpgm
7497 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7499 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
7500 ; GFX1064-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7501 ; GFX1064-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7502 ; GFX1064-NEXT: s_mov_b32 s50, -1
7503 ; GFX1064-NEXT: s_mov_b32 s51, 0x31e16000
7504 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
7505 ; GFX1064-NEXT: s_add_u32 s48, s48, s9
7506 ; GFX1064-NEXT: s_addc_u32 s49, s49, 0
7507 ; GFX1064-NEXT: s_mov_b64 s[38:39], s[0:1]
7508 ; GFX1064-NEXT: s_movk_i32 s32, 0x800
7509 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7510 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
7511 ; GFX1064-NEXT: s_cbranch_execz .LBB10_3
7512 ; GFX1064-NEXT: ; %bb.1:
7513 ; GFX1064-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
7514 ; GFX1064-NEXT: v_lshlrev_b32_e32 v3, 20, v2
7515 ; GFX1064-NEXT: v_lshlrev_b32_e32 v4, 10, v1
7516 ; GFX1064-NEXT: s_mov_b32 s33, s8
7517 ; GFX1064-NEXT: s_mov_b32 s40, s7
7518 ; GFX1064-NEXT: s_mov_b32 s41, s6
7519 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[4:5]
7520 ; GFX1064-NEXT: v_or3_b32 v40, v0, v4, v3
7521 ; GFX1064-NEXT: s_mov_b64 s[36:37], s[2:3]
7522 ; GFX1064-NEXT: s_mov_b64 s[44:45], 0
7523 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
7524 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7525 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
7526 ; GFX1064-NEXT: v_mov_b32_e32 v2, s1
7527 ; GFX1064-NEXT: v_mov_b32_e32 v1, s0
7528 ; GFX1064-NEXT: .LBB10_2: ; %atomicrmw.start
7529 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
7530 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
7531 ; GFX1064-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7532 ; GFX1064-NEXT: s_add_u32 s8, s36, 44
7533 ; GFX1064-NEXT: s_addc_u32 s9, s37, 0
7534 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
7535 ; GFX1064-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7536 ; GFX1064-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7537 ; GFX1064-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
7538 ; GFX1064-NEXT: buffer_store_dword v1, off, s[48:51], 0
7539 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7540 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
7541 ; GFX1064-NEXT: v_mov_b32_e32 v0, 8
7542 ; GFX1064-NEXT: v_mov_b32_e32 v1, 0
7543 ; GFX1064-NEXT: v_mov_b32_e32 v2, s42
7544 ; GFX1064-NEXT: v_mov_b32_e32 v5, 8
7545 ; GFX1064-NEXT: v_mov_b32_e32 v6, 0
7546 ; GFX1064-NEXT: v_mov_b32_e32 v7, 0
7547 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
7548 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
7549 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[34:35]
7550 ; GFX1064-NEXT: s_mov_b32 s12, s41
7551 ; GFX1064-NEXT: s_mov_b32 s13, s40
7552 ; GFX1064-NEXT: s_mov_b32 s14, s33
7553 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
7554 ; GFX1064-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7555 ; GFX1064-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
7556 ; GFX1064-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
7557 ; GFX1064-NEXT: v_mov_b32_e32 v3, s43
7558 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
7559 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
7560 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
7561 ; GFX1064-NEXT: s_clause 0x1
7562 ; GFX1064-NEXT: buffer_load_dword v1, off, s[48:51], 0
7563 ; GFX1064-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
7564 ; GFX1064-NEXT: v_and_b32_e32 v0, 1, v0
7565 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
7566 ; GFX1064-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7567 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[44:45]
7568 ; GFX1064-NEXT: s_cbranch_execnz .LBB10_2
7569 ; GFX1064-NEXT: .LBB10_3:
7570 ; GFX1064-NEXT: s_endpgm
7572 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7574 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
7575 ; GFX1032-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7576 ; GFX1032-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7577 ; GFX1032-NEXT: s_mov_b32 s50, -1
7578 ; GFX1032-NEXT: s_mov_b32 s51, 0x31c16000
7579 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
7580 ; GFX1032-NEXT: s_add_u32 s48, s48, s9
7581 ; GFX1032-NEXT: s_addc_u32 s49, s49, 0
7582 ; GFX1032-NEXT: s_mov_b64 s[38:39], s[0:1]
7583 ; GFX1032-NEXT: s_mov_b32 s44, 0
7584 ; GFX1032-NEXT: s_movk_i32 s32, 0x400
7585 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
7586 ; GFX1032-NEXT: s_cbranch_execz .LBB10_3
7587 ; GFX1032-NEXT: ; %bb.1:
7588 ; GFX1032-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
7589 ; GFX1032-NEXT: v_lshlrev_b32_e32 v3, 20, v2
7590 ; GFX1032-NEXT: v_lshlrev_b32_e32 v4, 10, v1
7591 ; GFX1032-NEXT: s_mov_b32 s33, s8
7592 ; GFX1032-NEXT: s_mov_b32 s40, s7
7593 ; GFX1032-NEXT: s_mov_b32 s41, s6
7594 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[4:5]
7595 ; GFX1032-NEXT: v_or3_b32 v40, v0, v4, v3
7596 ; GFX1032-NEXT: s_mov_b64 s[36:37], s[2:3]
7597 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
7598 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7599 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
7600 ; GFX1032-NEXT: v_mov_b32_e32 v2, s1
7601 ; GFX1032-NEXT: v_mov_b32_e32 v1, s0
7602 ; GFX1032-NEXT: .LBB10_2: ; %atomicrmw.start
7603 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
7604 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
7605 ; GFX1032-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7606 ; GFX1032-NEXT: s_add_u32 s8, s36, 44
7607 ; GFX1032-NEXT: s_addc_u32 s9, s37, 0
7608 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
7609 ; GFX1032-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7610 ; GFX1032-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7611 ; GFX1032-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
7612 ; GFX1032-NEXT: buffer_store_dword v1, off, s[48:51], 0
7613 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7614 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
7615 ; GFX1032-NEXT: v_mov_b32_e32 v0, 8
7616 ; GFX1032-NEXT: v_mov_b32_e32 v1, 0
7617 ; GFX1032-NEXT: v_mov_b32_e32 v2, s42
7618 ; GFX1032-NEXT: v_mov_b32_e32 v5, 8
7619 ; GFX1032-NEXT: v_mov_b32_e32 v6, 0
7620 ; GFX1032-NEXT: v_mov_b32_e32 v7, 0
7621 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
7622 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
7623 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[34:35]
7624 ; GFX1032-NEXT: s_mov_b32 s12, s41
7625 ; GFX1032-NEXT: s_mov_b32 s13, s40
7626 ; GFX1032-NEXT: s_mov_b32 s14, s33
7627 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
7628 ; GFX1032-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7629 ; GFX1032-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
7630 ; GFX1032-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
7631 ; GFX1032-NEXT: v_mov_b32_e32 v3, s43
7632 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
7633 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
7634 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
7635 ; GFX1032-NEXT: s_clause 0x1
7636 ; GFX1032-NEXT: buffer_load_dword v1, off, s[48:51], 0
7637 ; GFX1032-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
7638 ; GFX1032-NEXT: v_and_b32_e32 v0, 1, v0
7639 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
7640 ; GFX1032-NEXT: s_or_b32 s44, vcc_lo, s44
7641 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
7642 ; GFX1032-NEXT: s_cbranch_execnz .LBB10_2
7643 ; GFX1032-NEXT: .LBB10_3:
7644 ; GFX1032-NEXT: s_endpgm
7646 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7648 ; GFX1164-NEXT: v_mov_b32_e32 v40, v0
7649 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
7650 ; GFX1164-NEXT: s_mov_b64 s[38:39], s[0:1]
7651 ; GFX1164-NEXT: s_mov_b32 s32, 32
7652 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
7653 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
7654 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
7655 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
7656 ; GFX1164-NEXT: s_cbranch_execz .LBB10_3
7657 ; GFX1164-NEXT: ; %bb.1:
7658 ; GFX1164-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
7659 ; GFX1164-NEXT: s_mov_b32 s33, s8
7660 ; GFX1164-NEXT: s_mov_b32 s40, s7
7661 ; GFX1164-NEXT: s_mov_b32 s41, s6
7662 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[4:5]
7663 ; GFX1164-NEXT: s_mov_b64 s[36:37], s[2:3]
7664 ; GFX1164-NEXT: s_mov_b64 s[44:45], 0
7665 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
7666 ; GFX1164-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
7667 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
7668 ; GFX1164-NEXT: v_mov_b32_e32 v2, s1
7669 ; GFX1164-NEXT: v_mov_b32_e32 v1, s0
7670 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x1
7671 ; GFX1164-NEXT: .p2align 6
7672 ; GFX1164-NEXT: .LBB10_2: ; %atomicrmw.start
7673 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
7674 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
7675 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
7676 ; GFX1164-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7677 ; GFX1164-NEXT: s_add_u32 s8, s36, 44
7678 ; GFX1164-NEXT: s_addc_u32 s9, s37, 0
7679 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
7680 ; GFX1164-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7681 ; GFX1164-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7682 ; GFX1164-NEXT: v_mov_b32_e32 v31, v40
7683 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
7684 ; GFX1164-NEXT: v_mov_b32_e32 v0, 8
7685 ; GFX1164-NEXT: v_mov_b32_e32 v5, 8
7686 ; GFX1164-NEXT: v_mov_b32_e32 v6, 0
7687 ; GFX1164-NEXT: v_mov_b32_e32 v7, 0
7688 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
7689 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[34:35]
7690 ; GFX1164-NEXT: s_mov_b32 s12, s41
7691 ; GFX1164-NEXT: s_mov_b32 s13, s40
7692 ; GFX1164-NEXT: s_mov_b32 s14, s33
7693 ; GFX1164-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7694 ; GFX1164-NEXT: s_clause 0x1
7695 ; GFX1164-NEXT: scratch_store_b64 off, v[1:2], off
7696 ; GFX1164-NEXT: scratch_store_b64 off, v[3:4], off offset:8
7697 ; GFX1164-NEXT: v_mov_b32_e32 v1, 0
7698 ; GFX1164-NEXT: v_mov_b32_e32 v2, s42
7699 ; GFX1164-NEXT: v_mov_b32_e32 v3, s43
7700 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
7701 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
7702 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
7703 ; GFX1164-NEXT: scratch_load_b64 v[1:2], off, off
7704 ; GFX1164-NEXT: v_and_b32_e32 v0, 1, v0
7705 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
7706 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
7707 ; GFX1164-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7708 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[44:45]
7709 ; GFX1164-NEXT: s_cbranch_execnz .LBB10_2
7710 ; GFX1164-NEXT: .LBB10_3:
7711 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x2
7712 ; GFX1164-NEXT: s_endpgm
7714 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7716 ; GFX1132-NEXT: v_mov_b32_e32 v40, v0
7717 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
7718 ; GFX1132-NEXT: s_mov_b64 s[38:39], s[0:1]
7719 ; GFX1132-NEXT: s_mov_b32 s44, 0
7720 ; GFX1132-NEXT: s_mov_b32 s32, 32
7721 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
7722 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
7723 ; GFX1132-NEXT: s_cbranch_execz .LBB10_3
7724 ; GFX1132-NEXT: ; %bb.1:
7725 ; GFX1132-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
7726 ; GFX1132-NEXT: s_mov_b32 s33, s15
7727 ; GFX1132-NEXT: s_mov_b32 s40, s14
7728 ; GFX1132-NEXT: s_mov_b32 s41, s13
7729 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[4:5]
7730 ; GFX1132-NEXT: s_mov_b64 s[36:37], s[2:3]
7731 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
7732 ; GFX1132-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
7733 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
7734 ; GFX1132-NEXT: v_dual_mov_b32 v2, s1 :: v_dual_mov_b32 v1, s0
7735 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x1
7736 ; GFX1132-NEXT: .p2align 6
7737 ; GFX1132-NEXT: .LBB10_2: ; %atomicrmw.start
7738 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
7739 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
7740 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
7741 ; GFX1132-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7742 ; GFX1132-NEXT: s_add_u32 s8, s36, 44
7743 ; GFX1132-NEXT: s_addc_u32 s9, s37, 0
7744 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
7745 ; GFX1132-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7746 ; GFX1132-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7747 ; GFX1132-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
7748 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
7749 ; GFX1132-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
7750 ; GFX1132-NEXT: v_mov_b32_e32 v7, 0
7751 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
7752 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[34:35]
7753 ; GFX1132-NEXT: s_mov_b32 s12, s41
7754 ; GFX1132-NEXT: s_mov_b32 s13, s40
7755 ; GFX1132-NEXT: s_mov_b32 s14, s33
7756 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_4)
7757 ; GFX1132-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7758 ; GFX1132-NEXT: s_clause 0x1
7759 ; GFX1132-NEXT: scratch_store_b64 off, v[1:2], off
7760 ; GFX1132-NEXT: scratch_store_b64 off, v[3:4], off offset:8
7761 ; GFX1132-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
7762 ; GFX1132-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
7763 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
7764 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
7765 ; GFX1132-NEXT: scratch_load_b64 v[1:2], off, off
7766 ; GFX1132-NEXT: v_and_b32_e32 v0, 1, v0
7767 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
7768 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
7769 ; GFX1132-NEXT: s_or_b32 s44, vcc_lo, s44
7770 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
7771 ; GFX1132-NEXT: s_cbranch_execnz .LBB10_2
7772 ; GFX1132-NEXT: .LBB10_3:
7773 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x2
7774 ; GFX1132-NEXT: s_endpgm
7776 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7777 ; GFX7LESS-DPP: ; %bb.0:
7778 ; GFX7LESS-DPP-NEXT: s_movk_i32 s32, 0x800
7779 ; GFX7LESS-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7780 ; GFX7LESS-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7781 ; GFX7LESS-DPP-NEXT: s_mov_b32 s50, -1
7782 ; GFX7LESS-DPP-NEXT: s_mov_b32 s51, 0xe8f000
7783 ; GFX7LESS-DPP-NEXT: s_add_u32 s48, s48, s9
7784 ; GFX7LESS-DPP-NEXT: s_addc_u32 s49, s49, 0
7785 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
7786 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v3, exec_lo, 0
7787 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v3, exec_hi, v3
7788 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7789 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
7790 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB10_3
7791 ; GFX7LESS-DPP-NEXT: ; %bb.1:
7792 ; GFX7LESS-DPP-NEXT: s_mov_b32 s33, s8
7793 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, s7
7794 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, s6
7795 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
7796 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
7797 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x9
7798 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
7799 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7800 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[44:45], 0
7801 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
7802 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
7803 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v3, v0, v1
7804 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
7805 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, s0
7806 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s1
7807 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v40, v3, v2
7808 ; GFX7LESS-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
7809 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7810 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
7811 ; GFX7LESS-DPP-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
7812 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
7813 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0
7814 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
7815 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
7816 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[2:3], 4.0
7817 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
7818 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
7819 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7820 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7821 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
7822 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
7823 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7824 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
7825 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, 8
7826 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, 0
7827 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, 0
7828 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v5, 8
7829 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, 0
7830 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, 0
7831 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
7832 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
7833 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
7834 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
7835 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
7836 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
7837 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
7838 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
7839 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, s42
7840 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, s43
7841 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
7842 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
7843 ; GFX7LESS-DPP-NEXT: v_and_b32_e32 v2, 1, v0
7844 ; GFX7LESS-DPP-NEXT: buffer_load_dword v0, off, s[48:51], 0
7845 ; GFX7LESS-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
7846 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
7847 ; GFX7LESS-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7848 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
7849 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB10_2
7850 ; GFX7LESS-DPP-NEXT: .LBB10_3:
7851 ; GFX7LESS-DPP-NEXT: s_endpgm
7853 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7854 ; GFX9-DPP: ; %bb.0:
7855 ; GFX9-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7856 ; GFX9-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7857 ; GFX9-DPP-NEXT: s_mov_b32 s50, -1
7858 ; GFX9-DPP-NEXT: s_mov_b32 s51, 0xe00000
7859 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
7860 ; GFX9-DPP-NEXT: s_add_u32 s48, s48, s9
7861 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
7862 ; GFX9-DPP-NEXT: s_addc_u32 s49, s49, 0
7863 ; GFX9-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
7864 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7865 ; GFX9-DPP-NEXT: s_movk_i32 s32, 0x800
7866 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
7867 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB10_3
7868 ; GFX9-DPP-NEXT: ; %bb.1:
7869 ; GFX9-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
7870 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
7871 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
7872 ; GFX9-DPP-NEXT: s_mov_b32 s33, s8
7873 ; GFX9-DPP-NEXT: s_mov_b32 s40, s7
7874 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
7875 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7876 ; GFX9-DPP-NEXT: s_mov_b32 s41, s6
7877 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
7878 ; GFX9-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
7879 ; GFX9-DPP-NEXT: s_mov_b64 s[44:45], 0
7880 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
7881 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s1
7882 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s0
7883 ; GFX9-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
7884 ; GFX9-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
7885 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7886 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
7887 ; GFX9-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7888 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
7889 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
7890 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
7891 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7892 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7893 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7894 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
7895 ; GFX9-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
7896 ; GFX9-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
7897 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
7898 ; GFX9-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7899 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
7900 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
7901 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
7902 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
7903 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
7904 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
7905 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 8
7906 ; GFX9-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
7907 ; GFX9-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
7908 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, 0
7909 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s42
7910 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, s43
7911 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0
7912 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 8
7913 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, 0
7914 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, 0
7915 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
7916 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
7917 ; GFX9-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
7918 ; GFX9-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
7919 ; GFX9-DPP-NEXT: v_and_b32_e32 v0, 1, v0
7920 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
7921 ; GFX9-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7922 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
7923 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB10_2
7924 ; GFX9-DPP-NEXT: .LBB10_3:
7925 ; GFX9-DPP-NEXT: s_endpgm
7927 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
7928 ; GFX1064-DPP: ; %bb.0:
7929 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
7930 ; GFX1064-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
7931 ; GFX1064-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
7932 ; GFX1064-DPP-NEXT: s_mov_b32 s50, -1
7933 ; GFX1064-DPP-NEXT: s_mov_b32 s51, 0x31e16000
7934 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
7935 ; GFX1064-DPP-NEXT: s_add_u32 s48, s48, s9
7936 ; GFX1064-DPP-NEXT: s_addc_u32 s49, s49, 0
7937 ; GFX1064-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
7938 ; GFX1064-DPP-NEXT: s_movk_i32 s32, 0x800
7939 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
7940 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
7941 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB10_3
7942 ; GFX1064-DPP-NEXT: ; %bb.1:
7943 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
7944 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
7945 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
7946 ; GFX1064-DPP-NEXT: s_mov_b32 s33, s8
7947 ; GFX1064-DPP-NEXT: s_mov_b32 s40, s7
7948 ; GFX1064-DPP-NEXT: s_mov_b32 s41, s6
7949 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
7950 ; GFX1064-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
7951 ; GFX1064-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
7952 ; GFX1064-DPP-NEXT: s_mov_b64 s[44:45], 0
7953 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
7954 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
7955 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
7956 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s1
7957 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s0
7958 ; GFX1064-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
7959 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
7960 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
7961 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
7962 ; GFX1064-DPP-NEXT: s_add_u32 s8, s36, 44
7963 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s37, 0
7964 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
7965 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
7966 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
7967 ; GFX1064-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
7968 ; GFX1064-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
7969 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
7970 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
7971 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 8
7972 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 0
7973 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s42
7974 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 8
7975 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, 0
7976 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, 0
7977 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
7978 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
7979 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
7980 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
7981 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
7982 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
7983 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
7984 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
7985 ; GFX1064-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
7986 ; GFX1064-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
7987 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, s43
7988 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0
7989 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
7990 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
7991 ; GFX1064-DPP-NEXT: s_clause 0x1
7992 ; GFX1064-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
7993 ; GFX1064-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
7994 ; GFX1064-DPP-NEXT: v_and_b32_e32 v0, 1, v0
7995 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
7996 ; GFX1064-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
7997 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
7998 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB10_2
7999 ; GFX1064-DPP-NEXT: .LBB10_3:
8000 ; GFX1064-DPP-NEXT: s_endpgm
8002 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
8003 ; GFX1032-DPP: ; %bb.0:
8004 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
8005 ; GFX1032-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8006 ; GFX1032-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8007 ; GFX1032-DPP-NEXT: s_mov_b32 s50, -1
8008 ; GFX1032-DPP-NEXT: s_mov_b32 s51, 0x31c16000
8009 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
8010 ; GFX1032-DPP-NEXT: s_add_u32 s48, s48, s9
8011 ; GFX1032-DPP-NEXT: s_addc_u32 s49, s49, 0
8012 ; GFX1032-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
8013 ; GFX1032-DPP-NEXT: s_mov_b32 s44, 0
8014 ; GFX1032-DPP-NEXT: s_movk_i32 s32, 0x400
8015 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
8016 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB10_3
8017 ; GFX1032-DPP-NEXT: ; %bb.1:
8018 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[42:43], s[2:3], 0x24
8019 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v3, 20, v2
8020 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v4, 10, v1
8021 ; GFX1032-DPP-NEXT: s_mov_b32 s33, s8
8022 ; GFX1032-DPP-NEXT: s_mov_b32 s40, s7
8023 ; GFX1032-DPP-NEXT: s_mov_b32 s41, s6
8024 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
8025 ; GFX1032-DPP-NEXT: v_or3_b32 v40, v0, v4, v3
8026 ; GFX1032-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
8027 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
8028 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[42:43], 0x0
8029 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
8030 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s1
8031 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s0
8032 ; GFX1032-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
8033 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
8034 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
8035 ; GFX1032-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
8036 ; GFX1032-DPP-NEXT: s_add_u32 s8, s36, 44
8037 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s37, 0
8038 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
8039 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8040 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8041 ; GFX1032-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
8042 ; GFX1032-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
8043 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8044 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
8045 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 8
8046 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 0
8047 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s42
8048 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 8
8049 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, 0
8050 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, 0
8051 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
8052 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8053 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8054 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
8055 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
8056 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
8057 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
8058 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
8059 ; GFX1032-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
8060 ; GFX1032-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
8061 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, s43
8062 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0
8063 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
8064 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
8065 ; GFX1032-DPP-NEXT: s_clause 0x1
8066 ; GFX1032-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
8067 ; GFX1032-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
8068 ; GFX1032-DPP-NEXT: v_and_b32_e32 v0, 1, v0
8069 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
8070 ; GFX1032-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
8071 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
8072 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB10_2
8073 ; GFX1032-DPP-NEXT: .LBB10_3:
8074 ; GFX1032-DPP-NEXT: s_endpgm
8076 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
8077 ; GFX1164-DPP: ; %bb.0:
8078 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v40, v0
8079 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8080 ; GFX1164-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
8081 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 32
8082 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
8083 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8084 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
8085 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
8086 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB10_3
8087 ; GFX1164-DPP-NEXT: ; %bb.1:
8088 ; GFX1164-DPP-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
8089 ; GFX1164-DPP-NEXT: s_mov_b32 s33, s8
8090 ; GFX1164-DPP-NEXT: s_mov_b32 s40, s7
8091 ; GFX1164-DPP-NEXT: s_mov_b32 s41, s6
8092 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
8093 ; GFX1164-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
8094 ; GFX1164-DPP-NEXT: s_mov_b64 s[44:45], 0
8095 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
8096 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
8097 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
8098 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s1
8099 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s0
8100 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x1
8101 ; GFX1164-DPP-NEXT: .p2align 6
8102 ; GFX1164-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
8103 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
8104 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
8105 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
8106 ; GFX1164-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
8107 ; GFX1164-DPP-NEXT: s_add_u32 s8, s36, 44
8108 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s37, 0
8109 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
8110 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8111 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8112 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v40
8113 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8114 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 8
8115 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, 8
8116 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, 0
8117 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, 0
8118 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8119 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8120 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s41
8121 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s40
8122 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
8123 ; GFX1164-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
8124 ; GFX1164-DPP-NEXT: s_clause 0x1
8125 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[1:2], off
8126 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
8127 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0
8128 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s42
8129 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, s43
8130 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
8131 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
8132 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
8133 ; GFX1164-DPP-NEXT: scratch_load_b64 v[1:2], off, off
8134 ; GFX1164-DPP-NEXT: v_and_b32_e32 v0, 1, v0
8135 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
8136 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
8137 ; GFX1164-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
8138 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[44:45]
8139 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB10_2
8140 ; GFX1164-DPP-NEXT: .LBB10_3:
8141 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x2
8142 ; GFX1164-DPP-NEXT: s_endpgm
8144 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_uni_value_default_scope_unsafe:
8145 ; GFX1132-DPP: ; %bb.0:
8146 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v40, v0
8147 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8148 ; GFX1132-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
8149 ; GFX1132-DPP-NEXT: s_mov_b32 s44, 0
8150 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 32
8151 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
8152 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
8153 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB10_3
8154 ; GFX1132-DPP-NEXT: ; %bb.1:
8155 ; GFX1132-DPP-NEXT: s_load_b64 s[42:43], s[2:3], 0x24
8156 ; GFX1132-DPP-NEXT: s_mov_b32 s33, s15
8157 ; GFX1132-DPP-NEXT: s_mov_b32 s40, s14
8158 ; GFX1132-DPP-NEXT: s_mov_b32 s41, s13
8159 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
8160 ; GFX1132-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
8161 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
8162 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[42:43], 0x0
8163 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
8164 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v2, s1 :: v_dual_mov_b32 v1, s0
8165 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x1
8166 ; GFX1132-DPP-NEXT: .p2align 6
8167 ; GFX1132-DPP-NEXT: .LBB10_2: ; %atomicrmw.start
8168 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
8169 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
8170 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
8171 ; GFX1132-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
8172 ; GFX1132-DPP-NEXT: s_add_u32 s8, s36, 44
8173 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s37, 0
8174 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
8175 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8176 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8177 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
8178 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8179 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
8180 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v7, 0
8181 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8182 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8183 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s41
8184 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s40
8185 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s33
8186 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_4)
8187 ; GFX1132-DPP-NEXT: v_min_f64 v[3:4], v[3:4], 4.0
8188 ; GFX1132-DPP-NEXT: s_clause 0x1
8189 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[1:2], off
8190 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
8191 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
8192 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
8193 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
8194 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
8195 ; GFX1132-DPP-NEXT: scratch_load_b64 v[1:2], off, off
8196 ; GFX1132-DPP-NEXT: v_and_b32_e32 v0, 1, v0
8197 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
8198 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
8199 ; GFX1132-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
8200 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
8201 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB10_2
8202 ; GFX1132-DPP-NEXT: .LBB10_3:
8203 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x2
8204 ; GFX1132-DPP-NEXT: s_endpgm
8205 %result = atomicrmw fmin ptr addrspace(1) %ptr, double 4.0 monotonic, align 4
8209 define amdgpu_kernel void @global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe(ptr addrspace(1) %ptr) #0 {
8210 ; GFX7LESS-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8211 ; GFX7LESS: ; %bb.0:
8212 ; GFX7LESS-NEXT: s_movk_i32 s32, 0x800
8213 ; GFX7LESS-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8214 ; GFX7LESS-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8215 ; GFX7LESS-NEXT: s_mov_b32 s50, -1
8216 ; GFX7LESS-NEXT: s_mov_b32 s51, 0xe8f000
8217 ; GFX7LESS-NEXT: s_add_u32 s48, s48, s9
8218 ; GFX7LESS-NEXT: s_addc_u32 s49, s49, 0
8219 ; GFX7LESS-NEXT: s_mov_b32 s33, s8
8220 ; GFX7LESS-NEXT: s_mov_b32 s40, s7
8221 ; GFX7LESS-NEXT: s_mov_b32 s41, s6
8222 ; GFX7LESS-NEXT: s_mov_b64 s[34:35], s[4:5]
8223 ; GFX7LESS-NEXT: s_mov_b64 s[36:37], s[2:3]
8224 ; GFX7LESS-NEXT: s_mov_b64 s[38:39], s[0:1]
8225 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
8226 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
8227 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
8228 ; GFX7LESS-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8229 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8230 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8231 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8232 ; GFX7LESS-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8233 ; GFX7LESS-NEXT: v_or_b32_e32 v0, v0, v1
8234 ; GFX7LESS-NEXT: v_or_b32_e32 v40, v0, v2
8235 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
8236 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
8237 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
8238 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
8239 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
8240 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
8241 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
8242 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
8243 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
8244 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
8245 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], exec
8246 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0
8247 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0x7ff80000
8248 ; GFX7LESS-NEXT: .LBB11_1: ; %ComputeLoop
8249 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
8250 ; GFX7LESS-NEXT: s_ff1_i32_b64 s4, s[0:1]
8251 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
8252 ; GFX7LESS-NEXT: v_readlane_b32 s3, v1, s4
8253 ; GFX7LESS-NEXT: v_readlane_b32 s2, v0, s4
8254 ; GFX7LESS-NEXT: s_lshl_b64 s[4:5], 1, s4
8255 ; GFX7LESS-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8256 ; GFX7LESS-NEXT: s_andn2_b64 s[0:1], s[0:1], s[4:5]
8257 ; GFX7LESS-NEXT: v_cmp_ne_u64_e64 s[2:3], s[0:1], 0
8258 ; GFX7LESS-NEXT: s_and_b64 vcc, exec, s[2:3]
8259 ; GFX7LESS-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
8260 ; GFX7LESS-NEXT: s_cbranch_vccnz .LBB11_1
8261 ; GFX7LESS-NEXT: ; %bb.2: ; %ComputeEnd
8262 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
8263 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
8264 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
8265 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
8266 ; GFX7LESS-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
8267 ; GFX7LESS-NEXT: s_cbranch_execz .LBB11_5
8268 ; GFX7LESS-NEXT: ; %bb.3:
8269 ; GFX7LESS-NEXT: s_load_dwordx2 s[44:45], s[36:37], 0x9
8270 ; GFX7LESS-NEXT: s_mov_b32 s47, 0xf000
8271 ; GFX7LESS-NEXT: s_mov_b32 s46, -1
8272 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
8273 ; GFX7LESS-NEXT: buffer_load_dwordx2 v[0:1], off, s[44:47], 0
8274 ; GFX7LESS-NEXT: s_mov_b64 s[42:43], 0
8275 ; GFX7LESS-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
8276 ; GFX7LESS-NEXT: .LBB11_4: ; %atomicrmw.start
8277 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
8278 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
8279 ; GFX7LESS-NEXT: v_max_f64 v[2:3], v[0:1], v[0:1]
8280 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:4
8281 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0
8282 ; GFX7LESS-NEXT: s_add_u32 s8, s36, 44
8283 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
8284 ; GFX7LESS-NEXT: v_min_f64 v[0:1], v[2:3], v[41:42]
8285 ; GFX7LESS-NEXT: s_addc_u32 s9, s37, 0
8286 ; GFX7LESS-NEXT: s_getpc_b64 s[0:1]
8287 ; GFX7LESS-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8288 ; GFX7LESS-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8289 ; GFX7LESS-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
8290 ; GFX7LESS-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
8291 ; GFX7LESS-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8292 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
8293 ; GFX7LESS-NEXT: v_mov_b32_e32 v0, 8
8294 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
8295 ; GFX7LESS-NEXT: v_mov_b32_e32 v4, 0
8296 ; GFX7LESS-NEXT: v_mov_b32_e32 v5, 8
8297 ; GFX7LESS-NEXT: v_mov_b32_e32 v6, 0
8298 ; GFX7LESS-NEXT: v_mov_b32_e32 v7, 0
8299 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], s[38:39]
8300 ; GFX7LESS-NEXT: s_mov_b64 s[10:11], s[34:35]
8301 ; GFX7LESS-NEXT: s_mov_b32 s12, s41
8302 ; GFX7LESS-NEXT: s_mov_b32 s13, s40
8303 ; GFX7LESS-NEXT: s_mov_b32 s14, s33
8304 ; GFX7LESS-NEXT: v_mov_b32_e32 v31, v40
8305 ; GFX7LESS-NEXT: s_mov_b64 s[0:1], s[48:49]
8306 ; GFX7LESS-NEXT: s_mov_b64 s[2:3], s[50:51]
8307 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, s44
8308 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, s45
8309 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
8310 ; GFX7LESS-NEXT: s_swappc_b64 s[30:31], s[6:7]
8311 ; GFX7LESS-NEXT: v_and_b32_e32 v2, 1, v0
8312 ; GFX7LESS-NEXT: buffer_load_dword v0, off, s[48:51], 0
8313 ; GFX7LESS-NEXT: buffer_load_dword v1, off, s[48:51], 0 offset:4
8314 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 1, v2
8315 ; GFX7LESS-NEXT: s_or_b64 s[42:43], vcc, s[42:43]
8316 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[42:43]
8317 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB11_4
8318 ; GFX7LESS-NEXT: .LBB11_5:
8319 ; GFX7LESS-NEXT: s_endpgm
8321 ; GFX9-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8323 ; GFX9-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8324 ; GFX9-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8325 ; GFX9-NEXT: s_mov_b32 s50, -1
8326 ; GFX9-NEXT: s_mov_b32 s51, 0xe00000
8327 ; GFX9-NEXT: s_add_u32 s48, s48, s9
8328 ; GFX9-NEXT: s_addc_u32 s49, s49, 0
8329 ; GFX9-NEXT: s_mov_b64 s[36:37], s[2:3]
8330 ; GFX9-NEXT: s_mov_b32 s33, s8
8331 ; GFX9-NEXT: s_add_u32 s8, s36, 44
8332 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
8333 ; GFX9-NEXT: s_mov_b64 s[38:39], s[0:1]
8334 ; GFX9-NEXT: s_getpc_b64 s[0:1]
8335 ; GFX9-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8336 ; GFX9-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8337 ; GFX9-NEXT: s_mov_b32 s40, s7
8338 ; GFX9-NEXT: s_mov_b32 s41, s6
8339 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8340 ; GFX9-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8341 ; GFX9-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8342 ; GFX9-NEXT: s_mov_b64 s[34:35], s[4:5]
8343 ; GFX9-NEXT: v_or3_b32 v40, v0, v1, v2
8344 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
8345 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
8346 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
8347 ; GFX9-NEXT: s_mov_b32 s12, s41
8348 ; GFX9-NEXT: s_mov_b32 s13, s40
8349 ; GFX9-NEXT: s_mov_b32 s14, s33
8350 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
8351 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
8352 ; GFX9-NEXT: s_movk_i32 s32, 0x800
8353 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
8354 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
8355 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
8356 ; GFX9-NEXT: s_mov_b64 s[0:1], exec
8357 ; GFX9-NEXT: v_mov_b32_e32 v3, 0x7ff80000
8358 ; GFX9-NEXT: .LBB11_1: ; %ComputeLoop
8359 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
8360 ; GFX9-NEXT: s_ff1_i32_b64 s4, s[0:1]
8361 ; GFX9-NEXT: v_readlane_b32 s3, v1, s4
8362 ; GFX9-NEXT: v_readlane_b32 s2, v0, s4
8363 ; GFX9-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
8364 ; GFX9-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8365 ; GFX9-NEXT: s_lshl_b64 s[2:3], 1, s4
8366 ; GFX9-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
8367 ; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
8368 ; GFX9-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
8369 ; GFX9-NEXT: s_cbranch_scc1 .LBB11_1
8370 ; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
8371 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8372 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
8373 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
8374 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
8375 ; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
8376 ; GFX9-NEXT: s_cbranch_execz .LBB11_5
8377 ; GFX9-NEXT: ; %bb.3:
8378 ; GFX9-NEXT: s_load_dwordx2 s[42:43], s[36:37], 0x24
8379 ; GFX9-NEXT: v_mov_b32_e32 v0, 0
8380 ; GFX9-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
8381 ; GFX9-NEXT: s_mov_b64 s[44:45], 0
8382 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
8383 ; GFX9-NEXT: global_load_dwordx2 v[4:5], v0, s[42:43]
8384 ; GFX9-NEXT: .LBB11_4: ; %atomicrmw.start
8385 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
8386 ; GFX9-NEXT: s_waitcnt vmcnt(0)
8387 ; GFX9-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
8388 ; GFX9-NEXT: s_add_u32 s8, s36, 44
8389 ; GFX9-NEXT: s_addc_u32 s9, s37, 0
8390 ; GFX9-NEXT: s_getpc_b64 s[0:1]
8391 ; GFX9-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8392 ; GFX9-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8393 ; GFX9-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8394 ; GFX9-NEXT: s_mov_b64 s[0:1], s[48:49]
8395 ; GFX9-NEXT: buffer_store_dword v5, off, s[48:51], 0 offset:4
8396 ; GFX9-NEXT: buffer_store_dword v4, off, s[48:51], 0
8397 ; GFX9-NEXT: s_mov_b64 s[4:5], s[38:39]
8398 ; GFX9-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
8399 ; GFX9-NEXT: s_mov_b64 s[10:11], s[34:35]
8400 ; GFX9-NEXT: s_mov_b32 s12, s41
8401 ; GFX9-NEXT: s_mov_b32 s13, s40
8402 ; GFX9-NEXT: s_mov_b32 s14, s33
8403 ; GFX9-NEXT: v_mov_b32_e32 v31, v40
8404 ; GFX9-NEXT: s_mov_b64 s[2:3], s[50:51]
8405 ; GFX9-NEXT: v_mov_b32_e32 v2, s42
8406 ; GFX9-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
8407 ; GFX9-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
8408 ; GFX9-NEXT: v_mov_b32_e32 v0, 8
8409 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
8410 ; GFX9-NEXT: v_mov_b32_e32 v3, s43
8411 ; GFX9-NEXT: v_mov_b32_e32 v4, 0
8412 ; GFX9-NEXT: v_mov_b32_e32 v5, 8
8413 ; GFX9-NEXT: v_mov_b32_e32 v6, 0
8414 ; GFX9-NEXT: v_mov_b32_e32 v7, 0
8415 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
8416 ; GFX9-NEXT: s_swappc_b64 s[30:31], s[6:7]
8417 ; GFX9-NEXT: buffer_load_dword v4, off, s[48:51], 0
8418 ; GFX9-NEXT: buffer_load_dword v5, off, s[48:51], 0 offset:4
8419 ; GFX9-NEXT: v_and_b32_e32 v0, 1, v0
8420 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
8421 ; GFX9-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
8422 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[44:45]
8423 ; GFX9-NEXT: s_cbranch_execnz .LBB11_4
8424 ; GFX9-NEXT: .LBB11_5:
8425 ; GFX9-NEXT: s_endpgm
8427 ; GFX1064-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8429 ; GFX1064-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8430 ; GFX1064-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8431 ; GFX1064-NEXT: s_mov_b32 s50, -1
8432 ; GFX1064-NEXT: s_mov_b32 s51, 0x31e16000
8433 ; GFX1064-NEXT: s_add_u32 s48, s48, s9
8434 ; GFX1064-NEXT: s_mov_b64 s[34:35], s[2:3]
8435 ; GFX1064-NEXT: s_addc_u32 s49, s49, 0
8436 ; GFX1064-NEXT: s_mov_b32 s33, s8
8437 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
8438 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
8439 ; GFX1064-NEXT: s_mov_b64 s[38:39], s[0:1]
8440 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
8441 ; GFX1064-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8442 ; GFX1064-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8443 ; GFX1064-NEXT: s_mov_b32 s40, s7
8444 ; GFX1064-NEXT: s_mov_b32 s41, s6
8445 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8446 ; GFX1064-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8447 ; GFX1064-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8448 ; GFX1064-NEXT: s_mov_b64 s[36:37], s[4:5]
8449 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
8450 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
8451 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[36:37]
8452 ; GFX1064-NEXT: v_or3_b32 v40, v0, v1, v2
8453 ; GFX1064-NEXT: s_mov_b32 s12, s41
8454 ; GFX1064-NEXT: s_mov_b32 s13, s40
8455 ; GFX1064-NEXT: s_mov_b32 s14, s33
8456 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
8457 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
8458 ; GFX1064-NEXT: s_movk_i32 s32, 0x800
8459 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
8460 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
8461 ; GFX1064-NEXT: v_mov_b32_e32 v3, 0
8462 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0x7ff80000
8463 ; GFX1064-NEXT: s_mov_b64 s[0:1], exec
8464 ; GFX1064-NEXT: .LBB11_1: ; %ComputeLoop
8465 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
8466 ; GFX1064-NEXT: s_ff1_i32_b64 s4, s[0:1]
8467 ; GFX1064-NEXT: v_max_f64 v[2:3], v[3:4], v[3:4]
8468 ; GFX1064-NEXT: v_readlane_b32 s3, v1, s4
8469 ; GFX1064-NEXT: v_readlane_b32 s2, v0, s4
8470 ; GFX1064-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8471 ; GFX1064-NEXT: s_lshl_b64 s[2:3], 1, s4
8472 ; GFX1064-NEXT: s_andn2_b64 s[0:1], s[0:1], s[2:3]
8473 ; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
8474 ; GFX1064-NEXT: v_min_f64 v[3:4], v[2:3], v[4:5]
8475 ; GFX1064-NEXT: s_cbranch_scc1 .LBB11_1
8476 ; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
8477 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8478 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
8479 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
8480 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
8481 ; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
8482 ; GFX1064-NEXT: s_cbranch_execz .LBB11_5
8483 ; GFX1064-NEXT: ; %bb.3:
8484 ; GFX1064-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
8485 ; GFX1064-NEXT: v_mov_b32_e32 v0, 0
8486 ; GFX1064-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
8487 ; GFX1064-NEXT: s_mov_b64 s[44:45], 0
8488 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
8489 ; GFX1064-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
8490 ; GFX1064-NEXT: .LBB11_4: ; %atomicrmw.start
8491 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
8492 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
8493 ; GFX1064-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
8494 ; GFX1064-NEXT: s_add_u32 s8, s34, 44
8495 ; GFX1064-NEXT: s_addc_u32 s9, s35, 0
8496 ; GFX1064-NEXT: s_getpc_b64 s[0:1]
8497 ; GFX1064-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8498 ; GFX1064-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8499 ; GFX1064-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
8500 ; GFX1064-NEXT: buffer_store_dword v1, off, s[48:51], 0
8501 ; GFX1064-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8502 ; GFX1064-NEXT: v_mov_b32_e32 v31, v40
8503 ; GFX1064-NEXT: v_mov_b32_e32 v0, 8
8504 ; GFX1064-NEXT: v_mov_b32_e32 v1, 0
8505 ; GFX1064-NEXT: v_mov_b32_e32 v2, s42
8506 ; GFX1064-NEXT: v_mov_b32_e32 v5, 8
8507 ; GFX1064-NEXT: v_mov_b32_e32 v6, 0
8508 ; GFX1064-NEXT: v_mov_b32_e32 v7, 0
8509 ; GFX1064-NEXT: s_mov_b64 s[0:1], s[48:49]
8510 ; GFX1064-NEXT: s_mov_b64 s[4:5], s[38:39]
8511 ; GFX1064-NEXT: s_mov_b64 s[10:11], s[36:37]
8512 ; GFX1064-NEXT: s_mov_b32 s12, s41
8513 ; GFX1064-NEXT: s_mov_b32 s13, s40
8514 ; GFX1064-NEXT: s_mov_b32 s14, s33
8515 ; GFX1064-NEXT: s_mov_b64 s[2:3], s[50:51]
8516 ; GFX1064-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
8517 ; GFX1064-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
8518 ; GFX1064-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
8519 ; GFX1064-NEXT: v_mov_b32_e32 v3, s43
8520 ; GFX1064-NEXT: v_mov_b32_e32 v4, 0
8521 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
8522 ; GFX1064-NEXT: s_swappc_b64 s[30:31], s[6:7]
8523 ; GFX1064-NEXT: s_clause 0x1
8524 ; GFX1064-NEXT: buffer_load_dword v1, off, s[48:51], 0
8525 ; GFX1064-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
8526 ; GFX1064-NEXT: v_and_b32_e32 v0, 1, v0
8527 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
8528 ; GFX1064-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
8529 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[44:45]
8530 ; GFX1064-NEXT: s_cbranch_execnz .LBB11_4
8531 ; GFX1064-NEXT: .LBB11_5:
8532 ; GFX1064-NEXT: s_endpgm
8534 ; GFX1032-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8536 ; GFX1032-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8537 ; GFX1032-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8538 ; GFX1032-NEXT: s_mov_b32 s50, -1
8539 ; GFX1032-NEXT: s_mov_b32 s51, 0x31c16000
8540 ; GFX1032-NEXT: s_add_u32 s48, s48, s9
8541 ; GFX1032-NEXT: s_mov_b64 s[34:35], s[2:3]
8542 ; GFX1032-NEXT: s_addc_u32 s49, s49, 0
8543 ; GFX1032-NEXT: s_mov_b32 s33, s8
8544 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
8545 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
8546 ; GFX1032-NEXT: s_mov_b64 s[38:39], s[0:1]
8547 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
8548 ; GFX1032-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8549 ; GFX1032-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8550 ; GFX1032-NEXT: s_mov_b32 s40, s7
8551 ; GFX1032-NEXT: s_mov_b32 s41, s6
8552 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8553 ; GFX1032-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8554 ; GFX1032-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8555 ; GFX1032-NEXT: s_mov_b64 s[36:37], s[4:5]
8556 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
8557 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
8558 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[36:37]
8559 ; GFX1032-NEXT: v_or3_b32 v40, v0, v1, v2
8560 ; GFX1032-NEXT: s_mov_b32 s12, s41
8561 ; GFX1032-NEXT: s_mov_b32 s13, s40
8562 ; GFX1032-NEXT: s_mov_b32 s14, s33
8563 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
8564 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
8565 ; GFX1032-NEXT: s_movk_i32 s32, 0x400
8566 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
8567 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
8568 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
8569 ; GFX1032-NEXT: v_mov_b32_e32 v3, 0x7ff80000
8570 ; GFX1032-NEXT: s_mov_b32 s0, exec_lo
8571 ; GFX1032-NEXT: .LBB11_1: ; %ComputeLoop
8572 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
8573 ; GFX1032-NEXT: s_ff1_i32_b32 s1, s0
8574 ; GFX1032-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
8575 ; GFX1032-NEXT: v_readlane_b32 s3, v1, s1
8576 ; GFX1032-NEXT: v_readlane_b32 s2, v0, s1
8577 ; GFX1032-NEXT: s_lshl_b32 s1, 1, s1
8578 ; GFX1032-NEXT: s_andn2_b32 s0, s0, s1
8579 ; GFX1032-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8580 ; GFX1032-NEXT: s_cmp_lg_u32 s0, 0
8581 ; GFX1032-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
8582 ; GFX1032-NEXT: s_cbranch_scc1 .LBB11_1
8583 ; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
8584 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8585 ; GFX1032-NEXT: s_mov_b32 s44, 0
8586 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
8587 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
8588 ; GFX1032-NEXT: s_xor_b32 s0, exec_lo, s0
8589 ; GFX1032-NEXT: s_cbranch_execz .LBB11_5
8590 ; GFX1032-NEXT: ; %bb.3:
8591 ; GFX1032-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
8592 ; GFX1032-NEXT: v_mov_b32_e32 v0, 0
8593 ; GFX1032-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
8594 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
8595 ; GFX1032-NEXT: global_load_dwordx2 v[4:5], v0, s[42:43]
8596 ; GFX1032-NEXT: .LBB11_4: ; %atomicrmw.start
8597 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
8598 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
8599 ; GFX1032-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
8600 ; GFX1032-NEXT: s_add_u32 s8, s34, 44
8601 ; GFX1032-NEXT: s_addc_u32 s9, s35, 0
8602 ; GFX1032-NEXT: s_getpc_b64 s[0:1]
8603 ; GFX1032-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8604 ; GFX1032-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8605 ; GFX1032-NEXT: buffer_store_dword v5, off, s[48:51], 0 offset:4
8606 ; GFX1032-NEXT: buffer_store_dword v4, off, s[48:51], 0
8607 ; GFX1032-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8608 ; GFX1032-NEXT: v_mov_b32_e32 v31, v40
8609 ; GFX1032-NEXT: v_mov_b32_e32 v2, s42
8610 ; GFX1032-NEXT: v_mov_b32_e32 v3, s43
8611 ; GFX1032-NEXT: v_mov_b32_e32 v4, 0
8612 ; GFX1032-NEXT: v_mov_b32_e32 v5, 8
8613 ; GFX1032-NEXT: v_mov_b32_e32 v6, 0
8614 ; GFX1032-NEXT: v_mov_b32_e32 v7, 0
8615 ; GFX1032-NEXT: s_mov_b64 s[0:1], s[48:49]
8616 ; GFX1032-NEXT: s_mov_b64 s[4:5], s[38:39]
8617 ; GFX1032-NEXT: s_mov_b64 s[10:11], s[36:37]
8618 ; GFX1032-NEXT: s_mov_b32 s12, s41
8619 ; GFX1032-NEXT: s_mov_b32 s13, s40
8620 ; GFX1032-NEXT: s_mov_b32 s14, s33
8621 ; GFX1032-NEXT: s_mov_b64 s[2:3], s[50:51]
8622 ; GFX1032-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
8623 ; GFX1032-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
8624 ; GFX1032-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
8625 ; GFX1032-NEXT: v_mov_b32_e32 v0, 8
8626 ; GFX1032-NEXT: v_mov_b32_e32 v1, 0
8627 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
8628 ; GFX1032-NEXT: s_swappc_b64 s[30:31], s[6:7]
8629 ; GFX1032-NEXT: s_clause 0x1
8630 ; GFX1032-NEXT: buffer_load_dword v4, off, s[48:51], 0
8631 ; GFX1032-NEXT: buffer_load_dword v5, off, s[48:51], 0 offset:4
8632 ; GFX1032-NEXT: v_and_b32_e32 v0, 1, v0
8633 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
8634 ; GFX1032-NEXT: s_or_b32 s44, vcc_lo, s44
8635 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
8636 ; GFX1032-NEXT: s_cbranch_execnz .LBB11_4
8637 ; GFX1032-NEXT: .LBB11_5:
8638 ; GFX1032-NEXT: s_endpgm
8640 ; GFX1164-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8642 ; GFX1164-NEXT: s_mov_b64 s[34:35], s[2:3]
8643 ; GFX1164-NEXT: s_mov_b32 s33, s8
8644 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
8645 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
8646 ; GFX1164-NEXT: s_mov_b64 s[38:39], s[0:1]
8647 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
8648 ; GFX1164-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8649 ; GFX1164-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8650 ; GFX1164-NEXT: v_mov_b32_e32 v31, v0
8651 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8652 ; GFX1164-NEXT: s_mov_b64 s[36:37], s[4:5]
8653 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
8654 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[36:37]
8655 ; GFX1164-NEXT: s_mov_b32 s12, s6
8656 ; GFX1164-NEXT: s_mov_b32 s13, s7
8657 ; GFX1164-NEXT: s_mov_b32 s14, s33
8658 ; GFX1164-NEXT: s_mov_b32 s32, 32
8659 ; GFX1164-NEXT: v_mov_b32_e32 v40, v0
8660 ; GFX1164-NEXT: s_mov_b32 s40, s7
8661 ; GFX1164-NEXT: s_mov_b32 s41, s6
8662 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
8663 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
8664 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
8665 ; GFX1164-NEXT: v_mov_b32_e32 v3, 0x7ff80000
8666 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
8667 ; GFX1164-NEXT: .LBB11_1: ; %ComputeLoop
8668 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
8669 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8670 ; GFX1164-NEXT: s_ctz_i32_b64 s4, s[0:1]
8671 ; GFX1164-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
8672 ; GFX1164-NEXT: v_readlane_b32 s3, v1, s4
8673 ; GFX1164-NEXT: v_readlane_b32 s2, v0, s4
8674 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
8675 ; GFX1164-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8676 ; GFX1164-NEXT: s_lshl_b64 s[2:3], 1, s4
8677 ; GFX1164-NEXT: s_and_not1_b64 s[0:1], s[0:1], s[2:3]
8678 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8679 ; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
8680 ; GFX1164-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
8681 ; GFX1164-NEXT: s_cbranch_scc1 .LBB11_1
8682 ; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
8683 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8684 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
8685 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8686 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
8687 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
8688 ; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
8689 ; GFX1164-NEXT: s_cbranch_execz .LBB11_5
8690 ; GFX1164-NEXT: ; %bb.3:
8691 ; GFX1164-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
8692 ; GFX1164-NEXT: v_mov_b32_e32 v0, 0
8693 ; GFX1164-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
8694 ; GFX1164-NEXT: s_mov_b64 s[44:45], 0
8695 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
8696 ; GFX1164-NEXT: global_load_b64 v[4:5], v0, s[42:43]
8697 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x1
8698 ; GFX1164-NEXT: .p2align 6
8699 ; GFX1164-NEXT: .LBB11_4: ; %atomicrmw.start
8700 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
8701 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
8702 ; GFX1164-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
8703 ; GFX1164-NEXT: s_add_u32 s8, s34, 44
8704 ; GFX1164-NEXT: s_addc_u32 s9, s35, 0
8705 ; GFX1164-NEXT: s_getpc_b64 s[0:1]
8706 ; GFX1164-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8707 ; GFX1164-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8708 ; GFX1164-NEXT: v_mov_b32_e32 v31, v40
8709 ; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8710 ; GFX1164-NEXT: v_mov_b32_e32 v2, s42
8711 ; GFX1164-NEXT: v_mov_b32_e32 v3, s43
8712 ; GFX1164-NEXT: v_mov_b32_e32 v6, 0
8713 ; GFX1164-NEXT: v_mov_b32_e32 v7, 0
8714 ; GFX1164-NEXT: s_mov_b64 s[4:5], s[38:39]
8715 ; GFX1164-NEXT: s_mov_b64 s[10:11], s[36:37]
8716 ; GFX1164-NEXT: s_mov_b32 s12, s41
8717 ; GFX1164-NEXT: s_mov_b32 s13, s40
8718 ; GFX1164-NEXT: s_mov_b32 s14, s33
8719 ; GFX1164-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
8720 ; GFX1164-NEXT: s_clause 0x1
8721 ; GFX1164-NEXT: scratch_store_b64 off, v[4:5], off
8722 ; GFX1164-NEXT: scratch_store_b64 off, v[0:1], off offset:8
8723 ; GFX1164-NEXT: v_mov_b32_e32 v0, 8
8724 ; GFX1164-NEXT: v_mov_b32_e32 v1, 0
8725 ; GFX1164-NEXT: v_mov_b32_e32 v4, 0
8726 ; GFX1164-NEXT: v_mov_b32_e32 v5, 8
8727 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
8728 ; GFX1164-NEXT: s_swappc_b64 s[30:31], s[0:1]
8729 ; GFX1164-NEXT: scratch_load_b64 v[4:5], off, off
8730 ; GFX1164-NEXT: v_and_b32_e32 v0, 1, v0
8731 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
8732 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
8733 ; GFX1164-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
8734 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[44:45]
8735 ; GFX1164-NEXT: s_cbranch_execnz .LBB11_4
8736 ; GFX1164-NEXT: .LBB11_5:
8737 ; GFX1164-NEXT: s_set_inst_prefetch_distance 0x2
8738 ; GFX1164-NEXT: s_endpgm
8740 ; GFX1132-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8742 ; GFX1132-NEXT: s_mov_b64 s[34:35], s[2:3]
8743 ; GFX1132-NEXT: s_mov_b64 s[38:39], s[0:1]
8744 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
8745 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
8746 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
8747 ; GFX1132-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8748 ; GFX1132-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8749 ; GFX1132-NEXT: v_mov_b32_e32 v31, v0
8750 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8751 ; GFX1132-NEXT: s_mov_b64 s[36:37], s[4:5]
8752 ; GFX1132-NEXT: s_mov_b32 s40, s14
8753 ; GFX1132-NEXT: s_mov_b32 s41, s13
8754 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
8755 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[36:37]
8756 ; GFX1132-NEXT: s_mov_b32 s12, s13
8757 ; GFX1132-NEXT: s_mov_b32 s13, s14
8758 ; GFX1132-NEXT: s_mov_b32 s14, s15
8759 ; GFX1132-NEXT: s_mov_b32 s32, 32
8760 ; GFX1132-NEXT: s_mov_b32 s33, s15
8761 ; GFX1132-NEXT: v_mov_b32_e32 v40, v0
8762 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
8763 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
8764 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
8765 ; GFX1132-NEXT: v_mov_b32_e32 v3, 0x7ff80000
8766 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
8767 ; GFX1132-NEXT: .LBB11_1: ; %ComputeLoop
8768 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
8769 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8770 ; GFX1132-NEXT: s_ctz_i32_b32 s1, s0
8771 ; GFX1132-NEXT: v_max_f64 v[2:3], v[2:3], v[2:3]
8772 ; GFX1132-NEXT: v_readlane_b32 s3, v1, s1
8773 ; GFX1132-NEXT: v_readlane_b32 s2, v0, s1
8774 ; GFX1132-NEXT: s_lshl_b32 s1, 1, s1
8775 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
8776 ; GFX1132-NEXT: s_and_not1_b32 s0, s0, s1
8777 ; GFX1132-NEXT: v_max_f64 v[4:5], s[2:3], s[2:3]
8778 ; GFX1132-NEXT: s_cmp_lg_u32 s0, 0
8779 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
8780 ; GFX1132-NEXT: v_min_f64 v[2:3], v[2:3], v[4:5]
8781 ; GFX1132-NEXT: s_cbranch_scc1 .LBB11_1
8782 ; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
8783 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
8784 ; GFX1132-NEXT: s_mov_b32 s44, 0
8785 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
8786 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
8787 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
8788 ; GFX1132-NEXT: s_xor_b32 s0, exec_lo, s0
8789 ; GFX1132-NEXT: s_cbranch_execz .LBB11_5
8790 ; GFX1132-NEXT: ; %bb.3:
8791 ; GFX1132-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
8792 ; GFX1132-NEXT: v_mov_b32_e32 v0, 0
8793 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_4)
8794 ; GFX1132-NEXT: v_max_f64 v[41:42], v[2:3], v[2:3]
8795 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
8796 ; GFX1132-NEXT: global_load_b64 v[4:5], v0, s[42:43]
8797 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x1
8798 ; GFX1132-NEXT: .p2align 6
8799 ; GFX1132-NEXT: .LBB11_4: ; %atomicrmw.start
8800 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
8801 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
8802 ; GFX1132-NEXT: v_max_f64 v[0:1], v[4:5], v[4:5]
8803 ; GFX1132-NEXT: s_add_u32 s8, s34, 44
8804 ; GFX1132-NEXT: s_addc_u32 s9, s35, 0
8805 ; GFX1132-NEXT: s_getpc_b64 s[0:1]
8806 ; GFX1132-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8807 ; GFX1132-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8808 ; GFX1132-NEXT: v_mov_b32_e32 v31, v40
8809 ; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
8810 ; GFX1132-NEXT: v_mov_b32_e32 v3, s43
8811 ; GFX1132-NEXT: v_mov_b32_e32 v7, 0
8812 ; GFX1132-NEXT: s_mov_b64 s[4:5], s[38:39]
8813 ; GFX1132-NEXT: s_mov_b64 s[10:11], s[36:37]
8814 ; GFX1132-NEXT: s_mov_b32 s12, s41
8815 ; GFX1132-NEXT: s_mov_b32 s13, s40
8816 ; GFX1132-NEXT: s_mov_b32 s14, s33
8817 ; GFX1132-NEXT: v_mov_b32_e32 v2, s42
8818 ; GFX1132-NEXT: v_mov_b32_e32 v6, 0
8819 ; GFX1132-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
8820 ; GFX1132-NEXT: s_clause 0x1
8821 ; GFX1132-NEXT: scratch_store_b64 off, v[4:5], off
8822 ; GFX1132-NEXT: scratch_store_b64 off, v[0:1], off offset:8
8823 ; GFX1132-NEXT: v_mov_b32_e32 v4, 0
8824 ; GFX1132-NEXT: v_dual_mov_b32 v0, 8 :: v_dual_mov_b32 v1, 0
8825 ; GFX1132-NEXT: v_mov_b32_e32 v5, 8
8826 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
8827 ; GFX1132-NEXT: s_swappc_b64 s[30:31], s[0:1]
8828 ; GFX1132-NEXT: scratch_load_b64 v[4:5], off, off
8829 ; GFX1132-NEXT: v_and_b32_e32 v0, 1, v0
8830 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
8831 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
8832 ; GFX1132-NEXT: s_or_b32 s44, vcc_lo, s44
8833 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
8834 ; GFX1132-NEXT: s_cbranch_execnz .LBB11_4
8835 ; GFX1132-NEXT: .LBB11_5:
8836 ; GFX1132-NEXT: s_set_inst_prefetch_distance 0x2
8837 ; GFX1132-NEXT: s_endpgm
8839 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8840 ; GFX7LESS-DPP: ; %bb.0:
8841 ; GFX7LESS-DPP-NEXT: s_movk_i32 s32, 0x800
8842 ; GFX7LESS-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8843 ; GFX7LESS-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8844 ; GFX7LESS-DPP-NEXT: s_mov_b32 s50, -1
8845 ; GFX7LESS-DPP-NEXT: s_mov_b32 s51, 0xe8f000
8846 ; GFX7LESS-DPP-NEXT: s_add_u32 s48, s48, s9
8847 ; GFX7LESS-DPP-NEXT: s_addc_u32 s49, s49, 0
8848 ; GFX7LESS-DPP-NEXT: s_mov_b32 s33, s8
8849 ; GFX7LESS-DPP-NEXT: s_mov_b32 s40, s7
8850 ; GFX7LESS-DPP-NEXT: s_mov_b32 s41, s6
8851 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
8852 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
8853 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
8854 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[44:45], s[2:3], 0x9
8855 ; GFX7LESS-DPP-NEXT: s_mov_b32 s47, 0xf000
8856 ; GFX7LESS-DPP-NEXT: s_mov_b32 s46, -1
8857 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
8858 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
8859 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
8860 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8861 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8862 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8863 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8864 ; GFX7LESS-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8865 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v0, v0, v1
8866 ; GFX7LESS-DPP-NEXT: v_or_b32_e32 v40, v0, v2
8867 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8868 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8869 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
8870 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
8871 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
8872 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
8873 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
8874 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
8875 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
8876 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
8877 ; GFX7LESS-DPP-NEXT: buffer_load_dwordx2 v[2:3], off, s[44:47], 0
8878 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[42:43], 0
8879 ; GFX7LESS-DPP-NEXT: v_max_f64 v[41:42], v[0:1], v[0:1]
8880 ; GFX7LESS-DPP-NEXT: .LBB11_1: ; %atomicrmw.start
8881 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
8882 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
8883 ; GFX7LESS-DPP-NEXT: v_max_f64 v[0:1], v[2:3], v[2:3]
8884 ; GFX7LESS-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:4
8885 ; GFX7LESS-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0
8886 ; GFX7LESS-DPP-NEXT: s_add_u32 s8, s36, 44
8887 ; GFX7LESS-DPP-NEXT: v_min_f64 v[0:1], v[0:1], v[41:42]
8888 ; GFX7LESS-DPP-NEXT: s_addc_u32 s9, s37, 0
8889 ; GFX7LESS-DPP-NEXT: s_getpc_b64 s[0:1]
8890 ; GFX7LESS-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
8891 ; GFX7LESS-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
8892 ; GFX7LESS-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0 offset:12
8893 ; GFX7LESS-DPP-NEXT: buffer_store_dword v0, off, s[48:51], 0 offset:8
8894 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8895 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
8896 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v0, 8
8897 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, 0
8898 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v4, 0
8899 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v5, 8
8900 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v6, 0
8901 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v7, 0
8902 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8903 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8904 ; GFX7LESS-DPP-NEXT: s_mov_b32 s12, s41
8905 ; GFX7LESS-DPP-NEXT: s_mov_b32 s13, s40
8906 ; GFX7LESS-DPP-NEXT: s_mov_b32 s14, s33
8907 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v31, v40
8908 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
8909 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
8910 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, s44
8911 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, s45
8912 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
8913 ; GFX7LESS-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
8914 ; GFX7LESS-DPP-NEXT: v_and_b32_e32 v0, 1, v0
8915 ; GFX7LESS-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0
8916 ; GFX7LESS-DPP-NEXT: buffer_load_dword v3, off, s[48:51], 0 offset:4
8917 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
8918 ; GFX7LESS-DPP-NEXT: s_or_b64 s[42:43], vcc, s[42:43]
8919 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[42:43]
8920 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB11_1
8921 ; GFX7LESS-DPP-NEXT: ; %bb.2: ; %atomicrmw.end
8922 ; GFX7LESS-DPP-NEXT: s_endpgm
8924 ; GFX9-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
8925 ; GFX9-DPP: ; %bb.0:
8926 ; GFX9-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
8927 ; GFX9-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
8928 ; GFX9-DPP-NEXT: s_mov_b32 s50, -1
8929 ; GFX9-DPP-NEXT: s_mov_b32 s51, 0xe00000
8930 ; GFX9-DPP-NEXT: s_add_u32 s48, s48, s9
8931 ; GFX9-DPP-NEXT: s_addc_u32 s49, s49, 0
8932 ; GFX9-DPP-NEXT: s_mov_b64 s[36:37], s[2:3]
8933 ; GFX9-DPP-NEXT: s_mov_b32 s33, s8
8934 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
8935 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
8936 ; GFX9-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
8937 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
8938 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
8939 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
8940 ; GFX9-DPP-NEXT: s_mov_b32 s40, s7
8941 ; GFX9-DPP-NEXT: s_mov_b32 s41, s6
8942 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
8943 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
8944 ; GFX9-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
8945 ; GFX9-DPP-NEXT: s_mov_b64 s[34:35], s[4:5]
8946 ; GFX9-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
8947 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
8948 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
8949 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
8950 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
8951 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
8952 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
8953 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
8954 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
8955 ; GFX9-DPP-NEXT: s_movk_i32 s32, 0x800
8956 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
8957 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
8958 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
8959 ; GFX9-DPP-NEXT: v_mov_b32_e32 v8, 0
8960 ; GFX9-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
8961 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
8962 ; GFX9-DPP-NEXT: v_mov_b32_e32 v10, v0
8963 ; GFX9-DPP-NEXT: v_mov_b32_e32 v11, v1
8964 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
8965 ; GFX9-DPP-NEXT: v_mov_b32_e32 v10, v8
8966 ; GFX9-DPP-NEXT: v_mov_b32_e32 v11, v9
8967 ; GFX9-DPP-NEXT: s_not_b64 exec, exec
8968 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
8969 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
8970 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
8971 ; GFX9-DPP-NEXT: s_nop 0
8972 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:1 row_mask:0xf bank_mask:0xf
8973 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:1 row_mask:0xf bank_mask:0xf
8974 ; GFX9-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
8975 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
8976 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
8977 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
8978 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
8979 ; GFX9-DPP-NEXT: s_nop 0
8980 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:2 row_mask:0xf bank_mask:0xf
8981 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:2 row_mask:0xf bank_mask:0xf
8982 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
8983 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
8984 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
8985 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
8986 ; GFX9-DPP-NEXT: s_nop 0
8987 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:4 row_mask:0xf bank_mask:0xf
8988 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:4 row_mask:0xf bank_mask:0xf
8989 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
8990 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
8991 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
8992 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
8993 ; GFX9-DPP-NEXT: s_nop 0
8994 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_shr:8 row_mask:0xf bank_mask:0xf
8995 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_shr:8 row_mask:0xf bank_mask:0xf
8996 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
8997 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
8998 ; GFX9-DPP-NEXT: v_mov_b32_e32 v12, v8
8999 ; GFX9-DPP-NEXT: v_mov_b32_e32 v13, v9
9000 ; GFX9-DPP-NEXT: s_nop 0
9001 ; GFX9-DPP-NEXT: v_mov_b32_dpp v12, v10 row_bcast:15 row_mask:0xa bank_mask:0xf
9002 ; GFX9-DPP-NEXT: v_mov_b32_dpp v13, v11 row_bcast:15 row_mask:0xa bank_mask:0xf
9003 ; GFX9-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9004 ; GFX9-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9005 ; GFX9-DPP-NEXT: s_nop 1
9006 ; GFX9-DPP-NEXT: v_mov_b32_dpp v8, v10 row_bcast:31 row_mask:0xc bank_mask:0xf
9007 ; GFX9-DPP-NEXT: v_mov_b32_dpp v9, v11 row_bcast:31 row_mask:0xc bank_mask:0xf
9008 ; GFX9-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
9009 ; GFX9-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9010 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
9011 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9012 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9013 ; GFX9-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
9014 ; GFX9-DPP-NEXT: v_readlane_b32 s43, v9, 63
9015 ; GFX9-DPP-NEXT: v_readlane_b32 s42, v8, 63
9016 ; GFX9-DPP-NEXT: s_mov_b64 exec, s[0:1]
9017 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9018 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
9019 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB11_3
9020 ; GFX9-DPP-NEXT: ; %bb.1:
9021 ; GFX9-DPP-NEXT: s_load_dwordx2 s[44:45], s[36:37], 0x24
9022 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 0
9023 ; GFX9-DPP-NEXT: s_mov_b64 s[46:47], 0
9024 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
9025 ; GFX9-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[44:45]
9026 ; GFX9-DPP-NEXT: .LBB11_2: ; %atomicrmw.start
9027 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9028 ; GFX9-DPP-NEXT: v_max_f64 v[3:4], s[42:43], s[42:43]
9029 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
9030 ; GFX9-DPP-NEXT: v_max_f64 v[5:6], v[1:2], v[1:2]
9031 ; GFX9-DPP-NEXT: s_add_u32 s8, s36, 44
9032 ; GFX9-DPP-NEXT: s_addc_u32 s9, s37, 0
9033 ; GFX9-DPP-NEXT: s_getpc_b64 s[0:1]
9034 ; GFX9-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
9035 ; GFX9-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
9036 ; GFX9-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
9037 ; GFX9-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
9038 ; GFX9-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
9039 ; GFX9-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
9040 ; GFX9-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9041 ; GFX9-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
9042 ; GFX9-DPP-NEXT: s_mov_b64 s[10:11], s[34:35]
9043 ; GFX9-DPP-NEXT: s_mov_b32 s12, s41
9044 ; GFX9-DPP-NEXT: s_mov_b32 s13, s40
9045 ; GFX9-DPP-NEXT: s_mov_b32 s14, s33
9046 ; GFX9-DPP-NEXT: v_mov_b32_e32 v31, v40
9047 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
9048 ; GFX9-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
9049 ; GFX9-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
9050 ; GFX9-DPP-NEXT: v_mov_b32_e32 v0, 8
9051 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, 0
9052 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, s44
9053 ; GFX9-DPP-NEXT: v_mov_b32_e32 v3, s45
9054 ; GFX9-DPP-NEXT: v_mov_b32_e32 v4, 0
9055 ; GFX9-DPP-NEXT: v_mov_b32_e32 v5, 8
9056 ; GFX9-DPP-NEXT: v_mov_b32_e32 v6, 0
9057 ; GFX9-DPP-NEXT: v_mov_b32_e32 v7, 0
9058 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
9059 ; GFX9-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
9060 ; GFX9-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
9061 ; GFX9-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
9062 ; GFX9-DPP-NEXT: v_and_b32_e32 v0, 1, v0
9063 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
9064 ; GFX9-DPP-NEXT: s_or_b64 s[46:47], vcc, s[46:47]
9065 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[46:47]
9066 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB11_2
9067 ; GFX9-DPP-NEXT: .LBB11_3:
9068 ; GFX9-DPP-NEXT: s_endpgm
9070 ; GFX1064-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
9071 ; GFX1064-DPP: ; %bb.0:
9072 ; GFX1064-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
9073 ; GFX1064-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
9074 ; GFX1064-DPP-NEXT: s_mov_b32 s50, -1
9075 ; GFX1064-DPP-NEXT: s_mov_b32 s51, 0x31e16000
9076 ; GFX1064-DPP-NEXT: s_add_u32 s48, s48, s9
9077 ; GFX1064-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
9078 ; GFX1064-DPP-NEXT: s_addc_u32 s49, s49, 0
9079 ; GFX1064-DPP-NEXT: s_mov_b32 s33, s8
9080 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
9081 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
9082 ; GFX1064-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
9083 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
9084 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
9085 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
9086 ; GFX1064-DPP-NEXT: s_mov_b32 s40, s7
9087 ; GFX1064-DPP-NEXT: s_mov_b32 s41, s6
9088 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
9089 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
9090 ; GFX1064-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
9091 ; GFX1064-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
9092 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
9093 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9094 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9095 ; GFX1064-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
9096 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
9097 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
9098 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
9099 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
9100 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
9101 ; GFX1064-DPP-NEXT: s_movk_i32 s32, 0x800
9102 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
9103 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
9104 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
9105 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v8, 0
9106 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
9107 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
9108 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v0
9109 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v1
9110 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
9111 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v8
9112 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v9
9113 ; GFX1064-DPP-NEXT: s_not_b64 exec, exec
9114 ; GFX1064-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
9115 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
9116 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
9117 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
9118 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
9119 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9120 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9121 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9122 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
9123 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
9124 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
9125 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
9126 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9127 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9128 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v12, v8
9129 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v13, v9
9130 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
9131 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
9132 ; GFX1064-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9133 ; GFX1064-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9134 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
9135 ; GFX1064-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
9136 ; GFX1064-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
9137 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9138 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v11, v9
9139 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v10, v8
9140 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
9141 ; GFX1064-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
9142 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9143 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
9144 ; GFX1064-DPP-NEXT: v_readlane_b32 s3, v9, 0
9145 ; GFX1064-DPP-NEXT: v_readlane_b32 s5, v9, 32
9146 ; GFX1064-DPP-NEXT: v_readlane_b32 s4, v8, 32
9147 ; GFX1064-DPP-NEXT: v_readlane_b32 s2, v8, 0
9148 ; GFX1064-DPP-NEXT: v_max_f64 v[8:9], s[4:5], s[4:5]
9149 ; GFX1064-DPP-NEXT: v_max_f64 v[10:11], s[2:3], s[2:3]
9150 ; GFX1064-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9151 ; GFX1064-DPP-NEXT: s_mov_b64 exec, s[0:1]
9152 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9153 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v41, v8
9154 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v42, v9
9155 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9156 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9157 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
9158 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB11_3
9159 ; GFX1064-DPP-NEXT: ; %bb.1:
9160 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
9161 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 0
9162 ; GFX1064-DPP-NEXT: s_mov_b64 s[44:45], 0
9163 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
9164 ; GFX1064-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
9165 ; GFX1064-DPP-NEXT: .LBB11_2: ; %atomicrmw.start
9166 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9167 ; GFX1064-DPP-NEXT: v_max_f64 v[3:4], v[41:42], v[41:42]
9168 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
9169 ; GFX1064-DPP-NEXT: v_max_f64 v[5:6], v[1:2], v[1:2]
9170 ; GFX1064-DPP-NEXT: s_add_u32 s8, s34, 44
9171 ; GFX1064-DPP-NEXT: s_addc_u32 s9, s35, 0
9172 ; GFX1064-DPP-NEXT: s_getpc_b64 s[0:1]
9173 ; GFX1064-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
9174 ; GFX1064-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
9175 ; GFX1064-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
9176 ; GFX1064-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
9177 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
9178 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v31, v40
9179 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v0, 8
9180 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, 0
9181 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, s42
9182 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v7, 0
9183 ; GFX1064-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
9184 ; GFX1064-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9185 ; GFX1064-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9186 ; GFX1064-DPP-NEXT: s_mov_b32 s12, s41
9187 ; GFX1064-DPP-NEXT: s_mov_b32 s13, s40
9188 ; GFX1064-DPP-NEXT: s_mov_b32 s14, s33
9189 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
9190 ; GFX1064-DPP-NEXT: v_min_f64 v[3:4], v[5:6], v[3:4]
9191 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v5, 8
9192 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v6, 0
9193 ; GFX1064-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
9194 ; GFX1064-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
9195 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v3, s43
9196 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v4, 0
9197 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
9198 ; GFX1064-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
9199 ; GFX1064-DPP-NEXT: s_clause 0x1
9200 ; GFX1064-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
9201 ; GFX1064-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
9202 ; GFX1064-DPP-NEXT: v_and_b32_e32 v0, 1, v0
9203 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
9204 ; GFX1064-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
9205 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[44:45]
9206 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB11_2
9207 ; GFX1064-DPP-NEXT: .LBB11_3:
9208 ; GFX1064-DPP-NEXT: s_endpgm
9210 ; GFX1032-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
9211 ; GFX1032-DPP: ; %bb.0:
9212 ; GFX1032-DPP-NEXT: s_mov_b32 s48, SCRATCH_RSRC_DWORD0
9213 ; GFX1032-DPP-NEXT: s_mov_b32 s49, SCRATCH_RSRC_DWORD1
9214 ; GFX1032-DPP-NEXT: s_mov_b32 s50, -1
9215 ; GFX1032-DPP-NEXT: s_mov_b32 s51, 0x31c16000
9216 ; GFX1032-DPP-NEXT: s_add_u32 s48, s48, s9
9217 ; GFX1032-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
9218 ; GFX1032-DPP-NEXT: s_addc_u32 s49, s49, 0
9219 ; GFX1032-DPP-NEXT: s_mov_b32 s33, s8
9220 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
9221 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
9222 ; GFX1032-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
9223 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
9224 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
9225 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
9226 ; GFX1032-DPP-NEXT: s_mov_b32 s40, s7
9227 ; GFX1032-DPP-NEXT: s_mov_b32 s41, s6
9228 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
9229 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v2, 20, v2
9230 ; GFX1032-DPP-NEXT: v_lshlrev_b32_e32 v1, 10, v1
9231 ; GFX1032-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
9232 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
9233 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9234 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9235 ; GFX1032-DPP-NEXT: v_or3_b32 v40, v0, v1, v2
9236 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
9237 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
9238 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
9239 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
9240 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
9241 ; GFX1032-DPP-NEXT: s_movk_i32 s32, 0x400
9242 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
9243 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
9244 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
9245 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v8, 0
9246 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
9247 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
9248 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v0
9249 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v1
9250 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
9251 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v8
9252 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v9
9253 ; GFX1032-DPP-NEXT: s_not_b32 exec_lo, exec_lo
9254 ; GFX1032-DPP-NEXT: s_or_saveexec_b32 s0, -1
9255 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
9256 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
9257 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
9258 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
9259 ; GFX1032-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9260 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9261 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9262 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
9263 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
9264 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
9265 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
9266 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9267 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9268 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v12, v8
9269 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v13, v9
9270 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
9271 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
9272 ; GFX1032-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9273 ; GFX1032-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9274 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
9275 ; GFX1032-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
9276 ; GFX1032-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
9277 ; GFX1032-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9278 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v11, v9
9279 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v10, v8
9280 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
9281 ; GFX1032-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
9282 ; GFX1032-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9283 ; GFX1032-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
9284 ; GFX1032-DPP-NEXT: s_mov_b32 exec_lo, s0
9285 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9286 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, v8
9287 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, v9
9288 ; GFX1032-DPP-NEXT: s_mov_b32 s44, 0
9289 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
9290 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
9291 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB11_3
9292 ; GFX1032-DPP-NEXT: ; %bb.1:
9293 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[42:43], s[34:35], 0x24
9294 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 0
9295 ; GFX1032-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
9296 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
9297 ; GFX1032-DPP-NEXT: global_load_dwordx2 v[1:2], v0, s[42:43]
9298 ; GFX1032-DPP-NEXT: .LBB11_2: ; %atomicrmw.start
9299 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9300 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
9301 ; GFX1032-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
9302 ; GFX1032-DPP-NEXT: s_add_u32 s8, s34, 44
9303 ; GFX1032-DPP-NEXT: s_addc_u32 s9, s35, 0
9304 ; GFX1032-DPP-NEXT: s_getpc_b64 s[0:1]
9305 ; GFX1032-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
9306 ; GFX1032-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
9307 ; GFX1032-DPP-NEXT: buffer_store_dword v2, off, s[48:51], 0 offset:4
9308 ; GFX1032-DPP-NEXT: buffer_store_dword v1, off, s[48:51], 0
9309 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[6:7], s[0:1], 0x0
9310 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v31, v40
9311 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v0, 8
9312 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, 0
9313 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, s42
9314 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v5, 8
9315 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v6, 0
9316 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v7, 0
9317 ; GFX1032-DPP-NEXT: s_mov_b64 s[0:1], s[48:49]
9318 ; GFX1032-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9319 ; GFX1032-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9320 ; GFX1032-DPP-NEXT: s_mov_b32 s12, s41
9321 ; GFX1032-DPP-NEXT: s_mov_b32 s13, s40
9322 ; GFX1032-DPP-NEXT: s_mov_b32 s14, s33
9323 ; GFX1032-DPP-NEXT: s_mov_b64 s[2:3], s[50:51]
9324 ; GFX1032-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
9325 ; GFX1032-DPP-NEXT: buffer_store_dword v4, off, s[48:51], 0 offset:12
9326 ; GFX1032-DPP-NEXT: buffer_store_dword v3, off, s[48:51], 0 offset:8
9327 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v3, s43
9328 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v4, 0
9329 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
9330 ; GFX1032-DPP-NEXT: s_swappc_b64 s[30:31], s[6:7]
9331 ; GFX1032-DPP-NEXT: s_clause 0x1
9332 ; GFX1032-DPP-NEXT: buffer_load_dword v1, off, s[48:51], 0
9333 ; GFX1032-DPP-NEXT: buffer_load_dword v2, off, s[48:51], 0 offset:4
9334 ; GFX1032-DPP-NEXT: v_and_b32_e32 v0, 1, v0
9335 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
9336 ; GFX1032-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
9337 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s44
9338 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB11_2
9339 ; GFX1032-DPP-NEXT: .LBB11_3:
9340 ; GFX1032-DPP-NEXT: s_endpgm
9342 ; GFX1164-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
9343 ; GFX1164-DPP: ; %bb.0:
9344 ; GFX1164-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
9345 ; GFX1164-DPP-NEXT: s_mov_b32 s33, s8
9346 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
9347 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
9348 ; GFX1164-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
9349 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
9350 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
9351 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
9352 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v0
9353 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
9354 ; GFX1164-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
9355 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9356 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9357 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s6
9358 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s7
9359 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
9360 ; GFX1164-DPP-NEXT: s_mov_b32 s32, 32
9361 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v40, v0
9362 ; GFX1164-DPP-NEXT: s_mov_b32 s40, s7
9363 ; GFX1164-DPP-NEXT: s_mov_b32 s41, s6
9364 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
9365 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
9366 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
9367 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v8, 0
9368 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
9369 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
9370 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v0
9371 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v1
9372 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
9373 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v8
9374 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v9
9375 ; GFX1164-DPP-NEXT: s_not_b64 exec, exec
9376 ; GFX1164-DPP-NEXT: s_or_saveexec_b64 s[0:1], -1
9377 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
9378 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
9379 ; GFX1164-DPP-NEXT: s_waitcnt_depctr 0xfff
9380 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
9381 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
9382 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9383 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
9384 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9385 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9386 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
9387 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
9388 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
9389 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
9390 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
9391 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9392 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9393 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9394 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v12, v8
9395 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v13, v9
9396 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
9397 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
9398 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
9399 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9400 ; GFX1164-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9401 ; GFX1164-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9402 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9403 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
9404 ; GFX1164-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
9405 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9406 ; GFX1164-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
9407 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9408 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9409 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v11, v9
9410 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v10, v8
9411 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
9412 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
9413 ; GFX1164-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
9414 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9415 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9416 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
9417 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9418 ; GFX1164-DPP-NEXT: v_permlane64_b32 v11, v9
9419 ; GFX1164-DPP-NEXT: v_permlane64_b32 v10, v8
9420 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9421 ; GFX1164-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9422 ; GFX1164-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
9423 ; GFX1164-DPP-NEXT: s_mov_b64 exec, s[0:1]
9424 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9425 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9426 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, v8
9427 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
9428 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, v9
9429 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
9430 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9431 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
9432 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
9433 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB11_3
9434 ; GFX1164-DPP-NEXT: ; %bb.1:
9435 ; GFX1164-DPP-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
9436 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 0
9437 ; GFX1164-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
9438 ; GFX1164-DPP-NEXT: s_mov_b64 s[44:45], 0
9439 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
9440 ; GFX1164-DPP-NEXT: global_load_b64 v[1:2], v0, s[42:43]
9441 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x1
9442 ; GFX1164-DPP-NEXT: .p2align 6
9443 ; GFX1164-DPP-NEXT: .LBB11_2: ; %atomicrmw.start
9444 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9445 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
9446 ; GFX1164-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
9447 ; GFX1164-DPP-NEXT: s_add_u32 s8, s34, 44
9448 ; GFX1164-DPP-NEXT: s_addc_u32 s9, s35, 0
9449 ; GFX1164-DPP-NEXT: s_getpc_b64 s[0:1]
9450 ; GFX1164-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
9451 ; GFX1164-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
9452 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v31, v40
9453 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
9454 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v0, 8
9455 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v5, 8
9456 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v6, 0
9457 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v7, 0
9458 ; GFX1164-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9459 ; GFX1164-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9460 ; GFX1164-DPP-NEXT: s_mov_b32 s12, s41
9461 ; GFX1164-DPP-NEXT: s_mov_b32 s13, s40
9462 ; GFX1164-DPP-NEXT: s_mov_b32 s14, s33
9463 ; GFX1164-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
9464 ; GFX1164-DPP-NEXT: s_clause 0x1
9465 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[1:2], off
9466 ; GFX1164-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
9467 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, 0
9468 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, s42
9469 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v3, s43
9470 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v4, 0
9471 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
9472 ; GFX1164-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
9473 ; GFX1164-DPP-NEXT: scratch_load_b64 v[1:2], off, off
9474 ; GFX1164-DPP-NEXT: v_and_b32_e32 v0, 1, v0
9475 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
9476 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
9477 ; GFX1164-DPP-NEXT: s_or_b64 s[44:45], vcc, s[44:45]
9478 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[44:45]
9479 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB11_2
9480 ; GFX1164-DPP-NEXT: .LBB11_3:
9481 ; GFX1164-DPP-NEXT: s_set_inst_prefetch_distance 0x2
9482 ; GFX1164-DPP-NEXT: s_endpgm
9484 ; GFX1132-DPP-LABEL: global_atomic_fmin_double_uni_address_div_value_default_scope_unsafe:
9485 ; GFX1132-DPP: ; %bb.0:
9486 ; GFX1132-DPP-NEXT: s_mov_b64 s[34:35], s[2:3]
9487 ; GFX1132-DPP-NEXT: s_mov_b64 s[38:39], s[0:1]
9488 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
9489 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
9490 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
9491 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, div.double.value@gotpcrel32@lo+4
9492 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, div.double.value@gotpcrel32@hi+12
9493 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v31, v0
9494 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
9495 ; GFX1132-DPP-NEXT: s_mov_b64 s[36:37], s[4:5]
9496 ; GFX1132-DPP-NEXT: s_mov_b32 s40, s14
9497 ; GFX1132-DPP-NEXT: s_mov_b32 s41, s13
9498 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9499 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9500 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s13
9501 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s14
9502 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s15
9503 ; GFX1132-DPP-NEXT: s_mov_b32 s32, 32
9504 ; GFX1132-DPP-NEXT: s_mov_b32 s33, s15
9505 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v40, v0
9506 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
9507 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
9508 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
9509 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v8, 0
9510 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v9, 0x7ff80000
9511 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
9512 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v10, v0
9513 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v11, v1
9514 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
9515 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v10, v8
9516 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v11, v9
9517 ; GFX1132-DPP-NEXT: s_not_b32 exec_lo, exec_lo
9518 ; GFX1132-DPP-NEXT: s_or_saveexec_b32 s0, -1
9519 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
9520 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9521 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:1 row_mask:0xf bank_mask:0xf
9522 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:1 row_mask:0xf bank_mask:0xf
9523 ; GFX1132-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9524 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
9525 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9526 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9527 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
9528 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9529 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:2 row_mask:0xf bank_mask:0xf
9530 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:2 row_mask:0xf bank_mask:0xf
9531 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9532 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9533 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9534 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v12, v8 :: v_dual_mov_b32 v13, v9
9535 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9536 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v12, v10 row_xmask:4 row_mask:0xf bank_mask:0xf
9537 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v13, v11 row_xmask:4 row_mask:0xf bank_mask:0xf
9538 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9539 ; GFX1132-DPP-NEXT: v_max_f64 v[12:13], v[12:13], v[12:13]
9540 ; GFX1132-DPP-NEXT: v_min_f64 v[10:11], v[10:11], v[12:13]
9541 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
9542 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v8, v10 row_xmask:8 row_mask:0xf bank_mask:0xf
9543 ; GFX1132-DPP-NEXT: v_mov_b32_dpp v9, v11 row_xmask:8 row_mask:0xf bank_mask:0xf
9544 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9545 ; GFX1132-DPP-NEXT: v_max_f64 v[8:9], v[8:9], v[8:9]
9546 ; GFX1132-DPP-NEXT: v_min_f64 v[8:9], v[10:11], v[8:9]
9547 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9548 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
9549 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v11, v11, -1, -1
9550 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
9551 ; GFX1132-DPP-NEXT: v_permlanex16_b32 v10, v10, -1, -1
9552 ; GFX1132-DPP-NEXT: v_max_f64 v[10:11], v[10:11], v[10:11]
9553 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
9554 ; GFX1132-DPP-NEXT: v_min_f64 v[8:9], v[8:9], v[10:11]
9555 ; GFX1132-DPP-NEXT: s_mov_b32 exec_lo, s0
9556 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v3, v8
9557 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9558 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_2)
9559 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v4, v9
9560 ; GFX1132-DPP-NEXT: s_mov_b32 s44, 0
9561 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
9562 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
9563 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB11_3
9564 ; GFX1132-DPP-NEXT: ; %bb.1:
9565 ; GFX1132-DPP-NEXT: s_load_b64 s[42:43], s[34:35], 0x24
9566 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v0, 0
9567 ; GFX1132-DPP-NEXT: v_max_f64 v[41:42], v[3:4], v[3:4]
9568 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
9569 ; GFX1132-DPP-NEXT: global_load_b64 v[1:2], v0, s[42:43]
9570 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x1
9571 ; GFX1132-DPP-NEXT: .p2align 6
9572 ; GFX1132-DPP-NEXT: .LBB11_2: ; %atomicrmw.start
9573 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9574 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
9575 ; GFX1132-DPP-NEXT: v_max_f64 v[3:4], v[1:2], v[1:2]
9576 ; GFX1132-DPP-NEXT: s_add_u32 s8, s34, 44
9577 ; GFX1132-DPP-NEXT: s_addc_u32 s9, s35, 0
9578 ; GFX1132-DPP-NEXT: s_getpc_b64 s[0:1]
9579 ; GFX1132-DPP-NEXT: s_add_u32 s0, s0, __atomic_compare_exchange@gotpcrel32@lo+4
9580 ; GFX1132-DPP-NEXT: s_addc_u32 s1, s1, __atomic_compare_exchange@gotpcrel32@hi+12
9581 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v31, v40 :: v_dual_mov_b32 v0, 8
9582 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[0:1], 0x0
9583 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v5, 8 :: v_dual_mov_b32 v6, 0
9584 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v7, 0
9585 ; GFX1132-DPP-NEXT: s_mov_b64 s[4:5], s[38:39]
9586 ; GFX1132-DPP-NEXT: s_mov_b64 s[10:11], s[36:37]
9587 ; GFX1132-DPP-NEXT: s_mov_b32 s12, s41
9588 ; GFX1132-DPP-NEXT: s_mov_b32 s13, s40
9589 ; GFX1132-DPP-NEXT: s_mov_b32 s14, s33
9590 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_4)
9591 ; GFX1132-DPP-NEXT: v_min_f64 v[3:4], v[3:4], v[41:42]
9592 ; GFX1132-DPP-NEXT: s_clause 0x1
9593 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[1:2], off
9594 ; GFX1132-DPP-NEXT: scratch_store_b64 off, v[3:4], off offset:8
9595 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v2, s42
9596 ; GFX1132-DPP-NEXT: v_dual_mov_b32 v3, s43 :: v_dual_mov_b32 v4, 0
9597 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
9598 ; GFX1132-DPP-NEXT: s_swappc_b64 s[30:31], s[0:1]
9599 ; GFX1132-DPP-NEXT: scratch_load_b64 v[1:2], off, off
9600 ; GFX1132-DPP-NEXT: v_and_b32_e32 v0, 1, v0
9601 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
9602 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
9603 ; GFX1132-DPP-NEXT: s_or_b32 s44, vcc_lo, s44
9604 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s44
9605 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB11_2
9606 ; GFX1132-DPP-NEXT: .LBB11_3:
9607 ; GFX1132-DPP-NEXT: s_set_inst_prefetch_distance 0x2
9608 ; GFX1132-DPP-NEXT: s_endpgm
9609 %divValue = call double @div.double.value()
9610 %result = atomicrmw fmin ptr addrspace(1) %ptr, double %divValue monotonic, align 4
9614 define amdgpu_kernel void @global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory(ptr addrspace(1) %ptr) {
9615 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9616 ; GFX7LESS: ; %bb.0:
9617 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
9618 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
9619 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9620 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
9621 ; GFX7LESS-NEXT: s_cbranch_execz .LBB12_3
9622 ; GFX7LESS-NEXT: ; %bb.1:
9623 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
9624 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
9625 ; GFX7LESS-NEXT: s_load_dword s2, s[0:1], 0x0
9626 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
9627 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
9628 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
9629 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s2
9630 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
9631 ; GFX7LESS-NEXT: .LBB12_2: ; %atomicrmw.start
9632 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
9633 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
9634 ; GFX7LESS-NEXT: v_min_f32_e32 v0, 4.0, v0
9635 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
9636 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v1
9637 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v0
9638 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
9639 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
9640 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
9641 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
9642 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v2
9643 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
9644 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB12_2
9645 ; GFX7LESS-NEXT: .LBB12_3:
9646 ; GFX7LESS-NEXT: s_endpgm
9648 ; GFX9-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9650 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9651 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9652 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9653 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
9654 ; GFX9-NEXT: s_cbranch_execz .LBB12_3
9655 ; GFX9-NEXT: ; %bb.1:
9656 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9657 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
9658 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
9659 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
9660 ; GFX9-NEXT: s_load_dword s4, s[0:1], 0x0
9661 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
9662 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
9663 ; GFX9-NEXT: .LBB12_2: ; %atomicrmw.start
9664 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
9665 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
9666 ; GFX9-NEXT: v_min_f32_e32 v0, 4.0, v0
9667 ; GFX9-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9668 ; GFX9-NEXT: s_waitcnt vmcnt(0)
9669 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9670 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9671 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
9672 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
9673 ; GFX9-NEXT: s_cbranch_execnz .LBB12_2
9674 ; GFX9-NEXT: .LBB12_3:
9675 ; GFX9-NEXT: s_endpgm
9677 ; GFX1064-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9679 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9680 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9681 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9682 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
9683 ; GFX1064-NEXT: s_cbranch_execz .LBB12_3
9684 ; GFX1064-NEXT: ; %bb.1:
9685 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9686 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0
9687 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
9688 ; GFX1064-NEXT: s_load_dword s2, s[0:1], 0x0
9689 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
9690 ; GFX1064-NEXT: v_mov_b32_e32 v1, s2
9691 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
9692 ; GFX1064-NEXT: .LBB12_2: ; %atomicrmw.start
9693 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
9694 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
9695 ; GFX1064-NEXT: v_min_f32_e32 v0, 4.0, v0
9696 ; GFX1064-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9697 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
9698 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9699 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
9700 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9701 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
9702 ; GFX1064-NEXT: s_cbranch_execnz .LBB12_2
9703 ; GFX1064-NEXT: .LBB12_3:
9704 ; GFX1064-NEXT: s_endpgm
9706 ; GFX1032-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9708 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9709 ; GFX1032-NEXT: s_mov_b32 s4, 0
9710 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
9711 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
9712 ; GFX1032-NEXT: s_cbranch_execz .LBB12_3
9713 ; GFX1032-NEXT: ; %bb.1:
9714 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9715 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
9716 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
9717 ; GFX1032-NEXT: s_load_dword s2, s[0:1], 0x0
9718 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
9719 ; GFX1032-NEXT: v_mov_b32_e32 v1, s2
9720 ; GFX1032-NEXT: .LBB12_2: ; %atomicrmw.start
9721 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
9722 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
9723 ; GFX1032-NEXT: v_min_f32_e32 v0, 4.0, v0
9724 ; GFX1032-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9725 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
9726 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
9727 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
9728 ; GFX1032-NEXT: s_or_b32 s4, vcc_lo, s4
9729 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
9730 ; GFX1032-NEXT: s_cbranch_execnz .LBB12_2
9731 ; GFX1032-NEXT: .LBB12_3:
9732 ; GFX1032-NEXT: s_endpgm
9734 ; GFX1164-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9736 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9737 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
9738 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9739 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9740 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
9741 ; GFX1164-NEXT: s_cbranch_execz .LBB12_3
9742 ; GFX1164-NEXT: ; %bb.1:
9743 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
9744 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
9745 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
9746 ; GFX1164-NEXT: s_load_b32 s2, s[0:1], 0x0
9747 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
9748 ; GFX1164-NEXT: v_mov_b32_e32 v1, s2
9749 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
9750 ; GFX1164-NEXT: .LBB12_2: ; %atomicrmw.start
9751 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
9752 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9753 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
9754 ; GFX1164-NEXT: v_min_f32_e32 v0, 4.0, v0
9755 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
9756 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
9757 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9758 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
9759 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9760 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
9761 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
9762 ; GFX1164-NEXT: s_cbranch_execnz .LBB12_2
9763 ; GFX1164-NEXT: .LBB12_3:
9764 ; GFX1164-NEXT: s_endpgm
9766 ; GFX1132-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9768 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9769 ; GFX1132-NEXT: s_mov_b32 s4, 0
9770 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
9771 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
9772 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
9773 ; GFX1132-NEXT: s_cbranch_execz .LBB12_3
9774 ; GFX1132-NEXT: ; %bb.1:
9775 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
9776 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
9777 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
9778 ; GFX1132-NEXT: s_load_b32 s2, s[0:1], 0x0
9779 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
9780 ; GFX1132-NEXT: v_mov_b32_e32 v1, s2
9781 ; GFX1132-NEXT: .LBB12_2: ; %atomicrmw.start
9782 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
9783 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9784 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
9785 ; GFX1132-NEXT: v_min_f32_e32 v0, 4.0, v0
9786 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
9787 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
9788 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
9789 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
9790 ; GFX1132-NEXT: s_or_b32 s4, vcc_lo, s4
9791 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
9792 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
9793 ; GFX1132-NEXT: s_cbranch_execnz .LBB12_2
9794 ; GFX1132-NEXT: .LBB12_3:
9795 ; GFX1132-NEXT: s_endpgm
9797 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9798 ; GFX7LESS-DPP: ; %bb.0:
9799 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
9800 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
9801 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9802 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
9803 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB12_3
9804 ; GFX7LESS-DPP-NEXT: ; %bb.1:
9805 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
9806 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
9807 ; GFX7LESS-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
9808 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
9809 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
9810 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
9811 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s2
9812 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
9813 ; GFX7LESS-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9814 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9815 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
9816 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9817 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
9818 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v1
9819 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v0
9820 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
9821 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
9822 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
9823 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
9824 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v2
9825 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
9826 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB12_2
9827 ; GFX7LESS-DPP-NEXT: .LBB12_3:
9828 ; GFX7LESS-DPP-NEXT: s_endpgm
9830 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9831 ; GFX9-DPP: ; %bb.0:
9832 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9833 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9834 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9835 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
9836 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB12_3
9837 ; GFX9-DPP-NEXT: ; %bb.1:
9838 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9839 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
9840 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
9841 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
9842 ; GFX9-DPP-NEXT: s_load_dword s4, s[0:1], 0x0
9843 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
9844 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s4
9845 ; GFX9-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9846 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9847 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
9848 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9849 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9850 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
9851 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9852 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9853 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
9854 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
9855 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB12_2
9856 ; GFX9-DPP-NEXT: .LBB12_3:
9857 ; GFX9-DPP-NEXT: s_endpgm
9859 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9860 ; GFX1064-DPP: ; %bb.0:
9861 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9862 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9863 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9864 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
9865 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB12_3
9866 ; GFX1064-DPP-NEXT: ; %bb.1:
9867 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9868 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
9869 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
9870 ; GFX1064-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
9871 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
9872 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s2
9873 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
9874 ; GFX1064-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9875 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9876 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
9877 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9878 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9879 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
9880 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9881 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
9882 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9883 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
9884 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB12_2
9885 ; GFX1064-DPP-NEXT: .LBB12_3:
9886 ; GFX1064-DPP-NEXT: s_endpgm
9888 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9889 ; GFX1032-DPP: ; %bb.0:
9890 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9891 ; GFX1032-DPP-NEXT: s_mov_b32 s4, 0
9892 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
9893 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
9894 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB12_3
9895 ; GFX1032-DPP-NEXT: ; %bb.1:
9896 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
9897 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
9898 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
9899 ; GFX1032-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
9900 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
9901 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s2
9902 ; GFX1032-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9903 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9904 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
9905 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9906 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
9907 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
9908 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
9909 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
9910 ; GFX1032-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
9911 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
9912 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB12_2
9913 ; GFX1032-DPP-NEXT: .LBB12_3:
9914 ; GFX1032-DPP-NEXT: s_endpgm
9916 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9917 ; GFX1164-DPP: ; %bb.0:
9918 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9919 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
9920 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9921 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
9922 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
9923 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB12_3
9924 ; GFX1164-DPP-NEXT: ; %bb.1:
9925 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
9926 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0
9927 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
9928 ; GFX1164-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
9929 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
9930 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s2
9931 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
9932 ; GFX1164-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9933 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9934 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9935 ; GFX1164-DPP-NEXT: v_max_f32_e32 v0, v1, v1
9936 ; GFX1164-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9937 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
9938 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
9939 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
9940 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, v0
9941 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
9942 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
9943 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
9944 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB12_2
9945 ; GFX1164-DPP-NEXT: .LBB12_3:
9946 ; GFX1164-DPP-NEXT: s_endpgm
9948 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_ignore_denormal_mode__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9949 ; GFX1132-DPP: ; %bb.0:
9950 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
9951 ; GFX1132-DPP-NEXT: s_mov_b32 s4, 0
9952 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
9953 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
9954 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
9955 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB12_3
9956 ; GFX1132-DPP-NEXT: ; %bb.1:
9957 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
9958 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0
9959 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
9960 ; GFX1132-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
9961 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
9962 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, s2
9963 ; GFX1132-DPP-NEXT: .LBB12_2: ; %atomicrmw.start
9964 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
9965 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
9966 ; GFX1132-DPP-NEXT: v_max_f32_e32 v0, v1, v1
9967 ; GFX1132-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
9968 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
9969 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
9970 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
9971 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, v0
9972 ; GFX1132-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
9973 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
9974 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
9975 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB12_2
9976 ; GFX1132-DPP-NEXT: .LBB12_3:
9977 ; GFX1132-DPP-NEXT: s_endpgm
9978 %result = atomicrmw fmin ptr addrspace(1) %ptr, float 4.0 monotonic, align 4, !amdgpu.no.fine.grained.memory !1, !amdgpu.no.remote.memory !1, !amdgpu.ignore.denormal.mode !1
9982 define amdgpu_kernel void @global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory(ptr addrspace(1) %ptr) {
9983 ; GFX7LESS-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
9984 ; GFX7LESS: ; %bb.0:
9985 ; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
9986 ; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
9987 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
9988 ; GFX7LESS-NEXT: s_and_saveexec_b64 s[0:1], vcc
9989 ; GFX7LESS-NEXT: s_cbranch_execz .LBB13_3
9990 ; GFX7LESS-NEXT: ; %bb.1:
9991 ; GFX7LESS-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
9992 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
9993 ; GFX7LESS-NEXT: s_load_dword s2, s[0:1], 0x0
9994 ; GFX7LESS-NEXT: s_mov_b64 s[4:5], 0
9995 ; GFX7LESS-NEXT: s_mov_b32 s3, 0xf000
9996 ; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
9997 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, s2
9998 ; GFX7LESS-NEXT: s_mov_b32 s2, -1
9999 ; GFX7LESS-NEXT: .LBB13_2: ; %atomicrmw.start
10000 ; GFX7LESS-NEXT: ; =>This Inner Loop Header: Depth=1
10001 ; GFX7LESS-NEXT: v_mul_f32_e32 v0, 1.0, v1
10002 ; GFX7LESS-NEXT: v_min_f32_e32 v0, 4.0, v0
10003 ; GFX7LESS-NEXT: s_waitcnt expcnt(0)
10004 ; GFX7LESS-NEXT: v_mov_b32_e32 v3, v1
10005 ; GFX7LESS-NEXT: v_mov_b32_e32 v2, v0
10006 ; GFX7LESS-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
10007 ; GFX7LESS-NEXT: s_waitcnt vmcnt(0)
10008 ; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
10009 ; GFX7LESS-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
10010 ; GFX7LESS-NEXT: v_mov_b32_e32 v1, v2
10011 ; GFX7LESS-NEXT: s_andn2_b64 exec, exec, s[4:5]
10012 ; GFX7LESS-NEXT: s_cbranch_execnz .LBB13_2
10013 ; GFX7LESS-NEXT: .LBB13_3:
10014 ; GFX7LESS-NEXT: s_endpgm
10016 ; GFX9-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10018 ; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10019 ; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10020 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
10021 ; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
10022 ; GFX9-NEXT: s_cbranch_execz .LBB13_3
10023 ; GFX9-NEXT: ; %bb.1:
10024 ; GFX9-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10025 ; GFX9-NEXT: s_mov_b64 s[2:3], 0
10026 ; GFX9-NEXT: v_mov_b32_e32 v2, 0
10027 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
10028 ; GFX9-NEXT: s_load_dword s4, s[0:1], 0x0
10029 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
10030 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
10031 ; GFX9-NEXT: .LBB13_2: ; %atomicrmw.start
10032 ; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
10033 ; GFX9-NEXT: v_max_f32_e32 v0, v1, v1
10034 ; GFX9-NEXT: v_min_f32_e32 v0, 4.0, v0
10035 ; GFX9-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10036 ; GFX9-NEXT: s_waitcnt vmcnt(0)
10037 ; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10038 ; GFX9-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10039 ; GFX9-NEXT: v_mov_b32_e32 v1, v0
10040 ; GFX9-NEXT: s_andn2_b64 exec, exec, s[2:3]
10041 ; GFX9-NEXT: s_cbranch_execnz .LBB13_2
10042 ; GFX9-NEXT: .LBB13_3:
10043 ; GFX9-NEXT: s_endpgm
10045 ; GFX1064-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10046 ; GFX1064: ; %bb.0:
10047 ; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10048 ; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10049 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
10050 ; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
10051 ; GFX1064-NEXT: s_cbranch_execz .LBB13_3
10052 ; GFX1064-NEXT: ; %bb.1:
10053 ; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10054 ; GFX1064-NEXT: v_mov_b32_e32 v2, 0
10055 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
10056 ; GFX1064-NEXT: s_load_dword s2, s[0:1], 0x0
10057 ; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
10058 ; GFX1064-NEXT: v_mov_b32_e32 v1, s2
10059 ; GFX1064-NEXT: s_mov_b64 s[2:3], 0
10060 ; GFX1064-NEXT: .LBB13_2: ; %atomicrmw.start
10061 ; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
10062 ; GFX1064-NEXT: v_max_f32_e32 v0, v1, v1
10063 ; GFX1064-NEXT: v_min_f32_e32 v0, 4.0, v0
10064 ; GFX1064-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10065 ; GFX1064-NEXT: s_waitcnt vmcnt(0)
10066 ; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10067 ; GFX1064-NEXT: v_mov_b32_e32 v1, v0
10068 ; GFX1064-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10069 ; GFX1064-NEXT: s_andn2_b64 exec, exec, s[2:3]
10070 ; GFX1064-NEXT: s_cbranch_execnz .LBB13_2
10071 ; GFX1064-NEXT: .LBB13_3:
10072 ; GFX1064-NEXT: s_endpgm
10074 ; GFX1032-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10075 ; GFX1032: ; %bb.0:
10076 ; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10077 ; GFX1032-NEXT: s_mov_b32 s4, 0
10078 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
10079 ; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
10080 ; GFX1032-NEXT: s_cbranch_execz .LBB13_3
10081 ; GFX1032-NEXT: ; %bb.1:
10082 ; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10083 ; GFX1032-NEXT: v_mov_b32_e32 v2, 0
10084 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
10085 ; GFX1032-NEXT: s_load_dword s2, s[0:1], 0x0
10086 ; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
10087 ; GFX1032-NEXT: v_mov_b32_e32 v1, s2
10088 ; GFX1032-NEXT: .LBB13_2: ; %atomicrmw.start
10089 ; GFX1032-NEXT: ; =>This Inner Loop Header: Depth=1
10090 ; GFX1032-NEXT: v_max_f32_e32 v0, v1, v1
10091 ; GFX1032-NEXT: v_min_f32_e32 v0, 4.0, v0
10092 ; GFX1032-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10093 ; GFX1032-NEXT: s_waitcnt vmcnt(0)
10094 ; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
10095 ; GFX1032-NEXT: v_mov_b32_e32 v1, v0
10096 ; GFX1032-NEXT: s_or_b32 s4, vcc_lo, s4
10097 ; GFX1032-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
10098 ; GFX1032-NEXT: s_cbranch_execnz .LBB13_2
10099 ; GFX1032-NEXT: .LBB13_3:
10100 ; GFX1032-NEXT: s_endpgm
10102 ; GFX1164-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10103 ; GFX1164: ; %bb.0:
10104 ; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10105 ; GFX1164-NEXT: s_mov_b64 s[0:1], exec
10106 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10107 ; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10108 ; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
10109 ; GFX1164-NEXT: s_cbranch_execz .LBB13_3
10110 ; GFX1164-NEXT: ; %bb.1:
10111 ; GFX1164-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
10112 ; GFX1164-NEXT: v_mov_b32_e32 v2, 0
10113 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
10114 ; GFX1164-NEXT: s_load_b32 s2, s[0:1], 0x0
10115 ; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
10116 ; GFX1164-NEXT: v_mov_b32_e32 v1, s2
10117 ; GFX1164-NEXT: s_mov_b64 s[2:3], 0
10118 ; GFX1164-NEXT: .LBB13_2: ; %atomicrmw.start
10119 ; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
10120 ; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10121 ; GFX1164-NEXT: v_max_f32_e32 v0, v1, v1
10122 ; GFX1164-NEXT: v_min_f32_e32 v0, 4.0, v0
10123 ; GFX1164-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
10124 ; GFX1164-NEXT: s_waitcnt vmcnt(0)
10125 ; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10126 ; GFX1164-NEXT: v_mov_b32_e32 v1, v0
10127 ; GFX1164-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10128 ; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
10129 ; GFX1164-NEXT: s_and_not1_b64 exec, exec, s[2:3]
10130 ; GFX1164-NEXT: s_cbranch_execnz .LBB13_2
10131 ; GFX1164-NEXT: .LBB13_3:
10132 ; GFX1164-NEXT: s_endpgm
10134 ; GFX1132-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10135 ; GFX1132: ; %bb.0:
10136 ; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10137 ; GFX1132-NEXT: s_mov_b32 s4, 0
10138 ; GFX1132-NEXT: s_mov_b32 s0, exec_lo
10139 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
10140 ; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
10141 ; GFX1132-NEXT: s_cbranch_execz .LBB13_3
10142 ; GFX1132-NEXT: ; %bb.1:
10143 ; GFX1132-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
10144 ; GFX1132-NEXT: v_mov_b32_e32 v2, 0
10145 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
10146 ; GFX1132-NEXT: s_load_b32 s2, s[0:1], 0x0
10147 ; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
10148 ; GFX1132-NEXT: v_mov_b32_e32 v1, s2
10149 ; GFX1132-NEXT: .LBB13_2: ; %atomicrmw.start
10150 ; GFX1132-NEXT: ; =>This Inner Loop Header: Depth=1
10151 ; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10152 ; GFX1132-NEXT: v_max_f32_e32 v0, v1, v1
10153 ; GFX1132-NEXT: v_min_f32_e32 v0, 4.0, v0
10154 ; GFX1132-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
10155 ; GFX1132-NEXT: s_waitcnt vmcnt(0)
10156 ; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
10157 ; GFX1132-NEXT: v_mov_b32_e32 v1, v0
10158 ; GFX1132-NEXT: s_or_b32 s4, vcc_lo, s4
10159 ; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
10160 ; GFX1132-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
10161 ; GFX1132-NEXT: s_cbranch_execnz .LBB13_2
10162 ; GFX1132-NEXT: .LBB13_3:
10163 ; GFX1132-NEXT: s_endpgm
10165 ; GFX7LESS-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10166 ; GFX7LESS-DPP: ; %bb.0:
10167 ; GFX7LESS-DPP-NEXT: v_mbcnt_lo_u32_b32_e64 v0, exec_lo, 0
10168 ; GFX7LESS-DPP-NEXT: v_mbcnt_hi_u32_b32_e32 v0, exec_hi, v0
10169 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
10170 ; GFX7LESS-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
10171 ; GFX7LESS-DPP-NEXT: s_cbranch_execz .LBB13_3
10172 ; GFX7LESS-DPP-NEXT: ; %bb.1:
10173 ; GFX7LESS-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
10174 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
10175 ; GFX7LESS-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
10176 ; GFX7LESS-DPP-NEXT: s_mov_b64 s[4:5], 0
10177 ; GFX7LESS-DPP-NEXT: s_mov_b32 s3, 0xf000
10178 ; GFX7LESS-DPP-NEXT: s_waitcnt lgkmcnt(0)
10179 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, s2
10180 ; GFX7LESS-DPP-NEXT: s_mov_b32 s2, -1
10181 ; GFX7LESS-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10182 ; GFX7LESS-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10183 ; GFX7LESS-DPP-NEXT: v_mul_f32_e32 v0, 1.0, v1
10184 ; GFX7LESS-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10185 ; GFX7LESS-DPP-NEXT: s_waitcnt expcnt(0)
10186 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v3, v1
10187 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v2, v0
10188 ; GFX7LESS-DPP-NEXT: buffer_atomic_cmpswap v[2:3], off, s[0:3], 0 glc
10189 ; GFX7LESS-DPP-NEXT: s_waitcnt vmcnt(0)
10190 ; GFX7LESS-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v2, v1
10191 ; GFX7LESS-DPP-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
10192 ; GFX7LESS-DPP-NEXT: v_mov_b32_e32 v1, v2
10193 ; GFX7LESS-DPP-NEXT: s_andn2_b64 exec, exec, s[4:5]
10194 ; GFX7LESS-DPP-NEXT: s_cbranch_execnz .LBB13_2
10195 ; GFX7LESS-DPP-NEXT: .LBB13_3:
10196 ; GFX7LESS-DPP-NEXT: s_endpgm
10198 ; GFX9-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10199 ; GFX9-DPP: ; %bb.0:
10200 ; GFX9-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10201 ; GFX9-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10202 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
10203 ; GFX9-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
10204 ; GFX9-DPP-NEXT: s_cbranch_execz .LBB13_3
10205 ; GFX9-DPP-NEXT: ; %bb.1:
10206 ; GFX9-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10207 ; GFX9-DPP-NEXT: s_mov_b64 s[2:3], 0
10208 ; GFX9-DPP-NEXT: v_mov_b32_e32 v2, 0
10209 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
10210 ; GFX9-DPP-NEXT: s_load_dword s4, s[0:1], 0x0
10211 ; GFX9-DPP-NEXT: s_waitcnt lgkmcnt(0)
10212 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, s4
10213 ; GFX9-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10214 ; GFX9-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10215 ; GFX9-DPP-NEXT: v_max_f32_e32 v0, v1, v1
10216 ; GFX9-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10217 ; GFX9-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10218 ; GFX9-DPP-NEXT: s_waitcnt vmcnt(0)
10219 ; GFX9-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10220 ; GFX9-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10221 ; GFX9-DPP-NEXT: v_mov_b32_e32 v1, v0
10222 ; GFX9-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
10223 ; GFX9-DPP-NEXT: s_cbranch_execnz .LBB13_2
10224 ; GFX9-DPP-NEXT: .LBB13_3:
10225 ; GFX9-DPP-NEXT: s_endpgm
10227 ; GFX1064-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10228 ; GFX1064-DPP: ; %bb.0:
10229 ; GFX1064-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10230 ; GFX1064-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10231 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
10232 ; GFX1064-DPP-NEXT: s_and_saveexec_b64 s[0:1], vcc
10233 ; GFX1064-DPP-NEXT: s_cbranch_execz .LBB13_3
10234 ; GFX1064-DPP-NEXT: ; %bb.1:
10235 ; GFX1064-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10236 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v2, 0
10237 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
10238 ; GFX1064-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
10239 ; GFX1064-DPP-NEXT: s_waitcnt lgkmcnt(0)
10240 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, s2
10241 ; GFX1064-DPP-NEXT: s_mov_b64 s[2:3], 0
10242 ; GFX1064-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10243 ; GFX1064-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10244 ; GFX1064-DPP-NEXT: v_max_f32_e32 v0, v1, v1
10245 ; GFX1064-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10246 ; GFX1064-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10247 ; GFX1064-DPP-NEXT: s_waitcnt vmcnt(0)
10248 ; GFX1064-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10249 ; GFX1064-DPP-NEXT: v_mov_b32_e32 v1, v0
10250 ; GFX1064-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10251 ; GFX1064-DPP-NEXT: s_andn2_b64 exec, exec, s[2:3]
10252 ; GFX1064-DPP-NEXT: s_cbranch_execnz .LBB13_2
10253 ; GFX1064-DPP-NEXT: .LBB13_3:
10254 ; GFX1064-DPP-NEXT: s_endpgm
10256 ; GFX1032-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10257 ; GFX1032-DPP: ; %bb.0:
10258 ; GFX1032-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10259 ; GFX1032-DPP-NEXT: s_mov_b32 s4, 0
10260 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
10261 ; GFX1032-DPP-NEXT: s_and_saveexec_b32 s0, vcc_lo
10262 ; GFX1032-DPP-NEXT: s_cbranch_execz .LBB13_3
10263 ; GFX1032-DPP-NEXT: ; %bb.1:
10264 ; GFX1032-DPP-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x24
10265 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v2, 0
10266 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
10267 ; GFX1032-DPP-NEXT: s_load_dword s2, s[0:1], 0x0
10268 ; GFX1032-DPP-NEXT: s_waitcnt lgkmcnt(0)
10269 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, s2
10270 ; GFX1032-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10271 ; GFX1032-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10272 ; GFX1032-DPP-NEXT: v_max_f32_e32 v0, v1, v1
10273 ; GFX1032-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10274 ; GFX1032-DPP-NEXT: global_atomic_cmpswap v0, v2, v[0:1], s[0:1] glc
10275 ; GFX1032-DPP-NEXT: s_waitcnt vmcnt(0)
10276 ; GFX1032-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
10277 ; GFX1032-DPP-NEXT: v_mov_b32_e32 v1, v0
10278 ; GFX1032-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
10279 ; GFX1032-DPP-NEXT: s_andn2_b32 exec_lo, exec_lo, s4
10280 ; GFX1032-DPP-NEXT: s_cbranch_execnz .LBB13_2
10281 ; GFX1032-DPP-NEXT: .LBB13_3:
10282 ; GFX1032-DPP-NEXT: s_endpgm
10284 ; GFX1164-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10285 ; GFX1164-DPP: ; %bb.0:
10286 ; GFX1164-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10287 ; GFX1164-DPP-NEXT: s_mov_b64 s[0:1], exec
10288 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10289 ; GFX1164-DPP-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
10290 ; GFX1164-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
10291 ; GFX1164-DPP-NEXT: s_cbranch_execz .LBB13_3
10292 ; GFX1164-DPP-NEXT: ; %bb.1:
10293 ; GFX1164-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
10294 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v2, 0
10295 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
10296 ; GFX1164-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
10297 ; GFX1164-DPP-NEXT: s_waitcnt lgkmcnt(0)
10298 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, s2
10299 ; GFX1164-DPP-NEXT: s_mov_b64 s[2:3], 0
10300 ; GFX1164-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10301 ; GFX1164-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10302 ; GFX1164-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10303 ; GFX1164-DPP-NEXT: v_max_f32_e32 v0, v1, v1
10304 ; GFX1164-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10305 ; GFX1164-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
10306 ; GFX1164-DPP-NEXT: s_waitcnt vmcnt(0)
10307 ; GFX1164-DPP-NEXT: v_cmp_eq_u32_e32 vcc, v0, v1
10308 ; GFX1164-DPP-NEXT: v_mov_b32_e32 v1, v0
10309 ; GFX1164-DPP-NEXT: s_or_b64 s[2:3], vcc, s[2:3]
10310 ; GFX1164-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
10311 ; GFX1164-DPP-NEXT: s_and_not1_b64 exec, exec, s[2:3]
10312 ; GFX1164-DPP-NEXT: s_cbranch_execnz .LBB13_2
10313 ; GFX1164-DPP-NEXT: .LBB13_3:
10314 ; GFX1164-DPP-NEXT: s_endpgm
10316 ; GFX1132-DPP-LABEL: global_atomic_fmin_uni_address_uni_value_system_scope__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory:
10317 ; GFX1132-DPP: ; %bb.0:
10318 ; GFX1132-DPP-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
10319 ; GFX1132-DPP-NEXT: s_mov_b32 s4, 0
10320 ; GFX1132-DPP-NEXT: s_mov_b32 s0, exec_lo
10321 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1)
10322 ; GFX1132-DPP-NEXT: v_cmpx_eq_u32_e32 0, v0
10323 ; GFX1132-DPP-NEXT: s_cbranch_execz .LBB13_3
10324 ; GFX1132-DPP-NEXT: ; %bb.1:
10325 ; GFX1132-DPP-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
10326 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v2, 0
10327 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
10328 ; GFX1132-DPP-NEXT: s_load_b32 s2, s[0:1], 0x0
10329 ; GFX1132-DPP-NEXT: s_waitcnt lgkmcnt(0)
10330 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, s2
10331 ; GFX1132-DPP-NEXT: .LBB13_2: ; %atomicrmw.start
10332 ; GFX1132-DPP-NEXT: ; =>This Inner Loop Header: Depth=1
10333 ; GFX1132-DPP-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
10334 ; GFX1132-DPP-NEXT: v_max_f32_e32 v0, v1, v1
10335 ; GFX1132-DPP-NEXT: v_min_f32_e32 v0, 4.0, v0
10336 ; GFX1132-DPP-NEXT: global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] glc
10337 ; GFX1132-DPP-NEXT: s_waitcnt vmcnt(0)
10338 ; GFX1132-DPP-NEXT: v_cmp_eq_u32_e32 vcc_lo, v0, v1
10339 ; GFX1132-DPP-NEXT: v_mov_b32_e32 v1, v0
10340 ; GFX1132-DPP-NEXT: s_or_b32 s4, vcc_lo, s4
10341 ; GFX1132-DPP-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
10342 ; GFX1132-DPP-NEXT: s_and_not1_b32 exec_lo, exec_lo, s4
10343 ; GFX1132-DPP-NEXT: s_cbranch_execnz .LBB13_2
10344 ; GFX1132-DPP-NEXT: .LBB13_3:
10345 ; GFX1132-DPP-NEXT: s_endpgm
10346 %result = atomicrmw fmin ptr addrspace(1) %ptr, float 4.0 monotonic, align 4, !amdgpu.no.fine.grained.memory !1, !amdgpu.no.remote.memory !1
10350 attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" "amdgpu-unsafe-fp-atomics"="true" }
10352 !llvm.module.flags = !{!0}
10353 !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}