1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=amdgcn -mcpu=gfx1150 -verify-machineinstrs < %s | FileCheck -check-prefix=SDAG %s
3 ; RUN: llc -march=amdgcn -mcpu=gfx1150 -global-isel -verify-machineinstrs < %s | FileCheck -check-prefix=GISEL %s
5 define amdgpu_vs void @f32_olt(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
7 ; SDAG: ; %bb.0: ; %entry
8 ; SDAG-NEXT: s_cmp_lt_f32 s2, s3
9 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
10 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
11 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
12 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
13 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
15 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
18 ; GISEL-LABEL: f32_olt:
19 ; GISEL: ; %bb.0: ; %entry
20 ; GISEL-NEXT: s_cmp_lt_f32 s2, s3
21 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
22 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
23 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
24 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
25 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
26 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
28 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
29 ; GISEL-NEXT: s_endpgm
31 %0 = fcmp olt float %a, %b
32 %1 = sext i1 %0 to i32
33 store i32 %1, ptr addrspace(1) %out
37 define amdgpu_vs void @f32_oeq(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
38 ; SDAG-LABEL: f32_oeq:
39 ; SDAG: ; %bb.0: ; %entry
40 ; SDAG-NEXT: s_cmp_eq_f32 s2, s3
41 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
42 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
43 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
44 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
45 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
47 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
50 ; GISEL-LABEL: f32_oeq:
51 ; GISEL: ; %bb.0: ; %entry
52 ; GISEL-NEXT: s_cmp_eq_f32 s2, s3
53 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
54 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
55 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
56 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
57 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
58 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
60 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
61 ; GISEL-NEXT: s_endpgm
63 %0 = fcmp oeq float %a, %b
64 %1 = sext i1 %0 to i32
65 store i32 %1, ptr addrspace(1) %out
69 define amdgpu_vs void @f32_ole(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
70 ; SDAG-LABEL: f32_ole:
71 ; SDAG: ; %bb.0: ; %entry
72 ; SDAG-NEXT: s_cmp_le_f32 s2, s3
73 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
74 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
75 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
76 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
77 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
79 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
82 ; GISEL-LABEL: f32_ole:
83 ; GISEL: ; %bb.0: ; %entry
84 ; GISEL-NEXT: s_cmp_le_f32 s2, s3
85 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
86 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
87 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
88 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
89 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
90 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
92 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
93 ; GISEL-NEXT: s_endpgm
95 %0 = fcmp ole float %a, %b
96 %1 = sext i1 %0 to i32
97 store i32 %1, ptr addrspace(1) %out
101 define amdgpu_vs void @f32_ogt(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
102 ; SDAG-LABEL: f32_ogt:
103 ; SDAG: ; %bb.0: ; %entry
104 ; SDAG-NEXT: s_cmp_gt_f32 s2, s3
105 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
106 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
107 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
108 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
109 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
111 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
112 ; SDAG-NEXT: s_endpgm
114 ; GISEL-LABEL: f32_ogt:
115 ; GISEL: ; %bb.0: ; %entry
116 ; GISEL-NEXT: s_cmp_gt_f32 s2, s3
117 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
118 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
119 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
120 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
121 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
122 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
123 ; GISEL-NEXT: s_nop 0
124 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
125 ; GISEL-NEXT: s_endpgm
127 %0 = fcmp ogt float %a, %b
128 %1 = sext i1 %0 to i32
129 store i32 %1, ptr addrspace(1) %out
133 define amdgpu_vs void @f32_one(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
134 ; SDAG-LABEL: f32_one:
135 ; SDAG: ; %bb.0: ; %entry
136 ; SDAG-NEXT: s_cmp_lg_f32 s2, s3
137 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
138 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
139 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
140 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
141 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
143 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
144 ; SDAG-NEXT: s_endpgm
146 ; GISEL-LABEL: f32_one:
147 ; GISEL: ; %bb.0: ; %entry
148 ; GISEL-NEXT: s_cmp_lg_f32 s2, s3
149 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
150 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
151 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
152 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
153 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
154 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
155 ; GISEL-NEXT: s_nop 0
156 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
157 ; GISEL-NEXT: s_endpgm
159 %0 = fcmp one float %a, %b
160 %1 = sext i1 %0 to i32
161 store i32 %1, ptr addrspace(1) %out
165 define amdgpu_vs void @f32_oge(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
166 ; SDAG-LABEL: f32_oge:
167 ; SDAG: ; %bb.0: ; %entry
168 ; SDAG-NEXT: s_cmp_ge_f32 s2, s3
169 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
170 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
171 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
172 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
173 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
175 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
176 ; SDAG-NEXT: s_endpgm
178 ; GISEL-LABEL: f32_oge:
179 ; GISEL: ; %bb.0: ; %entry
180 ; GISEL-NEXT: s_cmp_ge_f32 s2, s3
181 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
182 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
183 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
184 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
185 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
186 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
187 ; GISEL-NEXT: s_nop 0
188 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
189 ; GISEL-NEXT: s_endpgm
191 %0 = fcmp oge float %a, %b
192 %1 = sext i1 %0 to i32
193 store i32 %1, ptr addrspace(1) %out
197 define amdgpu_vs void @f32_ord(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
198 ; SDAG-LABEL: f32_ord:
199 ; SDAG: ; %bb.0: ; %entry
200 ; SDAG-NEXT: s_cmp_o_f32 s2, s3
201 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
202 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
203 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
204 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
205 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
207 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
208 ; SDAG-NEXT: s_endpgm
210 ; GISEL-LABEL: f32_ord:
211 ; GISEL: ; %bb.0: ; %entry
212 ; GISEL-NEXT: s_cmp_o_f32 s2, s3
213 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
214 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
215 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
216 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
217 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
218 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
219 ; GISEL-NEXT: s_nop 0
220 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
221 ; GISEL-NEXT: s_endpgm
223 %0 = fcmp ord float %a, %b
224 %1 = sext i1 %0 to i32
225 store i32 %1, ptr addrspace(1) %out
229 define amdgpu_vs void @f32_uno(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
230 ; SDAG-LABEL: f32_uno:
231 ; SDAG: ; %bb.0: ; %entry
232 ; SDAG-NEXT: s_cmp_u_f32 s2, s3
233 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
234 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
235 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
236 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
237 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
239 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
240 ; SDAG-NEXT: s_endpgm
242 ; GISEL-LABEL: f32_uno:
243 ; GISEL: ; %bb.0: ; %entry
244 ; GISEL-NEXT: s_cmp_u_f32 s2, s3
245 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
246 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
247 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
248 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
249 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
250 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
251 ; GISEL-NEXT: s_nop 0
252 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
253 ; GISEL-NEXT: s_endpgm
255 %0 = fcmp uno float %a, %b
256 %1 = sext i1 %0 to i32
257 store i32 %1, ptr addrspace(1) %out
261 define amdgpu_vs void @f32_ult(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
262 ; SDAG-LABEL: f32_ult:
263 ; SDAG: ; %bb.0: ; %entry
264 ; SDAG-NEXT: s_cmp_nge_f32 s2, s3
265 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
266 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
267 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
268 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
269 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
271 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
272 ; SDAG-NEXT: s_endpgm
274 ; GISEL-LABEL: f32_ult:
275 ; GISEL: ; %bb.0: ; %entry
276 ; GISEL-NEXT: s_cmp_nge_f32 s2, s3
277 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
278 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
279 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
280 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
281 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
282 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
283 ; GISEL-NEXT: s_nop 0
284 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
285 ; GISEL-NEXT: s_endpgm
287 %0 = fcmp ult float %a, %b
288 %1 = sext i1 %0 to i32
289 store i32 %1, ptr addrspace(1) %out
293 define amdgpu_vs void @f32_ueq(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
294 ; SDAG-LABEL: f32_ueq:
295 ; SDAG: ; %bb.0: ; %entry
296 ; SDAG-NEXT: s_cmp_nlg_f32 s2, s3
297 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
298 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
299 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
300 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
301 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
303 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
304 ; SDAG-NEXT: s_endpgm
306 ; GISEL-LABEL: f32_ueq:
307 ; GISEL: ; %bb.0: ; %entry
308 ; GISEL-NEXT: s_cmp_nlg_f32 s2, s3
309 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
310 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
311 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
312 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
313 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
314 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
315 ; GISEL-NEXT: s_nop 0
316 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
317 ; GISEL-NEXT: s_endpgm
319 %0 = fcmp ueq float %a, %b
320 %1 = sext i1 %0 to i32
321 store i32 %1, ptr addrspace(1) %out
325 define amdgpu_vs void @f32_ule(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
326 ; SDAG-LABEL: f32_ule:
327 ; SDAG: ; %bb.0: ; %entry
328 ; SDAG-NEXT: s_cmp_ngt_f32 s2, s3
329 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
330 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
331 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
332 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
333 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
335 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
336 ; SDAG-NEXT: s_endpgm
338 ; GISEL-LABEL: f32_ule:
339 ; GISEL: ; %bb.0: ; %entry
340 ; GISEL-NEXT: s_cmp_ngt_f32 s2, s3
341 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
342 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
343 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
344 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
345 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
346 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
347 ; GISEL-NEXT: s_nop 0
348 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
349 ; GISEL-NEXT: s_endpgm
351 %0 = fcmp ule float %a, %b
352 %1 = sext i1 %0 to i32
353 store i32 %1, ptr addrspace(1) %out
357 define amdgpu_vs void @f32_ugt(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
358 ; SDAG-LABEL: f32_ugt:
359 ; SDAG: ; %bb.0: ; %entry
360 ; SDAG-NEXT: s_cmp_nle_f32 s2, s3
361 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
362 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
363 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
364 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
365 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
367 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
368 ; SDAG-NEXT: s_endpgm
370 ; GISEL-LABEL: f32_ugt:
371 ; GISEL: ; %bb.0: ; %entry
372 ; GISEL-NEXT: s_cmp_nle_f32 s2, s3
373 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
374 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
375 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
376 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
377 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
378 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
379 ; GISEL-NEXT: s_nop 0
380 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
381 ; GISEL-NEXT: s_endpgm
383 %0 = fcmp ugt float %a, %b
384 %1 = sext i1 %0 to i32
385 store i32 %1, ptr addrspace(1) %out
389 define amdgpu_vs void @f32_une(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
390 ; SDAG-LABEL: f32_une:
391 ; SDAG: ; %bb.0: ; %entry
392 ; SDAG-NEXT: s_cmp_neq_f32 s2, s3
393 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
394 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
395 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
396 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
397 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
399 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
400 ; SDAG-NEXT: s_endpgm
402 ; GISEL-LABEL: f32_une:
403 ; GISEL: ; %bb.0: ; %entry
404 ; GISEL-NEXT: s_cmp_neq_f32 s2, s3
405 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
406 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
407 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
408 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
409 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
410 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
411 ; GISEL-NEXT: s_nop 0
412 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
413 ; GISEL-NEXT: s_endpgm
415 %0 = fcmp une float %a, %b
416 %1 = sext i1 %0 to i32
417 store i32 %1, ptr addrspace(1) %out
421 define amdgpu_vs void @f32_uge(ptr addrspace(1) inreg %out, float inreg %a, float inreg %b) {
422 ; SDAG-LABEL: f32_uge:
423 ; SDAG: ; %bb.0: ; %entry
424 ; SDAG-NEXT: s_cmp_nlt_f32 s2, s3
425 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
426 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
427 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
428 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
429 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
431 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
432 ; SDAG-NEXT: s_endpgm
434 ; GISEL-LABEL: f32_uge:
435 ; GISEL: ; %bb.0: ; %entry
436 ; GISEL-NEXT: s_cmp_nlt_f32 s2, s3
437 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
438 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
439 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
440 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
441 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
442 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
443 ; GISEL-NEXT: s_nop 0
444 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
445 ; GISEL-NEXT: s_endpgm
447 %0 = fcmp uge float %a, %b
448 %1 = sext i1 %0 to i32
449 store i32 %1, ptr addrspace(1) %out
453 define amdgpu_vs void @f16_olt(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
454 ; SDAG-LABEL: f16_olt:
455 ; SDAG: ; %bb.0: ; %entry
456 ; SDAG-NEXT: s_cmp_lt_f16 s2, s3
457 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
458 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
459 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
460 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
461 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
463 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
464 ; SDAG-NEXT: s_endpgm
466 ; GISEL-LABEL: f16_olt:
467 ; GISEL: ; %bb.0: ; %entry
468 ; GISEL-NEXT: s_cmp_lt_f16 s2, s3
469 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
470 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
471 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
472 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
473 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
474 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
475 ; GISEL-NEXT: s_nop 0
476 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
477 ; GISEL-NEXT: s_endpgm
479 %0 = fcmp olt half %a, %b
480 %1 = sext i1 %0 to i32
481 store i32 %1, ptr addrspace(1) %out
485 define amdgpu_vs void @f16_oeq(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
486 ; SDAG-LABEL: f16_oeq:
487 ; SDAG: ; %bb.0: ; %entry
488 ; SDAG-NEXT: s_cmp_eq_f16 s2, s3
489 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
490 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
491 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
492 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
493 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
495 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
496 ; SDAG-NEXT: s_endpgm
498 ; GISEL-LABEL: f16_oeq:
499 ; GISEL: ; %bb.0: ; %entry
500 ; GISEL-NEXT: s_cmp_eq_f16 s2, s3
501 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
502 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
503 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
504 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
505 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
506 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
507 ; GISEL-NEXT: s_nop 0
508 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
509 ; GISEL-NEXT: s_endpgm
511 %0 = fcmp oeq half %a, %b
512 %1 = sext i1 %0 to i32
513 store i32 %1, ptr addrspace(1) %out
517 define amdgpu_vs void @f16_ole(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
518 ; SDAG-LABEL: f16_ole:
519 ; SDAG: ; %bb.0: ; %entry
520 ; SDAG-NEXT: s_cmp_le_f16 s2, s3
521 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
522 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
523 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
524 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
525 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
527 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
528 ; SDAG-NEXT: s_endpgm
530 ; GISEL-LABEL: f16_ole:
531 ; GISEL: ; %bb.0: ; %entry
532 ; GISEL-NEXT: s_cmp_le_f16 s2, s3
533 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
534 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
535 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
536 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
537 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
538 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
539 ; GISEL-NEXT: s_nop 0
540 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
541 ; GISEL-NEXT: s_endpgm
543 %0 = fcmp ole half %a, %b
544 %1 = sext i1 %0 to i32
545 store i32 %1, ptr addrspace(1) %out
549 define amdgpu_vs void @f16_ogt(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
550 ; SDAG-LABEL: f16_ogt:
551 ; SDAG: ; %bb.0: ; %entry
552 ; SDAG-NEXT: s_cmp_gt_f16 s2, s3
553 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
554 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
555 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
556 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
557 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
559 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
560 ; SDAG-NEXT: s_endpgm
562 ; GISEL-LABEL: f16_ogt:
563 ; GISEL: ; %bb.0: ; %entry
564 ; GISEL-NEXT: s_cmp_gt_f16 s2, s3
565 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
566 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
567 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
568 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
569 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
570 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
571 ; GISEL-NEXT: s_nop 0
572 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
573 ; GISEL-NEXT: s_endpgm
575 %0 = fcmp ogt half %a, %b
576 %1 = sext i1 %0 to i32
577 store i32 %1, ptr addrspace(1) %out
581 define amdgpu_vs void @f16_one(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
582 ; SDAG-LABEL: f16_one:
583 ; SDAG: ; %bb.0: ; %entry
584 ; SDAG-NEXT: s_cmp_lg_f16 s2, s3
585 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
586 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
587 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
588 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
589 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
591 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
592 ; SDAG-NEXT: s_endpgm
594 ; GISEL-LABEL: f16_one:
595 ; GISEL: ; %bb.0: ; %entry
596 ; GISEL-NEXT: s_cmp_lg_f16 s2, s3
597 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
598 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
599 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
600 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
601 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
602 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
603 ; GISEL-NEXT: s_nop 0
604 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
605 ; GISEL-NEXT: s_endpgm
607 %0 = fcmp one half %a, %b
608 %1 = sext i1 %0 to i32
609 store i32 %1, ptr addrspace(1) %out
613 define amdgpu_vs void @f16_oge(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
614 ; SDAG-LABEL: f16_oge:
615 ; SDAG: ; %bb.0: ; %entry
616 ; SDAG-NEXT: s_cmp_ge_f16 s2, s3
617 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
618 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
619 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
620 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
621 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
623 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
624 ; SDAG-NEXT: s_endpgm
626 ; GISEL-LABEL: f16_oge:
627 ; GISEL: ; %bb.0: ; %entry
628 ; GISEL-NEXT: s_cmp_ge_f16 s2, s3
629 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
630 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
631 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
632 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
633 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
634 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
635 ; GISEL-NEXT: s_nop 0
636 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
637 ; GISEL-NEXT: s_endpgm
639 %0 = fcmp oge half %a, %b
640 %1 = sext i1 %0 to i32
641 store i32 %1, ptr addrspace(1) %out
645 define amdgpu_vs void @f16_ord(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
646 ; SDAG-LABEL: f16_ord:
647 ; SDAG: ; %bb.0: ; %entry
648 ; SDAG-NEXT: s_cmp_o_f16 s2, s3
649 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
650 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
651 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
652 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
653 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
655 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
656 ; SDAG-NEXT: s_endpgm
658 ; GISEL-LABEL: f16_ord:
659 ; GISEL: ; %bb.0: ; %entry
660 ; GISEL-NEXT: s_cmp_o_f16 s2, s3
661 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
662 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
663 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
664 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
665 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
666 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
667 ; GISEL-NEXT: s_nop 0
668 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
669 ; GISEL-NEXT: s_endpgm
671 %0 = fcmp ord half %a, %b
672 %1 = sext i1 %0 to i32
673 store i32 %1, ptr addrspace(1) %out
677 define amdgpu_vs void @f16_uno(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
678 ; SDAG-LABEL: f16_uno:
679 ; SDAG: ; %bb.0: ; %entry
680 ; SDAG-NEXT: s_cmp_u_f16 s2, s3
681 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
682 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
683 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
684 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
685 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
687 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
688 ; SDAG-NEXT: s_endpgm
690 ; GISEL-LABEL: f16_uno:
691 ; GISEL: ; %bb.0: ; %entry
692 ; GISEL-NEXT: s_cmp_u_f16 s2, s3
693 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
694 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
695 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
696 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
697 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
698 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
699 ; GISEL-NEXT: s_nop 0
700 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
701 ; GISEL-NEXT: s_endpgm
703 %0 = fcmp uno half %a, %b
704 %1 = sext i1 %0 to i32
705 store i32 %1, ptr addrspace(1) %out
709 define amdgpu_vs void @f16_ult(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
710 ; SDAG-LABEL: f16_ult:
711 ; SDAG: ; %bb.0: ; %entry
712 ; SDAG-NEXT: s_cmp_nge_f16 s2, s3
713 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
714 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
715 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
716 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
717 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
719 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
720 ; SDAG-NEXT: s_endpgm
722 ; GISEL-LABEL: f16_ult:
723 ; GISEL: ; %bb.0: ; %entry
724 ; GISEL-NEXT: s_cmp_nge_f16 s2, s3
725 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
726 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
727 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
728 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
729 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
730 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
731 ; GISEL-NEXT: s_nop 0
732 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
733 ; GISEL-NEXT: s_endpgm
735 %0 = fcmp ult half %a, %b
736 %1 = sext i1 %0 to i32
737 store i32 %1, ptr addrspace(1) %out
741 define amdgpu_vs void @f16_ueq(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
742 ; SDAG-LABEL: f16_ueq:
743 ; SDAG: ; %bb.0: ; %entry
744 ; SDAG-NEXT: s_cmp_nlg_f16 s2, s3
745 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
746 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
747 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
748 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
749 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
751 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
752 ; SDAG-NEXT: s_endpgm
754 ; GISEL-LABEL: f16_ueq:
755 ; GISEL: ; %bb.0: ; %entry
756 ; GISEL-NEXT: s_cmp_nlg_f16 s2, s3
757 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
758 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
759 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
760 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
761 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
762 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
763 ; GISEL-NEXT: s_nop 0
764 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
765 ; GISEL-NEXT: s_endpgm
767 %0 = fcmp ueq half %a, %b
768 %1 = sext i1 %0 to i32
769 store i32 %1, ptr addrspace(1) %out
773 define amdgpu_vs void @f16_ule(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
774 ; SDAG-LABEL: f16_ule:
775 ; SDAG: ; %bb.0: ; %entry
776 ; SDAG-NEXT: s_cmp_ngt_f16 s2, s3
777 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
778 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
779 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
780 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
781 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
783 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
784 ; SDAG-NEXT: s_endpgm
786 ; GISEL-LABEL: f16_ule:
787 ; GISEL: ; %bb.0: ; %entry
788 ; GISEL-NEXT: s_cmp_ngt_f16 s2, s3
789 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
790 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
791 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
792 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
793 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
794 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
795 ; GISEL-NEXT: s_nop 0
796 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
797 ; GISEL-NEXT: s_endpgm
799 %0 = fcmp ule half %a, %b
800 %1 = sext i1 %0 to i32
801 store i32 %1, ptr addrspace(1) %out
805 define amdgpu_vs void @f16_ugt(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
806 ; SDAG-LABEL: f16_ugt:
807 ; SDAG: ; %bb.0: ; %entry
808 ; SDAG-NEXT: s_cmp_nle_f16 s2, s3
809 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
810 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
811 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
812 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
813 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
815 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
816 ; SDAG-NEXT: s_endpgm
818 ; GISEL-LABEL: f16_ugt:
819 ; GISEL: ; %bb.0: ; %entry
820 ; GISEL-NEXT: s_cmp_nle_f16 s2, s3
821 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
822 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
823 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
824 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
825 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
826 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
827 ; GISEL-NEXT: s_nop 0
828 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
829 ; GISEL-NEXT: s_endpgm
831 %0 = fcmp ugt half %a, %b
832 %1 = sext i1 %0 to i32
833 store i32 %1, ptr addrspace(1) %out
837 define amdgpu_vs void @f16_une(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
838 ; SDAG-LABEL: f16_une:
839 ; SDAG: ; %bb.0: ; %entry
840 ; SDAG-NEXT: s_cmp_neq_f16 s2, s3
841 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
842 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
843 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
844 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
845 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
847 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
848 ; SDAG-NEXT: s_endpgm
850 ; GISEL-LABEL: f16_une:
851 ; GISEL: ; %bb.0: ; %entry
852 ; GISEL-NEXT: s_cmp_neq_f16 s2, s3
853 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
854 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
855 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
856 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
857 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
858 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
859 ; GISEL-NEXT: s_nop 0
860 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
861 ; GISEL-NEXT: s_endpgm
863 %0 = fcmp une half %a, %b
864 %1 = sext i1 %0 to i32
865 store i32 %1, ptr addrspace(1) %out
869 define amdgpu_vs void @f16_uge(ptr addrspace(1) inreg %out, half inreg %a, half inreg %b) {
870 ; SDAG-LABEL: f16_uge:
871 ; SDAG: ; %bb.0: ; %entry
872 ; SDAG-NEXT: s_cmp_nlt_f16 s2, s3
873 ; SDAG-NEXT: v_mov_b32_e32 v0, 0
874 ; SDAG-NEXT: s_cselect_b32 s2, -1, 0
875 ; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
876 ; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
877 ; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
879 ; SDAG-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
880 ; SDAG-NEXT: s_endpgm
882 ; GISEL-LABEL: f16_uge:
883 ; GISEL: ; %bb.0: ; %entry
884 ; GISEL-NEXT: s_cmp_nlt_f16 s2, s3
885 ; GISEL-NEXT: v_mov_b32_e32 v1, 0
886 ; GISEL-NEXT: s_cselect_b32 s2, 1, 0
887 ; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
888 ; GISEL-NEXT: s_bfe_i32 s2, s2, 0x10000
889 ; GISEL-NEXT: v_mov_b32_e32 v0, s2
890 ; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
891 ; GISEL-NEXT: s_nop 0
892 ; GISEL-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
893 ; GISEL-NEXT: s_endpgm
895 %0 = fcmp uge half %a, %b
896 %1 = sext i1 %0 to i32
897 store i32 %1, ptr addrspace(1) %out