1 # RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefixes=GCN,GFX10 %s
2 # RUN: llc -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefixes=GCN %s
4 # GCN-LABEL: name: flat_atomic_fcmpswap_to_s_denorm_mode
5 # GCN: FLAT_ATOMIC_FCMPSWAP
7 # GCN-NEXT: S_DENORM_MODE
9 name: flat_atomic_fcmpswap_to_s_denorm_mode
12 FLAT_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
13 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
16 # GCN-LABEL: name: flat_atomic_fcmpswap_x2_to_s_denorm_mode
17 # GCN: FLAT_ATOMIC_FCMPSWAP_X2
19 # GCN-NEXT: S_DENORM_MODE
21 name: flat_atomic_fcmpswap_x2_to_s_denorm_mode
24 FLAT_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_128, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
25 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
28 # GCN-LABEL: name: flat_atomic_fmax_to_s_denorm_mode
29 # GCN: FLAT_ATOMIC_FMAX
31 # GCN-NEXT: S_DENORM_MODE
33 name: flat_atomic_fmax_to_s_denorm_mode
36 FLAT_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
37 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
40 # GCN-LABEL: name: flat_atomic_fmax_x2_to_s_denorm_mode
41 # GCN: FLAT_ATOMIC_FMAX_X2
43 # GCN-NEXT: S_DENORM_MODE
45 name: flat_atomic_fmax_x2_to_s_denorm_mode
48 FLAT_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
49 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
52 # GCN-LABEL: name: flat_atomic_fmin_to_s_denorm_mode
53 # GCN: FLAT_ATOMIC_FMIN
55 # GCN-NEXT: S_DENORM_MODE
57 name: flat_atomic_fmin_to_s_denorm_mode
60 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
61 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
64 # GCN-LABEL: name: flat_atomic_fmin_x2_to_s_denorm_mode
65 # GCN: FLAT_ATOMIC_FMIN_X2
67 # GCN-NEXT: S_DENORM_MODE
69 name: flat_atomic_fmin_x2_to_s_denorm_mode
72 FLAT_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
73 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
76 # GCN-LABEL: name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
77 # GCN: FLAT_ATOMIC_FCMPSWAP_X2_RTN
79 # GCN-NEXT: S_DENORM_MODE
81 name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
84 %2:vreg_64 = FLAT_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_128, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
85 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
88 # GCN-LABEL: name: flat_atomic_fmax_rtn_to_s_denorm_mode
89 # GCN: FLAT_ATOMIC_FMAX_RTN
91 # GCN-NEXT: S_DENORM_MODE
93 name: flat_atomic_fmax_rtn_to_s_denorm_mode
96 %2:vgpr_32 = FLAT_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
97 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
100 # GCN-LABEL: name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode
101 # GCN: FLAT_ATOMIC_FMAX_X2_RTN
102 # GFX10-NEXT: S_NOP 2
103 # GCN-NEXT: S_DENORM_MODE
105 name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode
108 %2:vreg_64 = FLAT_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
109 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
112 # GCN-LABEL: name: flat_atomic_fmin_rtn_to_s_denorm_mode
113 # GCN: FLAT_ATOMIC_FMIN_RTN
114 # GFX10-NEXT: S_NOP 2
115 # GCN-NEXT: S_DENORM_MODE
117 name: flat_atomic_fmin_rtn_to_s_denorm_mode
120 %2:vgpr_32 = FLAT_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
121 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
124 # GCN-LABEL: name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode
125 # GCN: FLAT_ATOMIC_FMIN_X2_RTN
126 # GFX10-NEXT: S_NOP 2
127 # GCN-NEXT: S_DENORM_MODE
129 name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode
132 %2:vreg_64 = FLAT_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
133 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
136 # GCN-LABEL: name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode
137 # GCN: FLAT_ATOMIC_FCMPSWAP_RTN
138 # GFX10-NEXT: S_NOP 2
139 # GCN-NEXT: S_DENORM_MODE
141 name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode
144 %2:vgpr_32 = FLAT_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
145 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
148 # GCN-LABEL: name: global_atomic_fcmpswap_to_s_denorm_mode
149 # GCN: GLOBAL_ATOMIC_FCMPSWAP
150 # GFX10-NEXT: S_NOP 2
151 # GCN-NEXT: S_DENORM_MODE
153 name: global_atomic_fcmpswap_to_s_denorm_mode
156 GLOBAL_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
157 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
160 # GCN-LABEL: name: global_atomic_fcmpswap_x2_to_s_denorm_mode
161 # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2
162 # GFX10-NEXT: S_NOP 2
163 # GCN-NEXT: S_DENORM_MODE
165 name: global_atomic_fcmpswap_x2_to_s_denorm_mode
168 GLOBAL_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_128, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
169 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
172 # GCN-LABEL: name: global_atomic_fmax_to_s_denorm_mode
173 # GCN: GLOBAL_ATOMIC_FMAX
174 # GFX10-NEXT: S_NOP 2
175 # GCN-NEXT: S_DENORM_MODE
177 name: global_atomic_fmax_to_s_denorm_mode
180 GLOBAL_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
181 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
184 # GCN-LABEL: name: global_atomic_fmax_x2_to_s_denorm_mode
185 # GCN: GLOBAL_ATOMIC_FMAX_X2
186 # GFX10-NEXT: S_NOP 2
187 # GCN-NEXT: S_DENORM_MODE
189 name: global_atomic_fmax_x2_to_s_denorm_mode
192 GLOBAL_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
193 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
196 # GCN-LABEL: name: global_atomic_fmin_to_s_denorm_mode
197 # GCN: GLOBAL_ATOMIC_FMIN
198 # GFX10-NEXT: S_NOP 2
199 # GCN-NEXT: S_DENORM_MODE
201 name: global_atomic_fmin_to_s_denorm_mode
204 GLOBAL_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
205 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
208 # GCN-LABEL: name: global_atomic_fmin_x2_to_s_denorm_mode
209 # GCN: GLOBAL_ATOMIC_FMIN_X2
210 # GFX10-NEXT: S_NOP 2
211 # GCN-NEXT: S_DENORM_MODE
213 name: global_atomic_fmin_x2_to_s_denorm_mode
216 GLOBAL_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
217 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
220 # GCN-LABEL: name: global_atomic_fcmpswap_rtn_to_s_denorm_mode
221 # GCN: GLOBAL_ATOMIC_FCMPSWAP_RTN
222 # GFX10-NEXT: S_NOP 2
223 # GCN-NEXT: S_DENORM_MODE
225 name: global_atomic_fcmpswap_rtn_to_s_denorm_mode
228 %2:vgpr_32 = GLOBAL_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
229 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
232 # GCN-LABEL: name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
233 # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_RTN
234 # GFX10-NEXT: S_NOP 2
235 # GCN-NEXT: S_DENORM_MODE
237 name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
240 %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_128, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
241 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
244 # GCN-LABEL: name: global_atomic_fmax_rtn_to_s_denorm_mode
245 # GCN: GLOBAL_ATOMIC_FMAX_RTN
246 # GFX10-NEXT: S_NOP 2
247 # GCN-NEXT: S_DENORM_MODE
249 name: global_atomic_fmax_rtn_to_s_denorm_mode
252 %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
253 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
256 # GCN-LABEL: name: global_atomic_fmax_x2_rtn_to_s_denorm_mode
257 # GCN: GLOBAL_ATOMIC_FMAX_X2_RTN
258 # GFX10-NEXT: S_NOP 2
259 # GCN-NEXT: S_DENORM_MODE
261 name: global_atomic_fmax_x2_rtn_to_s_denorm_mode
264 %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
265 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
268 # GCN-LABEL: name: global_atomic_fmin_rtn_to_s_denorm_mode
269 # GCN: GLOBAL_ATOMIC_FMIN_RTN
270 # GFX10-NEXT: S_NOP 2
271 # GCN-NEXT: S_DENORM_MODE
273 name: global_atomic_fmin_rtn_to_s_denorm_mode
276 %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
277 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
280 # GCN-LABEL: name: global_atomic_fmin_x2_rtn_to_s_denorm_mode
281 # GCN: GLOBAL_ATOMIC_FMIN_X2_RTN
282 # GFX10-NEXT: S_NOP 2
283 # GCN-NEXT: S_DENORM_MODE
285 name: global_atomic_fmin_x2_rtn_to_s_denorm_mode
288 %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
289 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
292 # GCN-LABEL: name: global_atomic_fcmpswap_saddr_to_s_denorm_mode
293 # GCN: GLOBAL_ATOMIC_FCMPSWAP_SADDR
294 # GFX10-NEXT: S_NOP 2
295 # GCN-NEXT: S_DENORM_MODE
297 name: global_atomic_fcmpswap_saddr_to_s_denorm_mode
300 GLOBAL_ATOMIC_FCMPSWAP_SADDR undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
301 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
304 # GCN-LABEL: name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode
305 # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN
306 # GFX10-NEXT: S_NOP 2
307 # GCN-NEXT: S_DENORM_MODE
309 name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode
312 %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_128, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
313 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
316 # GCN-LABEL: name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode
317 # GCN: GLOBAL_ATOMIC_FMAX_SADDR_RTN
318 # GFX10-NEXT: S_NOP 2
319 # GCN-NEXT: S_DENORM_MODE
321 name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode
324 %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
325 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
328 # GCN-LABEL: name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode
329 # GCN: GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN
330 # GFX10-NEXT: S_NOP 2
331 # GCN-NEXT: S_DENORM_MODE
333 name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode
336 %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
337 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
340 # GCN-LABEL: name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode
341 # GCN: GLOBAL_ATOMIC_FMIN_SADDR_RTN
342 # GFX10-NEXT: S_NOP 2
343 # GCN-NEXT: S_DENORM_MODE
345 name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode
348 %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
349 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
352 # GCN-LABEL: name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode
353 # GCN: GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN
354 # GFX10-NEXT: S_NOP 2
355 # GCN-NEXT: S_DENORM_MODE
357 name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode
360 %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
361 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
364 # GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_waitcnt
365 # GCN: FLAT_ATOMIC_FMIN
366 # GCN-NEXT: S_WAITCNT
367 # GCN-NEXT: S_DENORM_MODE
369 name: flat_fp_atomic_to_s_denorm_mode_waitcnt
372 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
374 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
377 # GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_valu
378 # GCN: FLAT_ATOMIC_FMIN
379 # GCN-NEXT: V_ADD_F32_e32
380 # GCN-NEXT: S_DENORM_MODE
382 name: flat_fp_atomic_to_s_denorm_mode_valu
385 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `ptr addrspace(1) undef`)
386 %2:vgpr_32 = V_ADD_F32_e32 undef %1:vgpr_32, undef %1:vgpr_32, implicit $mode, implicit $exec
387 S_DENORM_MODE 0, implicit-def $mode, implicit $mode