1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -mattr="+wavefrontsize32" -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX11,SDAG-GFX11 %s
3 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr="+wavefrontsize32" -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX10,SDAG-GFX10 %s
5 ; RUN: llc -global-isel -march=amdgcn -mcpu=gfx1100 -mattr="+wavefrontsize32" -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX11,GISEL-GFX11 %s
6 ; RUN: llc -global-isel -march=amdgcn -mcpu=gfx1010 -mattr="+wavefrontsize32" -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX10,GISEL-GFX10 %s
8 declare i32 @llvm.amdgcn.fcmp.f32(float, float, i32) #0
9 declare i32 @llvm.amdgcn.fcmp.f64(double, double, i32) #0
10 declare float @llvm.fabs.f32(float) #0
12 declare i32 @llvm.amdgcn.fcmp.f16(half, half, i32) #0
13 declare half @llvm.fabs.f16(half) #0
15 define amdgpu_kernel void @v_fcmp_f32_oeq_with_fabs(ptr addrspace(1) %out, float %src, float %a) {
16 ; SDAG-GFX11-LABEL: v_fcmp_f32_oeq_with_fabs:
17 ; SDAG-GFX11: ; %bb.0:
18 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
19 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
20 ; SDAG-GFX11-NEXT: v_cmp_eq_f32_e64 s2, s2, |s3|
21 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
22 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
23 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
24 ; SDAG-GFX11-NEXT: s_nop 0
25 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
26 ; SDAG-GFX11-NEXT: s_endpgm
28 ; SDAG-GFX10-LABEL: v_fcmp_f32_oeq_with_fabs:
29 ; SDAG-GFX10: ; %bb.0:
30 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
31 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
32 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
33 ; SDAG-GFX10-NEXT: v_cmp_eq_f32_e64 s2, s2, |s3|
34 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
35 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
36 ; SDAG-GFX10-NEXT: s_endpgm
38 ; GISEL-GFX11-LABEL: v_fcmp_f32_oeq_with_fabs:
39 ; GISEL-GFX11: ; %bb.0:
40 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
41 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
42 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
43 ; GISEL-GFX11-NEXT: v_cmp_eq_f32_e64 s2, s2, |s3|
44 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
45 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
46 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
47 ; GISEL-GFX11-NEXT: s_nop 0
48 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
49 ; GISEL-GFX11-NEXT: s_endpgm
51 ; GISEL-GFX10-LABEL: v_fcmp_f32_oeq_with_fabs:
52 ; GISEL-GFX10: ; %bb.0:
53 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
54 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
55 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
56 ; GISEL-GFX10-NEXT: v_cmp_eq_f32_e64 s2, s2, |s3|
57 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
58 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
59 ; GISEL-GFX10-NEXT: s_endpgm
60 %temp = call float @llvm.fabs.f32(float %a)
61 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float %temp, i32 1)
62 store i32 %result, ptr addrspace(1) %out
66 define amdgpu_kernel void @v_fcmp_f32_oeq_both_operands_with_fabs(ptr addrspace(1) %out, float %src, float %a) {
67 ; SDAG-GFX11-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:
68 ; SDAG-GFX11: ; %bb.0:
69 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
70 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
71 ; SDAG-GFX11-NEXT: v_cmp_eq_f32_e64 s2, |s2|, |s3|
72 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
73 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
74 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
75 ; SDAG-GFX11-NEXT: s_nop 0
76 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
77 ; SDAG-GFX11-NEXT: s_endpgm
79 ; SDAG-GFX10-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:
80 ; SDAG-GFX10: ; %bb.0:
81 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
82 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
83 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
84 ; SDAG-GFX10-NEXT: v_cmp_eq_f32_e64 s2, |s2|, |s3|
85 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
86 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
87 ; SDAG-GFX10-NEXT: s_endpgm
89 ; GISEL-GFX11-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:
90 ; GISEL-GFX11: ; %bb.0:
91 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
92 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
93 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
94 ; GISEL-GFX11-NEXT: v_cmp_eq_f32_e64 s2, |s2|, |s3|
95 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
96 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
97 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
98 ; GISEL-GFX11-NEXT: s_nop 0
99 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
100 ; GISEL-GFX11-NEXT: s_endpgm
102 ; GISEL-GFX10-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:
103 ; GISEL-GFX10: ; %bb.0:
104 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
105 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
106 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
107 ; GISEL-GFX10-NEXT: v_cmp_eq_f32_e64 s2, |s2|, |s3|
108 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
109 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
110 ; GISEL-GFX10-NEXT: s_endpgm
111 %temp = call float @llvm.fabs.f32(float %a)
112 %src_input = call float @llvm.fabs.f32(float %src)
113 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src_input, float %temp, i32 1)
114 store i32 %result, ptr addrspace(1) %out
118 define amdgpu_kernel void @v_fcmp_f32(ptr addrspace(1) %out, float %src) {
119 ; SDAG-GFX11-LABEL: v_fcmp_f32:
120 ; SDAG-GFX11: ; %bb.0:
121 ; SDAG-GFX11-NEXT: s_endpgm
123 ; SDAG-GFX10-LABEL: v_fcmp_f32:
124 ; SDAG-GFX10: ; %bb.0:
125 ; SDAG-GFX10-NEXT: s_endpgm
127 ; GISEL-GFX11-LABEL: v_fcmp_f32:
128 ; GISEL-GFX11: ; %bb.0:
129 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
130 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, 0
131 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
132 ; GISEL-GFX11-NEXT: global_store_b32 v0, v0, s[0:1]
133 ; GISEL-GFX11-NEXT: s_nop 0
134 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
135 ; GISEL-GFX11-NEXT: s_endpgm
137 ; GISEL-GFX10-LABEL: v_fcmp_f32:
138 ; GISEL-GFX10: ; %bb.0:
139 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
140 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, 0
141 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
142 ; GISEL-GFX10-NEXT: global_store_dword v0, v0, s[0:1]
143 ; GISEL-GFX10-NEXT: s_endpgm
144 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 -1)
145 store i32 %result, ptr addrspace(1) %out
149 define amdgpu_kernel void @v_fcmp_f32_oeq(ptr addrspace(1) %out, float %src) {
150 ; SDAG-GFX11-LABEL: v_fcmp_f32_oeq:
151 ; SDAG-GFX11: ; %bb.0:
152 ; SDAG-GFX11-NEXT: s_clause 0x1
153 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
154 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
155 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
156 ; SDAG-GFX11-NEXT: v_cmp_eq_f32_e64 s2, 0x42c80000, s2
157 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
158 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
159 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
160 ; SDAG-GFX11-NEXT: s_nop 0
161 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
162 ; SDAG-GFX11-NEXT: s_endpgm
164 ; SDAG-GFX10-LABEL: v_fcmp_f32_oeq:
165 ; SDAG-GFX10: ; %bb.0:
166 ; SDAG-GFX10-NEXT: s_clause 0x1
167 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
168 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
169 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
170 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
171 ; SDAG-GFX10-NEXT: v_cmp_eq_f32_e64 s0, 0x42c80000, s4
172 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
173 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
174 ; SDAG-GFX10-NEXT: s_endpgm
176 ; GISEL-GFX11-LABEL: v_fcmp_f32_oeq:
177 ; GISEL-GFX11: ; %bb.0:
178 ; GISEL-GFX11-NEXT: s_clause 0x1
179 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
180 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
181 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
182 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
183 ; GISEL-GFX11-NEXT: v_cmp_eq_f32_e64 s2, 0x42c80000, s2
184 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
185 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
186 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
187 ; GISEL-GFX11-NEXT: s_nop 0
188 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
189 ; GISEL-GFX11-NEXT: s_endpgm
191 ; GISEL-GFX10-LABEL: v_fcmp_f32_oeq:
192 ; GISEL-GFX10: ; %bb.0:
193 ; GISEL-GFX10-NEXT: s_clause 0x1
194 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
195 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
196 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
197 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
198 ; GISEL-GFX10-NEXT: v_cmp_eq_f32_e64 s0, 0x42c80000, s4
199 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
200 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
201 ; GISEL-GFX10-NEXT: s_endpgm
202 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 1)
203 store i32 %result, ptr addrspace(1) %out
207 define amdgpu_kernel void @v_fcmp_f32_one(ptr addrspace(1) %out, float %src) {
208 ; SDAG-GFX11-LABEL: v_fcmp_f32_one:
209 ; SDAG-GFX11: ; %bb.0:
210 ; SDAG-GFX11-NEXT: s_clause 0x1
211 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
212 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
213 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
214 ; SDAG-GFX11-NEXT: v_cmp_neq_f32_e64 s2, 0x42c80000, s2
215 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
216 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
217 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
218 ; SDAG-GFX11-NEXT: s_nop 0
219 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
220 ; SDAG-GFX11-NEXT: s_endpgm
222 ; SDAG-GFX10-LABEL: v_fcmp_f32_one:
223 ; SDAG-GFX10: ; %bb.0:
224 ; SDAG-GFX10-NEXT: s_clause 0x1
225 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
226 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
227 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
228 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
229 ; SDAG-GFX10-NEXT: v_cmp_neq_f32_e64 s0, 0x42c80000, s4
230 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
231 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
232 ; SDAG-GFX10-NEXT: s_endpgm
234 ; GISEL-GFX11-LABEL: v_fcmp_f32_one:
235 ; GISEL-GFX11: ; %bb.0:
236 ; GISEL-GFX11-NEXT: s_clause 0x1
237 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
238 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
239 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
240 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
241 ; GISEL-GFX11-NEXT: v_cmp_neq_f32_e64 s2, 0x42c80000, s2
242 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
243 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
244 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
245 ; GISEL-GFX11-NEXT: s_nop 0
246 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
247 ; GISEL-GFX11-NEXT: s_endpgm
249 ; GISEL-GFX10-LABEL: v_fcmp_f32_one:
250 ; GISEL-GFX10: ; %bb.0:
251 ; GISEL-GFX10-NEXT: s_clause 0x1
252 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
253 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
254 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
255 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
256 ; GISEL-GFX10-NEXT: v_cmp_neq_f32_e64 s0, 0x42c80000, s4
257 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
258 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
259 ; GISEL-GFX10-NEXT: s_endpgm
260 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 6)
261 store i32 %result, ptr addrspace(1) %out
265 define amdgpu_kernel void @v_fcmp_f32_ogt(ptr addrspace(1) %out, float %src) {
266 ; SDAG-GFX11-LABEL: v_fcmp_f32_ogt:
267 ; SDAG-GFX11: ; %bb.0:
268 ; SDAG-GFX11-NEXT: s_clause 0x1
269 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
270 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
271 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
272 ; SDAG-GFX11-NEXT: v_cmp_lt_f32_e64 s2, 0x42c80000, s2
273 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
274 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
275 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
276 ; SDAG-GFX11-NEXT: s_nop 0
277 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
278 ; SDAG-GFX11-NEXT: s_endpgm
280 ; SDAG-GFX10-LABEL: v_fcmp_f32_ogt:
281 ; SDAG-GFX10: ; %bb.0:
282 ; SDAG-GFX10-NEXT: s_clause 0x1
283 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
284 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
285 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
286 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
287 ; SDAG-GFX10-NEXT: v_cmp_lt_f32_e64 s0, 0x42c80000, s4
288 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
289 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
290 ; SDAG-GFX10-NEXT: s_endpgm
292 ; GISEL-GFX11-LABEL: v_fcmp_f32_ogt:
293 ; GISEL-GFX11: ; %bb.0:
294 ; GISEL-GFX11-NEXT: s_clause 0x1
295 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
296 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
297 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
298 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
299 ; GISEL-GFX11-NEXT: v_cmp_lt_f32_e64 s2, 0x42c80000, s2
300 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
301 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
302 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
303 ; GISEL-GFX11-NEXT: s_nop 0
304 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
305 ; GISEL-GFX11-NEXT: s_endpgm
307 ; GISEL-GFX10-LABEL: v_fcmp_f32_ogt:
308 ; GISEL-GFX10: ; %bb.0:
309 ; GISEL-GFX10-NEXT: s_clause 0x1
310 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
311 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
312 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
313 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
314 ; GISEL-GFX10-NEXT: v_cmp_lt_f32_e64 s0, 0x42c80000, s4
315 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
316 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
317 ; GISEL-GFX10-NEXT: s_endpgm
318 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 2)
319 store i32 %result, ptr addrspace(1) %out
323 define amdgpu_kernel void @v_fcmp_f32_oge(ptr addrspace(1) %out, float %src) {
324 ; SDAG-GFX11-LABEL: v_fcmp_f32_oge:
325 ; SDAG-GFX11: ; %bb.0:
326 ; SDAG-GFX11-NEXT: s_clause 0x1
327 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
328 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
329 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
330 ; SDAG-GFX11-NEXT: v_cmp_le_f32_e64 s2, 0x42c80000, s2
331 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
332 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
333 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
334 ; SDAG-GFX11-NEXT: s_nop 0
335 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
336 ; SDAG-GFX11-NEXT: s_endpgm
338 ; SDAG-GFX10-LABEL: v_fcmp_f32_oge:
339 ; SDAG-GFX10: ; %bb.0:
340 ; SDAG-GFX10-NEXT: s_clause 0x1
341 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
342 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
343 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
344 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
345 ; SDAG-GFX10-NEXT: v_cmp_le_f32_e64 s0, 0x42c80000, s4
346 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
347 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
348 ; SDAG-GFX10-NEXT: s_endpgm
350 ; GISEL-GFX11-LABEL: v_fcmp_f32_oge:
351 ; GISEL-GFX11: ; %bb.0:
352 ; GISEL-GFX11-NEXT: s_clause 0x1
353 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
354 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
355 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
356 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
357 ; GISEL-GFX11-NEXT: v_cmp_le_f32_e64 s2, 0x42c80000, s2
358 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
359 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
360 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
361 ; GISEL-GFX11-NEXT: s_nop 0
362 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
363 ; GISEL-GFX11-NEXT: s_endpgm
365 ; GISEL-GFX10-LABEL: v_fcmp_f32_oge:
366 ; GISEL-GFX10: ; %bb.0:
367 ; GISEL-GFX10-NEXT: s_clause 0x1
368 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
369 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
370 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
371 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
372 ; GISEL-GFX10-NEXT: v_cmp_le_f32_e64 s0, 0x42c80000, s4
373 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
374 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
375 ; GISEL-GFX10-NEXT: s_endpgm
376 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 3)
377 store i32 %result, ptr addrspace(1) %out
381 define amdgpu_kernel void @v_fcmp_f32_olt(ptr addrspace(1) %out, float %src) {
382 ; SDAG-GFX11-LABEL: v_fcmp_f32_olt:
383 ; SDAG-GFX11: ; %bb.0:
384 ; SDAG-GFX11-NEXT: s_clause 0x1
385 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
386 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
387 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
388 ; SDAG-GFX11-NEXT: v_cmp_gt_f32_e64 s2, 0x42c80000, s2
389 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
390 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
391 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
392 ; SDAG-GFX11-NEXT: s_nop 0
393 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
394 ; SDAG-GFX11-NEXT: s_endpgm
396 ; SDAG-GFX10-LABEL: v_fcmp_f32_olt:
397 ; SDAG-GFX10: ; %bb.0:
398 ; SDAG-GFX10-NEXT: s_clause 0x1
399 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
400 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
401 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
402 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
403 ; SDAG-GFX10-NEXT: v_cmp_gt_f32_e64 s0, 0x42c80000, s4
404 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
405 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
406 ; SDAG-GFX10-NEXT: s_endpgm
408 ; GISEL-GFX11-LABEL: v_fcmp_f32_olt:
409 ; GISEL-GFX11: ; %bb.0:
410 ; GISEL-GFX11-NEXT: s_clause 0x1
411 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
412 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
413 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
414 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
415 ; GISEL-GFX11-NEXT: v_cmp_gt_f32_e64 s2, 0x42c80000, s2
416 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
417 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
418 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
419 ; GISEL-GFX11-NEXT: s_nop 0
420 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
421 ; GISEL-GFX11-NEXT: s_endpgm
423 ; GISEL-GFX10-LABEL: v_fcmp_f32_olt:
424 ; GISEL-GFX10: ; %bb.0:
425 ; GISEL-GFX10-NEXT: s_clause 0x1
426 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
427 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
428 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
429 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
430 ; GISEL-GFX10-NEXT: v_cmp_gt_f32_e64 s0, 0x42c80000, s4
431 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
432 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
433 ; GISEL-GFX10-NEXT: s_endpgm
434 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 4)
435 store i32 %result, ptr addrspace(1) %out
439 define amdgpu_kernel void @v_fcmp_f32_ole(ptr addrspace(1) %out, float %src) {
440 ; SDAG-GFX11-LABEL: v_fcmp_f32_ole:
441 ; SDAG-GFX11: ; %bb.0:
442 ; SDAG-GFX11-NEXT: s_clause 0x1
443 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
444 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
445 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
446 ; SDAG-GFX11-NEXT: v_cmp_ge_f32_e64 s2, 0x42c80000, s2
447 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
448 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
449 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
450 ; SDAG-GFX11-NEXT: s_nop 0
451 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
452 ; SDAG-GFX11-NEXT: s_endpgm
454 ; SDAG-GFX10-LABEL: v_fcmp_f32_ole:
455 ; SDAG-GFX10: ; %bb.0:
456 ; SDAG-GFX10-NEXT: s_clause 0x1
457 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
458 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
459 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
460 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
461 ; SDAG-GFX10-NEXT: v_cmp_ge_f32_e64 s0, 0x42c80000, s4
462 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
463 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
464 ; SDAG-GFX10-NEXT: s_endpgm
466 ; GISEL-GFX11-LABEL: v_fcmp_f32_ole:
467 ; GISEL-GFX11: ; %bb.0:
468 ; GISEL-GFX11-NEXT: s_clause 0x1
469 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
470 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
471 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
472 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
473 ; GISEL-GFX11-NEXT: v_cmp_ge_f32_e64 s2, 0x42c80000, s2
474 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
475 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
476 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
477 ; GISEL-GFX11-NEXT: s_nop 0
478 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
479 ; GISEL-GFX11-NEXT: s_endpgm
481 ; GISEL-GFX10-LABEL: v_fcmp_f32_ole:
482 ; GISEL-GFX10: ; %bb.0:
483 ; GISEL-GFX10-NEXT: s_clause 0x1
484 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
485 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
486 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
487 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
488 ; GISEL-GFX10-NEXT: v_cmp_ge_f32_e64 s0, 0x42c80000, s4
489 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
490 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
491 ; GISEL-GFX10-NEXT: s_endpgm
492 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 5)
493 store i32 %result, ptr addrspace(1) %out
498 define amdgpu_kernel void @v_fcmp_f32_ueq(ptr addrspace(1) %out, float %src) {
499 ; SDAG-GFX11-LABEL: v_fcmp_f32_ueq:
500 ; SDAG-GFX11: ; %bb.0:
501 ; SDAG-GFX11-NEXT: s_clause 0x1
502 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
503 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
504 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
505 ; SDAG-GFX11-NEXT: v_cmp_nlg_f32_e64 s2, 0x42c80000, s2
506 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
507 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
508 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
509 ; SDAG-GFX11-NEXT: s_nop 0
510 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
511 ; SDAG-GFX11-NEXT: s_endpgm
513 ; SDAG-GFX10-LABEL: v_fcmp_f32_ueq:
514 ; SDAG-GFX10: ; %bb.0:
515 ; SDAG-GFX10-NEXT: s_clause 0x1
516 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
517 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
518 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
519 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
520 ; SDAG-GFX10-NEXT: v_cmp_nlg_f32_e64 s0, 0x42c80000, s4
521 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
522 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
523 ; SDAG-GFX10-NEXT: s_endpgm
525 ; GISEL-GFX11-LABEL: v_fcmp_f32_ueq:
526 ; GISEL-GFX11: ; %bb.0:
527 ; GISEL-GFX11-NEXT: s_clause 0x1
528 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
529 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
530 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
531 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
532 ; GISEL-GFX11-NEXT: v_cmp_nlg_f32_e64 s2, 0x42c80000, s2
533 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
534 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
535 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
536 ; GISEL-GFX11-NEXT: s_nop 0
537 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
538 ; GISEL-GFX11-NEXT: s_endpgm
540 ; GISEL-GFX10-LABEL: v_fcmp_f32_ueq:
541 ; GISEL-GFX10: ; %bb.0:
542 ; GISEL-GFX10-NEXT: s_clause 0x1
543 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
544 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
545 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
546 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
547 ; GISEL-GFX10-NEXT: v_cmp_nlg_f32_e64 s0, 0x42c80000, s4
548 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
549 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
550 ; GISEL-GFX10-NEXT: s_endpgm
551 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 9)
552 store i32 %result, ptr addrspace(1) %out
556 define amdgpu_kernel void @v_fcmp_f32_une(ptr addrspace(1) %out, float %src) {
557 ; SDAG-GFX11-LABEL: v_fcmp_f32_une:
558 ; SDAG-GFX11: ; %bb.0:
559 ; SDAG-GFX11-NEXT: s_clause 0x1
560 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
561 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
562 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
563 ; SDAG-GFX11-NEXT: v_cmp_neq_f32_e64 s2, 0x42c80000, s2
564 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
565 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
566 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
567 ; SDAG-GFX11-NEXT: s_nop 0
568 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
569 ; SDAG-GFX11-NEXT: s_endpgm
571 ; SDAG-GFX10-LABEL: v_fcmp_f32_une:
572 ; SDAG-GFX10: ; %bb.0:
573 ; SDAG-GFX10-NEXT: s_clause 0x1
574 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
575 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
576 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
577 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
578 ; SDAG-GFX10-NEXT: v_cmp_neq_f32_e64 s0, 0x42c80000, s4
579 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
580 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
581 ; SDAG-GFX10-NEXT: s_endpgm
583 ; GISEL-GFX11-LABEL: v_fcmp_f32_une:
584 ; GISEL-GFX11: ; %bb.0:
585 ; GISEL-GFX11-NEXT: s_clause 0x1
586 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
587 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
588 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
589 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
590 ; GISEL-GFX11-NEXT: v_cmp_neq_f32_e64 s2, 0x42c80000, s2
591 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
592 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
593 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
594 ; GISEL-GFX11-NEXT: s_nop 0
595 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
596 ; GISEL-GFX11-NEXT: s_endpgm
598 ; GISEL-GFX10-LABEL: v_fcmp_f32_une:
599 ; GISEL-GFX10: ; %bb.0:
600 ; GISEL-GFX10-NEXT: s_clause 0x1
601 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
602 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
603 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
604 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
605 ; GISEL-GFX10-NEXT: v_cmp_neq_f32_e64 s0, 0x42c80000, s4
606 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
607 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
608 ; GISEL-GFX10-NEXT: s_endpgm
609 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 14)
610 store i32 %result, ptr addrspace(1) %out
614 define amdgpu_kernel void @v_fcmp_f32_ugt(ptr addrspace(1) %out, float %src) {
615 ; SDAG-GFX11-LABEL: v_fcmp_f32_ugt:
616 ; SDAG-GFX11: ; %bb.0:
617 ; SDAG-GFX11-NEXT: s_clause 0x1
618 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
619 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
620 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
621 ; SDAG-GFX11-NEXT: v_cmp_nge_f32_e64 s2, 0x42c80000, s2
622 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
623 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
624 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
625 ; SDAG-GFX11-NEXT: s_nop 0
626 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
627 ; SDAG-GFX11-NEXT: s_endpgm
629 ; SDAG-GFX10-LABEL: v_fcmp_f32_ugt:
630 ; SDAG-GFX10: ; %bb.0:
631 ; SDAG-GFX10-NEXT: s_clause 0x1
632 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
633 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
634 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
635 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
636 ; SDAG-GFX10-NEXT: v_cmp_nge_f32_e64 s0, 0x42c80000, s4
637 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
638 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
639 ; SDAG-GFX10-NEXT: s_endpgm
641 ; GISEL-GFX11-LABEL: v_fcmp_f32_ugt:
642 ; GISEL-GFX11: ; %bb.0:
643 ; GISEL-GFX11-NEXT: s_clause 0x1
644 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
645 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
646 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
647 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
648 ; GISEL-GFX11-NEXT: v_cmp_nge_f32_e64 s2, 0x42c80000, s2
649 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
650 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
651 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
652 ; GISEL-GFX11-NEXT: s_nop 0
653 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
654 ; GISEL-GFX11-NEXT: s_endpgm
656 ; GISEL-GFX10-LABEL: v_fcmp_f32_ugt:
657 ; GISEL-GFX10: ; %bb.0:
658 ; GISEL-GFX10-NEXT: s_clause 0x1
659 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
660 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
661 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
662 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
663 ; GISEL-GFX10-NEXT: v_cmp_nge_f32_e64 s0, 0x42c80000, s4
664 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
665 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
666 ; GISEL-GFX10-NEXT: s_endpgm
667 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 10)
668 store i32 %result, ptr addrspace(1) %out
672 define amdgpu_kernel void @v_fcmp_f32_uge(ptr addrspace(1) %out, float %src) {
673 ; SDAG-GFX11-LABEL: v_fcmp_f32_uge:
674 ; SDAG-GFX11: ; %bb.0:
675 ; SDAG-GFX11-NEXT: s_clause 0x1
676 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
677 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
678 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
679 ; SDAG-GFX11-NEXT: v_cmp_ngt_f32_e64 s2, 0x42c80000, s2
680 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
681 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
682 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
683 ; SDAG-GFX11-NEXT: s_nop 0
684 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
685 ; SDAG-GFX11-NEXT: s_endpgm
687 ; SDAG-GFX10-LABEL: v_fcmp_f32_uge:
688 ; SDAG-GFX10: ; %bb.0:
689 ; SDAG-GFX10-NEXT: s_clause 0x1
690 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
691 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
692 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
693 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
694 ; SDAG-GFX10-NEXT: v_cmp_ngt_f32_e64 s0, 0x42c80000, s4
695 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
696 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
697 ; SDAG-GFX10-NEXT: s_endpgm
699 ; GISEL-GFX11-LABEL: v_fcmp_f32_uge:
700 ; GISEL-GFX11: ; %bb.0:
701 ; GISEL-GFX11-NEXT: s_clause 0x1
702 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
703 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
704 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
705 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
706 ; GISEL-GFX11-NEXT: v_cmp_ngt_f32_e64 s2, 0x42c80000, s2
707 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
708 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
709 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
710 ; GISEL-GFX11-NEXT: s_nop 0
711 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
712 ; GISEL-GFX11-NEXT: s_endpgm
714 ; GISEL-GFX10-LABEL: v_fcmp_f32_uge:
715 ; GISEL-GFX10: ; %bb.0:
716 ; GISEL-GFX10-NEXT: s_clause 0x1
717 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
718 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
719 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
720 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
721 ; GISEL-GFX10-NEXT: v_cmp_ngt_f32_e64 s0, 0x42c80000, s4
722 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
723 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
724 ; GISEL-GFX10-NEXT: s_endpgm
725 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 11)
726 store i32 %result, ptr addrspace(1) %out
730 define amdgpu_kernel void @v_fcmp_f32_ult(ptr addrspace(1) %out, float %src) {
731 ; SDAG-GFX11-LABEL: v_fcmp_f32_ult:
732 ; SDAG-GFX11: ; %bb.0:
733 ; SDAG-GFX11-NEXT: s_clause 0x1
734 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
735 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
736 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
737 ; SDAG-GFX11-NEXT: v_cmp_nle_f32_e64 s2, 0x42c80000, s2
738 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
739 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
740 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
741 ; SDAG-GFX11-NEXT: s_nop 0
742 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
743 ; SDAG-GFX11-NEXT: s_endpgm
745 ; SDAG-GFX10-LABEL: v_fcmp_f32_ult:
746 ; SDAG-GFX10: ; %bb.0:
747 ; SDAG-GFX10-NEXT: s_clause 0x1
748 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
749 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
750 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
751 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
752 ; SDAG-GFX10-NEXT: v_cmp_nle_f32_e64 s0, 0x42c80000, s4
753 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
754 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
755 ; SDAG-GFX10-NEXT: s_endpgm
757 ; GISEL-GFX11-LABEL: v_fcmp_f32_ult:
758 ; GISEL-GFX11: ; %bb.0:
759 ; GISEL-GFX11-NEXT: s_clause 0x1
760 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
761 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
762 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
763 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
764 ; GISEL-GFX11-NEXT: v_cmp_nle_f32_e64 s2, 0x42c80000, s2
765 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
766 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
767 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
768 ; GISEL-GFX11-NEXT: s_nop 0
769 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
770 ; GISEL-GFX11-NEXT: s_endpgm
772 ; GISEL-GFX10-LABEL: v_fcmp_f32_ult:
773 ; GISEL-GFX10: ; %bb.0:
774 ; GISEL-GFX10-NEXT: s_clause 0x1
775 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
776 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
777 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
778 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
779 ; GISEL-GFX10-NEXT: v_cmp_nle_f32_e64 s0, 0x42c80000, s4
780 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
781 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
782 ; GISEL-GFX10-NEXT: s_endpgm
783 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 12)
784 store i32 %result, ptr addrspace(1) %out
788 define amdgpu_kernel void @v_fcmp_f32_ule(ptr addrspace(1) %out, float %src) {
789 ; SDAG-GFX11-LABEL: v_fcmp_f32_ule:
790 ; SDAG-GFX11: ; %bb.0:
791 ; SDAG-GFX11-NEXT: s_clause 0x1
792 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
793 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
794 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
795 ; SDAG-GFX11-NEXT: v_cmp_nlt_f32_e64 s2, 0x42c80000, s2
796 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
797 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
798 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
799 ; SDAG-GFX11-NEXT: s_nop 0
800 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
801 ; SDAG-GFX11-NEXT: s_endpgm
803 ; SDAG-GFX10-LABEL: v_fcmp_f32_ule:
804 ; SDAG-GFX10: ; %bb.0:
805 ; SDAG-GFX10-NEXT: s_clause 0x1
806 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
807 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
808 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
809 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
810 ; SDAG-GFX10-NEXT: v_cmp_nlt_f32_e64 s0, 0x42c80000, s4
811 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
812 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
813 ; SDAG-GFX10-NEXT: s_endpgm
815 ; GISEL-GFX11-LABEL: v_fcmp_f32_ule:
816 ; GISEL-GFX11: ; %bb.0:
817 ; GISEL-GFX11-NEXT: s_clause 0x1
818 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
819 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
820 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
821 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
822 ; GISEL-GFX11-NEXT: v_cmp_nlt_f32_e64 s2, 0x42c80000, s2
823 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
824 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
825 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
826 ; GISEL-GFX11-NEXT: s_nop 0
827 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
828 ; GISEL-GFX11-NEXT: s_endpgm
830 ; GISEL-GFX10-LABEL: v_fcmp_f32_ule:
831 ; GISEL-GFX10: ; %bb.0:
832 ; GISEL-GFX10-NEXT: s_clause 0x1
833 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
834 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
835 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
836 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
837 ; GISEL-GFX10-NEXT: v_cmp_nlt_f32_e64 s0, 0x42c80000, s4
838 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
839 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
840 ; GISEL-GFX10-NEXT: s_endpgm
841 %result = call i32 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 13)
842 store i32 %result, ptr addrspace(1) %out
846 define amdgpu_kernel void @v_fcmp_f64_oeq(ptr addrspace(1) %out, double %src) {
847 ; SDAG-GFX11-LABEL: v_fcmp_f64_oeq:
848 ; SDAG-GFX11: ; %bb.0:
849 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
850 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
851 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
852 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
853 ; SDAG-GFX11-NEXT: v_cmp_eq_f64_e64 s2, s[2:3], s[4:5]
854 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
855 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
856 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
857 ; SDAG-GFX11-NEXT: s_nop 0
858 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
859 ; SDAG-GFX11-NEXT: s_endpgm
861 ; SDAG-GFX10-LABEL: v_fcmp_f64_oeq:
862 ; SDAG-GFX10: ; %bb.0:
863 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
864 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
865 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
866 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
867 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
868 ; SDAG-GFX10-NEXT: v_cmp_eq_f64_e64 s2, s[2:3], s[4:5]
869 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
870 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
871 ; SDAG-GFX10-NEXT: s_endpgm
873 ; GISEL-GFX11-LABEL: v_fcmp_f64_oeq:
874 ; GISEL-GFX11: ; %bb.0:
875 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
876 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
877 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
878 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
879 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
880 ; GISEL-GFX11-NEXT: v_cmp_eq_f64_e64 s2, s[2:3], s[4:5]
881 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
882 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
883 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
884 ; GISEL-GFX11-NEXT: s_nop 0
885 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
886 ; GISEL-GFX11-NEXT: s_endpgm
888 ; GISEL-GFX10-LABEL: v_fcmp_f64_oeq:
889 ; GISEL-GFX10: ; %bb.0:
890 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
891 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
892 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
893 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
894 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
895 ; GISEL-GFX10-NEXT: v_cmp_eq_f64_e64 s2, s[2:3], s[4:5]
896 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
897 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
898 ; GISEL-GFX10-NEXT: s_endpgm
899 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 1)
900 store i32 %result, ptr addrspace(1) %out
904 define amdgpu_kernel void @v_fcmp_f64_one(ptr addrspace(1) %out, double %src) {
905 ; SDAG-GFX11-LABEL: v_fcmp_f64_one:
906 ; SDAG-GFX11: ; %bb.0:
907 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
908 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
909 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
910 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
911 ; SDAG-GFX11-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
912 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
913 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
914 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
915 ; SDAG-GFX11-NEXT: s_nop 0
916 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
917 ; SDAG-GFX11-NEXT: s_endpgm
919 ; SDAG-GFX10-LABEL: v_fcmp_f64_one:
920 ; SDAG-GFX10: ; %bb.0:
921 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
922 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
923 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
924 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
925 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
926 ; SDAG-GFX10-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
927 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
928 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
929 ; SDAG-GFX10-NEXT: s_endpgm
931 ; GISEL-GFX11-LABEL: v_fcmp_f64_one:
932 ; GISEL-GFX11: ; %bb.0:
933 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
934 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
935 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
936 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
937 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
938 ; GISEL-GFX11-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
939 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
940 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
941 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
942 ; GISEL-GFX11-NEXT: s_nop 0
943 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
944 ; GISEL-GFX11-NEXT: s_endpgm
946 ; GISEL-GFX10-LABEL: v_fcmp_f64_one:
947 ; GISEL-GFX10: ; %bb.0:
948 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
949 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
950 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
951 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
952 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
953 ; GISEL-GFX10-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
954 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
955 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
956 ; GISEL-GFX10-NEXT: s_endpgm
957 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 6)
958 store i32 %result, ptr addrspace(1) %out
962 define amdgpu_kernel void @v_fcmp_f64_ogt(ptr addrspace(1) %out, double %src) {
963 ; SDAG-GFX11-LABEL: v_fcmp_f64_ogt:
964 ; SDAG-GFX11: ; %bb.0:
965 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
966 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
967 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
968 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
969 ; SDAG-GFX11-NEXT: v_cmp_gt_f64_e64 s2, s[2:3], s[4:5]
970 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
971 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
972 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
973 ; SDAG-GFX11-NEXT: s_nop 0
974 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
975 ; SDAG-GFX11-NEXT: s_endpgm
977 ; SDAG-GFX10-LABEL: v_fcmp_f64_ogt:
978 ; SDAG-GFX10: ; %bb.0:
979 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
980 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
981 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
982 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
983 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
984 ; SDAG-GFX10-NEXT: v_cmp_gt_f64_e64 s2, s[2:3], s[4:5]
985 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
986 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
987 ; SDAG-GFX10-NEXT: s_endpgm
989 ; GISEL-GFX11-LABEL: v_fcmp_f64_ogt:
990 ; GISEL-GFX11: ; %bb.0:
991 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
992 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
993 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
994 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
995 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
996 ; GISEL-GFX11-NEXT: v_cmp_gt_f64_e64 s2, s[2:3], s[4:5]
997 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
998 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
999 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1000 ; GISEL-GFX11-NEXT: s_nop 0
1001 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1002 ; GISEL-GFX11-NEXT: s_endpgm
1004 ; GISEL-GFX10-LABEL: v_fcmp_f64_ogt:
1005 ; GISEL-GFX10: ; %bb.0:
1006 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1007 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1008 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1009 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1010 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1011 ; GISEL-GFX10-NEXT: v_cmp_gt_f64_e64 s2, s[2:3], s[4:5]
1012 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1013 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1014 ; GISEL-GFX10-NEXT: s_endpgm
1015 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 2)
1016 store i32 %result, ptr addrspace(1) %out
1020 define amdgpu_kernel void @v_fcmp_f64_oge(ptr addrspace(1) %out, double %src) {
1021 ; SDAG-GFX11-LABEL: v_fcmp_f64_oge:
1022 ; SDAG-GFX11: ; %bb.0:
1023 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1024 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1025 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1026 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1027 ; SDAG-GFX11-NEXT: v_cmp_ge_f64_e64 s2, s[2:3], s[4:5]
1028 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1029 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1030 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1031 ; SDAG-GFX11-NEXT: s_nop 0
1032 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1033 ; SDAG-GFX11-NEXT: s_endpgm
1035 ; SDAG-GFX10-LABEL: v_fcmp_f64_oge:
1036 ; SDAG-GFX10: ; %bb.0:
1037 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1038 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1039 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1040 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1041 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1042 ; SDAG-GFX10-NEXT: v_cmp_ge_f64_e64 s2, s[2:3], s[4:5]
1043 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1044 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1045 ; SDAG-GFX10-NEXT: s_endpgm
1047 ; GISEL-GFX11-LABEL: v_fcmp_f64_oge:
1048 ; GISEL-GFX11: ; %bb.0:
1049 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1050 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1051 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1052 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1053 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1054 ; GISEL-GFX11-NEXT: v_cmp_ge_f64_e64 s2, s[2:3], s[4:5]
1055 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1056 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1057 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1058 ; GISEL-GFX11-NEXT: s_nop 0
1059 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1060 ; GISEL-GFX11-NEXT: s_endpgm
1062 ; GISEL-GFX10-LABEL: v_fcmp_f64_oge:
1063 ; GISEL-GFX10: ; %bb.0:
1064 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1065 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1066 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1067 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1068 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1069 ; GISEL-GFX10-NEXT: v_cmp_ge_f64_e64 s2, s[2:3], s[4:5]
1070 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1071 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1072 ; GISEL-GFX10-NEXT: s_endpgm
1073 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 3)
1074 store i32 %result, ptr addrspace(1) %out
1078 define amdgpu_kernel void @v_fcmp_f64_olt(ptr addrspace(1) %out, double %src) {
1079 ; SDAG-GFX11-LABEL: v_fcmp_f64_olt:
1080 ; SDAG-GFX11: ; %bb.0:
1081 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1082 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1083 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1084 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1085 ; SDAG-GFX11-NEXT: v_cmp_lt_f64_e64 s2, s[2:3], s[4:5]
1086 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1087 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1088 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1089 ; SDAG-GFX11-NEXT: s_nop 0
1090 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1091 ; SDAG-GFX11-NEXT: s_endpgm
1093 ; SDAG-GFX10-LABEL: v_fcmp_f64_olt:
1094 ; SDAG-GFX10: ; %bb.0:
1095 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1096 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1097 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1098 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1099 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1100 ; SDAG-GFX10-NEXT: v_cmp_lt_f64_e64 s2, s[2:3], s[4:5]
1101 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1102 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1103 ; SDAG-GFX10-NEXT: s_endpgm
1105 ; GISEL-GFX11-LABEL: v_fcmp_f64_olt:
1106 ; GISEL-GFX11: ; %bb.0:
1107 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1108 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1109 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1110 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1111 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1112 ; GISEL-GFX11-NEXT: v_cmp_lt_f64_e64 s2, s[2:3], s[4:5]
1113 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1114 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1115 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1116 ; GISEL-GFX11-NEXT: s_nop 0
1117 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1118 ; GISEL-GFX11-NEXT: s_endpgm
1120 ; GISEL-GFX10-LABEL: v_fcmp_f64_olt:
1121 ; GISEL-GFX10: ; %bb.0:
1122 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1123 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1124 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1125 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1126 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1127 ; GISEL-GFX10-NEXT: v_cmp_lt_f64_e64 s2, s[2:3], s[4:5]
1128 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1129 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1130 ; GISEL-GFX10-NEXT: s_endpgm
1131 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 4)
1132 store i32 %result, ptr addrspace(1) %out
1136 define amdgpu_kernel void @v_fcmp_f64_ole(ptr addrspace(1) %out, double %src) {
1137 ; SDAG-GFX11-LABEL: v_fcmp_f64_ole:
1138 ; SDAG-GFX11: ; %bb.0:
1139 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1140 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1141 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1142 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1143 ; SDAG-GFX11-NEXT: v_cmp_le_f64_e64 s2, s[2:3], s[4:5]
1144 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1145 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1146 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1147 ; SDAG-GFX11-NEXT: s_nop 0
1148 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1149 ; SDAG-GFX11-NEXT: s_endpgm
1151 ; SDAG-GFX10-LABEL: v_fcmp_f64_ole:
1152 ; SDAG-GFX10: ; %bb.0:
1153 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1154 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1155 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1156 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1157 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1158 ; SDAG-GFX10-NEXT: v_cmp_le_f64_e64 s2, s[2:3], s[4:5]
1159 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1160 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1161 ; SDAG-GFX10-NEXT: s_endpgm
1163 ; GISEL-GFX11-LABEL: v_fcmp_f64_ole:
1164 ; GISEL-GFX11: ; %bb.0:
1165 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1166 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1167 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1168 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1169 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1170 ; GISEL-GFX11-NEXT: v_cmp_le_f64_e64 s2, s[2:3], s[4:5]
1171 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1172 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1173 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1174 ; GISEL-GFX11-NEXT: s_nop 0
1175 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1176 ; GISEL-GFX11-NEXT: s_endpgm
1178 ; GISEL-GFX10-LABEL: v_fcmp_f64_ole:
1179 ; GISEL-GFX10: ; %bb.0:
1180 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1181 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1182 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1183 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1184 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1185 ; GISEL-GFX10-NEXT: v_cmp_le_f64_e64 s2, s[2:3], s[4:5]
1186 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1187 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1188 ; GISEL-GFX10-NEXT: s_endpgm
1189 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 5)
1190 store i32 %result, ptr addrspace(1) %out
1194 define amdgpu_kernel void @v_fcmp_f64_ueq(ptr addrspace(1) %out, double %src) {
1195 ; SDAG-GFX11-LABEL: v_fcmp_f64_ueq:
1196 ; SDAG-GFX11: ; %bb.0:
1197 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1198 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1199 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1200 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1201 ; SDAG-GFX11-NEXT: v_cmp_nlg_f64_e64 s2, s[2:3], s[4:5]
1202 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1203 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1204 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1205 ; SDAG-GFX11-NEXT: s_nop 0
1206 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1207 ; SDAG-GFX11-NEXT: s_endpgm
1209 ; SDAG-GFX10-LABEL: v_fcmp_f64_ueq:
1210 ; SDAG-GFX10: ; %bb.0:
1211 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1212 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1213 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1214 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1215 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1216 ; SDAG-GFX10-NEXT: v_cmp_nlg_f64_e64 s2, s[2:3], s[4:5]
1217 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1218 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1219 ; SDAG-GFX10-NEXT: s_endpgm
1221 ; GISEL-GFX11-LABEL: v_fcmp_f64_ueq:
1222 ; GISEL-GFX11: ; %bb.0:
1223 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1224 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1225 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1226 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1227 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1228 ; GISEL-GFX11-NEXT: v_cmp_nlg_f64_e64 s2, s[2:3], s[4:5]
1229 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1230 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1231 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1232 ; GISEL-GFX11-NEXT: s_nop 0
1233 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1234 ; GISEL-GFX11-NEXT: s_endpgm
1236 ; GISEL-GFX10-LABEL: v_fcmp_f64_ueq:
1237 ; GISEL-GFX10: ; %bb.0:
1238 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1239 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1240 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1241 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1242 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1243 ; GISEL-GFX10-NEXT: v_cmp_nlg_f64_e64 s2, s[2:3], s[4:5]
1244 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1245 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1246 ; GISEL-GFX10-NEXT: s_endpgm
1247 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 9)
1248 store i32 %result, ptr addrspace(1) %out
1252 define amdgpu_kernel void @v_fcmp_f64_une(ptr addrspace(1) %out, double %src) {
1253 ; SDAG-GFX11-LABEL: v_fcmp_f64_une:
1254 ; SDAG-GFX11: ; %bb.0:
1255 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1256 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1257 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1258 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1259 ; SDAG-GFX11-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
1260 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1261 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1262 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1263 ; SDAG-GFX11-NEXT: s_nop 0
1264 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1265 ; SDAG-GFX11-NEXT: s_endpgm
1267 ; SDAG-GFX10-LABEL: v_fcmp_f64_une:
1268 ; SDAG-GFX10: ; %bb.0:
1269 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1270 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1271 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1272 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1273 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1274 ; SDAG-GFX10-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
1275 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1276 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1277 ; SDAG-GFX10-NEXT: s_endpgm
1279 ; GISEL-GFX11-LABEL: v_fcmp_f64_une:
1280 ; GISEL-GFX11: ; %bb.0:
1281 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1282 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1283 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1284 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1285 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1286 ; GISEL-GFX11-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
1287 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1288 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1289 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1290 ; GISEL-GFX11-NEXT: s_nop 0
1291 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1292 ; GISEL-GFX11-NEXT: s_endpgm
1294 ; GISEL-GFX10-LABEL: v_fcmp_f64_une:
1295 ; GISEL-GFX10: ; %bb.0:
1296 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1297 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1298 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1299 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1300 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1301 ; GISEL-GFX10-NEXT: v_cmp_neq_f64_e64 s2, s[2:3], s[4:5]
1302 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1303 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1304 ; GISEL-GFX10-NEXT: s_endpgm
1305 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 14)
1306 store i32 %result, ptr addrspace(1) %out
1310 define amdgpu_kernel void @v_fcmp_f64_ugt(ptr addrspace(1) %out, double %src) {
1311 ; SDAG-GFX11-LABEL: v_fcmp_f64_ugt:
1312 ; SDAG-GFX11: ; %bb.0:
1313 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1314 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1315 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1316 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1317 ; SDAG-GFX11-NEXT: v_cmp_nle_f64_e64 s2, s[2:3], s[4:5]
1318 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1319 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1320 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1321 ; SDAG-GFX11-NEXT: s_nop 0
1322 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1323 ; SDAG-GFX11-NEXT: s_endpgm
1325 ; SDAG-GFX10-LABEL: v_fcmp_f64_ugt:
1326 ; SDAG-GFX10: ; %bb.0:
1327 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1328 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1329 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1330 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1331 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1332 ; SDAG-GFX10-NEXT: v_cmp_nle_f64_e64 s2, s[2:3], s[4:5]
1333 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1334 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1335 ; SDAG-GFX10-NEXT: s_endpgm
1337 ; GISEL-GFX11-LABEL: v_fcmp_f64_ugt:
1338 ; GISEL-GFX11: ; %bb.0:
1339 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1340 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1341 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1342 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1343 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1344 ; GISEL-GFX11-NEXT: v_cmp_nle_f64_e64 s2, s[2:3], s[4:5]
1345 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1346 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1347 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1348 ; GISEL-GFX11-NEXT: s_nop 0
1349 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1350 ; GISEL-GFX11-NEXT: s_endpgm
1352 ; GISEL-GFX10-LABEL: v_fcmp_f64_ugt:
1353 ; GISEL-GFX10: ; %bb.0:
1354 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1355 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1356 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1357 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1358 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1359 ; GISEL-GFX10-NEXT: v_cmp_nle_f64_e64 s2, s[2:3], s[4:5]
1360 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1361 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1362 ; GISEL-GFX10-NEXT: s_endpgm
1363 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 10)
1364 store i32 %result, ptr addrspace(1) %out
1368 define amdgpu_kernel void @v_fcmp_f64_uge(ptr addrspace(1) %out, double %src) {
1369 ; SDAG-GFX11-LABEL: v_fcmp_f64_uge:
1370 ; SDAG-GFX11: ; %bb.0:
1371 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1372 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1373 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1374 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1375 ; SDAG-GFX11-NEXT: v_cmp_nlt_f64_e64 s2, s[2:3], s[4:5]
1376 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1377 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1378 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1379 ; SDAG-GFX11-NEXT: s_nop 0
1380 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1381 ; SDAG-GFX11-NEXT: s_endpgm
1383 ; SDAG-GFX10-LABEL: v_fcmp_f64_uge:
1384 ; SDAG-GFX10: ; %bb.0:
1385 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1386 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1387 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1388 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1389 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1390 ; SDAG-GFX10-NEXT: v_cmp_nlt_f64_e64 s2, s[2:3], s[4:5]
1391 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1392 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1393 ; SDAG-GFX10-NEXT: s_endpgm
1395 ; GISEL-GFX11-LABEL: v_fcmp_f64_uge:
1396 ; GISEL-GFX11: ; %bb.0:
1397 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1398 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1399 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1400 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1401 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1402 ; GISEL-GFX11-NEXT: v_cmp_nlt_f64_e64 s2, s[2:3], s[4:5]
1403 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1404 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1405 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1406 ; GISEL-GFX11-NEXT: s_nop 0
1407 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1408 ; GISEL-GFX11-NEXT: s_endpgm
1410 ; GISEL-GFX10-LABEL: v_fcmp_f64_uge:
1411 ; GISEL-GFX10: ; %bb.0:
1412 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1413 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1414 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1415 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1416 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1417 ; GISEL-GFX10-NEXT: v_cmp_nlt_f64_e64 s2, s[2:3], s[4:5]
1418 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1419 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1420 ; GISEL-GFX10-NEXT: s_endpgm
1421 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 11)
1422 store i32 %result, ptr addrspace(1) %out
1426 define amdgpu_kernel void @v_fcmp_f64_ult(ptr addrspace(1) %out, double %src) {
1427 ; SDAG-GFX11-LABEL: v_fcmp_f64_ult:
1428 ; SDAG-GFX11: ; %bb.0:
1429 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1430 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1431 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1432 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1433 ; SDAG-GFX11-NEXT: v_cmp_nge_f64_e64 s2, s[2:3], s[4:5]
1434 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1435 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1436 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1437 ; SDAG-GFX11-NEXT: s_nop 0
1438 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1439 ; SDAG-GFX11-NEXT: s_endpgm
1441 ; SDAG-GFX10-LABEL: v_fcmp_f64_ult:
1442 ; SDAG-GFX10: ; %bb.0:
1443 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1444 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1445 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1446 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1447 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1448 ; SDAG-GFX10-NEXT: v_cmp_nge_f64_e64 s2, s[2:3], s[4:5]
1449 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1450 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1451 ; SDAG-GFX10-NEXT: s_endpgm
1453 ; GISEL-GFX11-LABEL: v_fcmp_f64_ult:
1454 ; GISEL-GFX11: ; %bb.0:
1455 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1456 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1457 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1458 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1459 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1460 ; GISEL-GFX11-NEXT: v_cmp_nge_f64_e64 s2, s[2:3], s[4:5]
1461 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1462 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1463 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1464 ; GISEL-GFX11-NEXT: s_nop 0
1465 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1466 ; GISEL-GFX11-NEXT: s_endpgm
1468 ; GISEL-GFX10-LABEL: v_fcmp_f64_ult:
1469 ; GISEL-GFX10: ; %bb.0:
1470 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1471 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1472 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1473 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1474 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1475 ; GISEL-GFX10-NEXT: v_cmp_nge_f64_e64 s2, s[2:3], s[4:5]
1476 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1477 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1478 ; GISEL-GFX10-NEXT: s_endpgm
1479 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 12)
1480 store i32 %result, ptr addrspace(1) %out
1484 define amdgpu_kernel void @v_fcmp_f64_ule(ptr addrspace(1) %out, double %src) {
1485 ; SDAG-GFX11-LABEL: v_fcmp_f64_ule:
1486 ; SDAG-GFX11: ; %bb.0:
1487 ; SDAG-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1488 ; SDAG-GFX11-NEXT: s_mov_b32 s4, 0
1489 ; SDAG-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1490 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1491 ; SDAG-GFX11-NEXT: v_cmp_ngt_f64_e64 s2, s[2:3], s[4:5]
1492 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1493 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1494 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1495 ; SDAG-GFX11-NEXT: s_nop 0
1496 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1497 ; SDAG-GFX11-NEXT: s_endpgm
1499 ; SDAG-GFX10-LABEL: v_fcmp_f64_ule:
1500 ; SDAG-GFX10: ; %bb.0:
1501 ; SDAG-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1502 ; SDAG-GFX10-NEXT: s_mov_b32 s4, 0
1503 ; SDAG-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1504 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1505 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1506 ; SDAG-GFX10-NEXT: v_cmp_ngt_f64_e64 s2, s[2:3], s[4:5]
1507 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s2
1508 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[0:1]
1509 ; SDAG-GFX10-NEXT: s_endpgm
1511 ; GISEL-GFX11-LABEL: v_fcmp_f64_ule:
1512 ; GISEL-GFX11: ; %bb.0:
1513 ; GISEL-GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
1514 ; GISEL-GFX11-NEXT: s_mov_b32 s4, 0
1515 ; GISEL-GFX11-NEXT: s_mov_b32 s5, 0x40590000
1516 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1517 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1518 ; GISEL-GFX11-NEXT: v_cmp_ngt_f64_e64 s2, s[2:3], s[4:5]
1519 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1520 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1521 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1522 ; GISEL-GFX11-NEXT: s_nop 0
1523 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1524 ; GISEL-GFX11-NEXT: s_endpgm
1526 ; GISEL-GFX10-LABEL: v_fcmp_f64_ule:
1527 ; GISEL-GFX10: ; %bb.0:
1528 ; GISEL-GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1529 ; GISEL-GFX10-NEXT: s_mov_b32 s4, 0
1530 ; GISEL-GFX10-NEXT: s_mov_b32 s5, 0x40590000
1531 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1532 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1533 ; GISEL-GFX10-NEXT: v_cmp_ngt_f64_e64 s2, s[2:3], s[4:5]
1534 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s2
1535 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[0:1]
1536 ; GISEL-GFX10-NEXT: s_endpgm
1537 %result = call i32 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 13)
1538 store i32 %result, ptr addrspace(1) %out
1543 define amdgpu_kernel void @v_fcmp_f16_oeq_with_fabs(ptr addrspace(1) %out, half %src, half %a) {
1544 ; SDAG-GFX11-LABEL: v_fcmp_f16_oeq_with_fabs:
1545 ; SDAG-GFX11: ; %bb.0:
1546 ; SDAG-GFX11-NEXT: s_clause 0x1
1547 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1548 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1549 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1550 ; SDAG-GFX11-NEXT: s_lshr_b32 s3, s2, 16
1551 ; SDAG-GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1552 ; SDAG-GFX11-NEXT: v_cmp_eq_f16_e64 s2, s2, |s3|
1553 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1554 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1555 ; SDAG-GFX11-NEXT: s_nop 0
1556 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1557 ; SDAG-GFX11-NEXT: s_endpgm
1559 ; SDAG-GFX10-LABEL: v_fcmp_f16_oeq_with_fabs:
1560 ; SDAG-GFX10: ; %bb.0:
1561 ; SDAG-GFX10-NEXT: s_clause 0x1
1562 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1563 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1564 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1565 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1566 ; SDAG-GFX10-NEXT: s_lshr_b32 s0, s4, 16
1567 ; SDAG-GFX10-NEXT: v_cmp_eq_f16_e64 s0, s4, |s0|
1568 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1569 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1570 ; SDAG-GFX10-NEXT: s_endpgm
1572 ; GISEL-GFX11-LABEL: v_fcmp_f16_oeq_with_fabs:
1573 ; GISEL-GFX11: ; %bb.0:
1574 ; GISEL-GFX11-NEXT: s_clause 0x1
1575 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1576 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1577 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1578 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1579 ; GISEL-GFX11-NEXT: s_lshr_b32 s3, s2, 16
1580 ; GISEL-GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1581 ; GISEL-GFX11-NEXT: v_cmp_eq_f16_e64 s2, s2, |s3|
1582 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1583 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1584 ; GISEL-GFX11-NEXT: s_nop 0
1585 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1586 ; GISEL-GFX11-NEXT: s_endpgm
1588 ; GISEL-GFX10-LABEL: v_fcmp_f16_oeq_with_fabs:
1589 ; GISEL-GFX10: ; %bb.0:
1590 ; GISEL-GFX10-NEXT: s_clause 0x1
1591 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1592 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1593 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1594 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1595 ; GISEL-GFX10-NEXT: s_lshr_b32 s0, s4, 16
1596 ; GISEL-GFX10-NEXT: v_cmp_eq_f16_e64 s0, s4, |s0|
1597 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1598 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1599 ; GISEL-GFX10-NEXT: s_endpgm
1600 %temp = call half @llvm.fabs.f16(half %a)
1601 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half %temp, i32 1)
1602 store i32 %result, ptr addrspace(1) %out
1607 define amdgpu_kernel void @v_fcmp_f16_oeq_both_operands_with_fabs(ptr addrspace(1) %out, half %src, half %a) {
1608 ; SDAG-GFX11-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:
1609 ; SDAG-GFX11: ; %bb.0:
1610 ; SDAG-GFX11-NEXT: s_clause 0x1
1611 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1612 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1613 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1614 ; SDAG-GFX11-NEXT: s_lshr_b32 s3, s2, 16
1615 ; SDAG-GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1616 ; SDAG-GFX11-NEXT: v_cmp_eq_f16_e64 s2, |s2|, |s3|
1617 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1618 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1619 ; SDAG-GFX11-NEXT: s_nop 0
1620 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1621 ; SDAG-GFX11-NEXT: s_endpgm
1623 ; SDAG-GFX10-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:
1624 ; SDAG-GFX10: ; %bb.0:
1625 ; SDAG-GFX10-NEXT: s_clause 0x1
1626 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1627 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1628 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1629 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1630 ; SDAG-GFX10-NEXT: s_lshr_b32 s0, s4, 16
1631 ; SDAG-GFX10-NEXT: v_cmp_eq_f16_e64 s0, |s4|, |s0|
1632 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1633 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1634 ; SDAG-GFX10-NEXT: s_endpgm
1636 ; GISEL-GFX11-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:
1637 ; GISEL-GFX11: ; %bb.0:
1638 ; GISEL-GFX11-NEXT: s_clause 0x1
1639 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1640 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1641 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1642 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1643 ; GISEL-GFX11-NEXT: s_lshr_b32 s3, s2, 16
1644 ; GISEL-GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
1645 ; GISEL-GFX11-NEXT: v_cmp_eq_f16_e64 s2, |s2|, |s3|
1646 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1647 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1648 ; GISEL-GFX11-NEXT: s_nop 0
1649 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1650 ; GISEL-GFX11-NEXT: s_endpgm
1652 ; GISEL-GFX10-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:
1653 ; GISEL-GFX10: ; %bb.0:
1654 ; GISEL-GFX10-NEXT: s_clause 0x1
1655 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1656 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1657 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1658 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1659 ; GISEL-GFX10-NEXT: s_lshr_b32 s0, s4, 16
1660 ; GISEL-GFX10-NEXT: v_cmp_eq_f16_e64 s0, |s4|, |s0|
1661 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1662 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1663 ; GISEL-GFX10-NEXT: s_endpgm
1664 %temp = call half @llvm.fabs.f16(half %a)
1665 %src_input = call half @llvm.fabs.f16(half %src)
1666 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src_input, half %temp, i32 1)
1667 store i32 %result, ptr addrspace(1) %out
1671 define amdgpu_kernel void @v_fcmp_f16(ptr addrspace(1) %out, half %src) {
1672 ; SDAG-GFX11-LABEL: v_fcmp_f16:
1673 ; SDAG-GFX11: ; %bb.0:
1674 ; SDAG-GFX11-NEXT: s_endpgm
1676 ; SDAG-GFX10-LABEL: v_fcmp_f16:
1677 ; SDAG-GFX10: ; %bb.0:
1678 ; SDAG-GFX10-NEXT: s_endpgm
1680 ; GISEL-GFX11-LABEL: v_fcmp_f16:
1681 ; GISEL-GFX11: ; %bb.0:
1682 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1683 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, 0
1684 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1685 ; GISEL-GFX11-NEXT: global_store_b32 v0, v0, s[0:1]
1686 ; GISEL-GFX11-NEXT: s_nop 0
1687 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1688 ; GISEL-GFX11-NEXT: s_endpgm
1690 ; GISEL-GFX10-LABEL: v_fcmp_f16:
1691 ; GISEL-GFX10: ; %bb.0:
1692 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1693 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, 0
1694 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1695 ; GISEL-GFX10-NEXT: global_store_dword v0, v0, s[0:1]
1696 ; GISEL-GFX10-NEXT: s_endpgm
1697 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 -1)
1698 store i32 %result, ptr addrspace(1) %out
1703 define amdgpu_kernel void @v_fcmp_f16_oeq(ptr addrspace(1) %out, half %src) {
1704 ; SDAG-GFX11-LABEL: v_fcmp_f16_oeq:
1705 ; SDAG-GFX11: ; %bb.0:
1706 ; SDAG-GFX11-NEXT: s_clause 0x1
1707 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1708 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1709 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1710 ; SDAG-GFX11-NEXT: v_cmp_eq_f16_e64 s2, 0x5640, s2
1711 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1712 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1713 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1714 ; SDAG-GFX11-NEXT: s_nop 0
1715 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1716 ; SDAG-GFX11-NEXT: s_endpgm
1718 ; SDAG-GFX10-LABEL: v_fcmp_f16_oeq:
1719 ; SDAG-GFX10: ; %bb.0:
1720 ; SDAG-GFX10-NEXT: s_clause 0x1
1721 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1722 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1723 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1724 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1725 ; SDAG-GFX10-NEXT: v_cmp_eq_f16_e64 s0, 0x5640, s4
1726 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1727 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1728 ; SDAG-GFX10-NEXT: s_endpgm
1730 ; GISEL-GFX11-LABEL: v_fcmp_f16_oeq:
1731 ; GISEL-GFX11: ; %bb.0:
1732 ; GISEL-GFX11-NEXT: s_clause 0x1
1733 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1734 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1735 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1736 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1737 ; GISEL-GFX11-NEXT: v_cmp_eq_f16_e64 s2, 0x5640, s2
1738 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1739 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1740 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1741 ; GISEL-GFX11-NEXT: s_nop 0
1742 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1743 ; GISEL-GFX11-NEXT: s_endpgm
1745 ; GISEL-GFX10-LABEL: v_fcmp_f16_oeq:
1746 ; GISEL-GFX10: ; %bb.0:
1747 ; GISEL-GFX10-NEXT: s_clause 0x1
1748 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1749 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1750 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1751 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1752 ; GISEL-GFX10-NEXT: v_cmp_eq_f16_e64 s0, 0x5640, s4
1753 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1754 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1755 ; GISEL-GFX10-NEXT: s_endpgm
1756 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 1)
1757 store i32 %result, ptr addrspace(1) %out
1762 define amdgpu_kernel void @v_fcmp_f16_one(ptr addrspace(1) %out, half %src) {
1763 ; SDAG-GFX11-LABEL: v_fcmp_f16_one:
1764 ; SDAG-GFX11: ; %bb.0:
1765 ; SDAG-GFX11-NEXT: s_clause 0x1
1766 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1767 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1768 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1769 ; SDAG-GFX11-NEXT: v_cmp_neq_f16_e64 s2, 0x5640, s2
1770 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1771 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1772 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1773 ; SDAG-GFX11-NEXT: s_nop 0
1774 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1775 ; SDAG-GFX11-NEXT: s_endpgm
1777 ; SDAG-GFX10-LABEL: v_fcmp_f16_one:
1778 ; SDAG-GFX10: ; %bb.0:
1779 ; SDAG-GFX10-NEXT: s_clause 0x1
1780 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1781 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1782 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1783 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1784 ; SDAG-GFX10-NEXT: v_cmp_neq_f16_e64 s0, 0x5640, s4
1785 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1786 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1787 ; SDAG-GFX10-NEXT: s_endpgm
1789 ; GISEL-GFX11-LABEL: v_fcmp_f16_one:
1790 ; GISEL-GFX11: ; %bb.0:
1791 ; GISEL-GFX11-NEXT: s_clause 0x1
1792 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1793 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1794 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1795 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1796 ; GISEL-GFX11-NEXT: v_cmp_neq_f16_e64 s2, 0x5640, s2
1797 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1798 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1799 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1800 ; GISEL-GFX11-NEXT: s_nop 0
1801 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1802 ; GISEL-GFX11-NEXT: s_endpgm
1804 ; GISEL-GFX10-LABEL: v_fcmp_f16_one:
1805 ; GISEL-GFX10: ; %bb.0:
1806 ; GISEL-GFX10-NEXT: s_clause 0x1
1807 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1808 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1809 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1810 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1811 ; GISEL-GFX10-NEXT: v_cmp_neq_f16_e64 s0, 0x5640, s4
1812 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1813 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1814 ; GISEL-GFX10-NEXT: s_endpgm
1815 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 6)
1816 store i32 %result, ptr addrspace(1) %out
1821 define amdgpu_kernel void @v_fcmp_f16_ogt(ptr addrspace(1) %out, half %src) {
1822 ; SDAG-GFX11-LABEL: v_fcmp_f16_ogt:
1823 ; SDAG-GFX11: ; %bb.0:
1824 ; SDAG-GFX11-NEXT: s_clause 0x1
1825 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1826 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1827 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1828 ; SDAG-GFX11-NEXT: v_cmp_lt_f16_e64 s2, 0x5640, s2
1829 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1830 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1831 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1832 ; SDAG-GFX11-NEXT: s_nop 0
1833 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1834 ; SDAG-GFX11-NEXT: s_endpgm
1836 ; SDAG-GFX10-LABEL: v_fcmp_f16_ogt:
1837 ; SDAG-GFX10: ; %bb.0:
1838 ; SDAG-GFX10-NEXT: s_clause 0x1
1839 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1840 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1841 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1842 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1843 ; SDAG-GFX10-NEXT: v_cmp_lt_f16_e64 s0, 0x5640, s4
1844 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1845 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1846 ; SDAG-GFX10-NEXT: s_endpgm
1848 ; GISEL-GFX11-LABEL: v_fcmp_f16_ogt:
1849 ; GISEL-GFX11: ; %bb.0:
1850 ; GISEL-GFX11-NEXT: s_clause 0x1
1851 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1852 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1853 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1854 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1855 ; GISEL-GFX11-NEXT: v_cmp_lt_f16_e64 s2, 0x5640, s2
1856 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1857 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1858 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1859 ; GISEL-GFX11-NEXT: s_nop 0
1860 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1861 ; GISEL-GFX11-NEXT: s_endpgm
1863 ; GISEL-GFX10-LABEL: v_fcmp_f16_ogt:
1864 ; GISEL-GFX10: ; %bb.0:
1865 ; GISEL-GFX10-NEXT: s_clause 0x1
1866 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1867 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1868 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1869 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1870 ; GISEL-GFX10-NEXT: v_cmp_lt_f16_e64 s0, 0x5640, s4
1871 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1872 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1873 ; GISEL-GFX10-NEXT: s_endpgm
1874 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 2)
1875 store i32 %result, ptr addrspace(1) %out
1880 define amdgpu_kernel void @v_fcmp_f16_oge(ptr addrspace(1) %out, half %src) {
1881 ; SDAG-GFX11-LABEL: v_fcmp_f16_oge:
1882 ; SDAG-GFX11: ; %bb.0:
1883 ; SDAG-GFX11-NEXT: s_clause 0x1
1884 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1885 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1886 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1887 ; SDAG-GFX11-NEXT: v_cmp_le_f16_e64 s2, 0x5640, s2
1888 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1889 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1890 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1891 ; SDAG-GFX11-NEXT: s_nop 0
1892 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1893 ; SDAG-GFX11-NEXT: s_endpgm
1895 ; SDAG-GFX10-LABEL: v_fcmp_f16_oge:
1896 ; SDAG-GFX10: ; %bb.0:
1897 ; SDAG-GFX10-NEXT: s_clause 0x1
1898 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1899 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1900 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1901 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1902 ; SDAG-GFX10-NEXT: v_cmp_le_f16_e64 s0, 0x5640, s4
1903 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1904 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1905 ; SDAG-GFX10-NEXT: s_endpgm
1907 ; GISEL-GFX11-LABEL: v_fcmp_f16_oge:
1908 ; GISEL-GFX11: ; %bb.0:
1909 ; GISEL-GFX11-NEXT: s_clause 0x1
1910 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1911 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1912 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1913 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1914 ; GISEL-GFX11-NEXT: v_cmp_le_f16_e64 s2, 0x5640, s2
1915 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1916 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1917 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1918 ; GISEL-GFX11-NEXT: s_nop 0
1919 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1920 ; GISEL-GFX11-NEXT: s_endpgm
1922 ; GISEL-GFX10-LABEL: v_fcmp_f16_oge:
1923 ; GISEL-GFX10: ; %bb.0:
1924 ; GISEL-GFX10-NEXT: s_clause 0x1
1925 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1926 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1927 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1928 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1929 ; GISEL-GFX10-NEXT: v_cmp_le_f16_e64 s0, 0x5640, s4
1930 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1931 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1932 ; GISEL-GFX10-NEXT: s_endpgm
1933 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 3)
1934 store i32 %result, ptr addrspace(1) %out
1939 define amdgpu_kernel void @v_fcmp_f16_olt(ptr addrspace(1) %out, half %src) {
1940 ; SDAG-GFX11-LABEL: v_fcmp_f16_olt:
1941 ; SDAG-GFX11: ; %bb.0:
1942 ; SDAG-GFX11-NEXT: s_clause 0x1
1943 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1944 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1945 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1946 ; SDAG-GFX11-NEXT: v_cmp_gt_f16_e64 s2, 0x5640, s2
1947 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1948 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
1949 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
1950 ; SDAG-GFX11-NEXT: s_nop 0
1951 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1952 ; SDAG-GFX11-NEXT: s_endpgm
1954 ; SDAG-GFX10-LABEL: v_fcmp_f16_olt:
1955 ; SDAG-GFX10: ; %bb.0:
1956 ; SDAG-GFX10-NEXT: s_clause 0x1
1957 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1958 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1959 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
1960 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1961 ; SDAG-GFX10-NEXT: v_cmp_gt_f16_e64 s0, 0x5640, s4
1962 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
1963 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
1964 ; SDAG-GFX10-NEXT: s_endpgm
1966 ; GISEL-GFX11-LABEL: v_fcmp_f16_olt:
1967 ; GISEL-GFX11: ; %bb.0:
1968 ; GISEL-GFX11-NEXT: s_clause 0x1
1969 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
1970 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
1971 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
1972 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
1973 ; GISEL-GFX11-NEXT: v_cmp_gt_f16_e64 s2, 0x5640, s2
1974 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
1975 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
1976 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
1977 ; GISEL-GFX11-NEXT: s_nop 0
1978 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
1979 ; GISEL-GFX11-NEXT: s_endpgm
1981 ; GISEL-GFX10-LABEL: v_fcmp_f16_olt:
1982 ; GISEL-GFX10: ; %bb.0:
1983 ; GISEL-GFX10-NEXT: s_clause 0x1
1984 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
1985 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1986 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
1987 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
1988 ; GISEL-GFX10-NEXT: v_cmp_gt_f16_e64 s0, 0x5640, s4
1989 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
1990 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
1991 ; GISEL-GFX10-NEXT: s_endpgm
1992 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 4)
1993 store i32 %result, ptr addrspace(1) %out
1998 define amdgpu_kernel void @v_fcmp_f16_ole(ptr addrspace(1) %out, half %src) {
1999 ; SDAG-GFX11-LABEL: v_fcmp_f16_ole:
2000 ; SDAG-GFX11: ; %bb.0:
2001 ; SDAG-GFX11-NEXT: s_clause 0x1
2002 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2003 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2004 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2005 ; SDAG-GFX11-NEXT: v_cmp_ge_f16_e64 s2, 0x5640, s2
2006 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2007 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2008 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2009 ; SDAG-GFX11-NEXT: s_nop 0
2010 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2011 ; SDAG-GFX11-NEXT: s_endpgm
2013 ; SDAG-GFX10-LABEL: v_fcmp_f16_ole:
2014 ; SDAG-GFX10: ; %bb.0:
2015 ; SDAG-GFX10-NEXT: s_clause 0x1
2016 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2017 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2018 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2019 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2020 ; SDAG-GFX10-NEXT: v_cmp_ge_f16_e64 s0, 0x5640, s4
2021 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2022 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2023 ; SDAG-GFX10-NEXT: s_endpgm
2025 ; GISEL-GFX11-LABEL: v_fcmp_f16_ole:
2026 ; GISEL-GFX11: ; %bb.0:
2027 ; GISEL-GFX11-NEXT: s_clause 0x1
2028 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2029 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2030 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2031 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2032 ; GISEL-GFX11-NEXT: v_cmp_ge_f16_e64 s2, 0x5640, s2
2033 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2034 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2035 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2036 ; GISEL-GFX11-NEXT: s_nop 0
2037 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2038 ; GISEL-GFX11-NEXT: s_endpgm
2040 ; GISEL-GFX10-LABEL: v_fcmp_f16_ole:
2041 ; GISEL-GFX10: ; %bb.0:
2042 ; GISEL-GFX10-NEXT: s_clause 0x1
2043 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2044 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2045 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2046 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2047 ; GISEL-GFX10-NEXT: v_cmp_ge_f16_e64 s0, 0x5640, s4
2048 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2049 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2050 ; GISEL-GFX10-NEXT: s_endpgm
2051 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 5)
2052 store i32 %result, ptr addrspace(1) %out
2057 define amdgpu_kernel void @v_fcmp_f16_ueq(ptr addrspace(1) %out, half %src) {
2058 ; SDAG-GFX11-LABEL: v_fcmp_f16_ueq:
2059 ; SDAG-GFX11: ; %bb.0:
2060 ; SDAG-GFX11-NEXT: s_clause 0x1
2061 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2062 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2063 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2064 ; SDAG-GFX11-NEXT: v_cmp_nlg_f16_e64 s2, 0x5640, s2
2065 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2066 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2067 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2068 ; SDAG-GFX11-NEXT: s_nop 0
2069 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2070 ; SDAG-GFX11-NEXT: s_endpgm
2072 ; SDAG-GFX10-LABEL: v_fcmp_f16_ueq:
2073 ; SDAG-GFX10: ; %bb.0:
2074 ; SDAG-GFX10-NEXT: s_clause 0x1
2075 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2076 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2077 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2078 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2079 ; SDAG-GFX10-NEXT: v_cmp_nlg_f16_e64 s0, 0x5640, s4
2080 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2081 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2082 ; SDAG-GFX10-NEXT: s_endpgm
2084 ; GISEL-GFX11-LABEL: v_fcmp_f16_ueq:
2085 ; GISEL-GFX11: ; %bb.0:
2086 ; GISEL-GFX11-NEXT: s_clause 0x1
2087 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2088 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2089 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2090 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2091 ; GISEL-GFX11-NEXT: v_cmp_nlg_f16_e64 s2, 0x5640, s2
2092 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2093 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2094 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2095 ; GISEL-GFX11-NEXT: s_nop 0
2096 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2097 ; GISEL-GFX11-NEXT: s_endpgm
2099 ; GISEL-GFX10-LABEL: v_fcmp_f16_ueq:
2100 ; GISEL-GFX10: ; %bb.0:
2101 ; GISEL-GFX10-NEXT: s_clause 0x1
2102 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2103 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2104 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2105 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2106 ; GISEL-GFX10-NEXT: v_cmp_nlg_f16_e64 s0, 0x5640, s4
2107 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2108 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2109 ; GISEL-GFX10-NEXT: s_endpgm
2110 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 9)
2111 store i32 %result, ptr addrspace(1) %out
2116 define amdgpu_kernel void @v_fcmp_f16_une(ptr addrspace(1) %out, half %src) {
2117 ; SDAG-GFX11-LABEL: v_fcmp_f16_une:
2118 ; SDAG-GFX11: ; %bb.0:
2119 ; SDAG-GFX11-NEXT: s_clause 0x1
2120 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2121 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2122 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2123 ; SDAG-GFX11-NEXT: v_cmp_neq_f16_e64 s2, 0x5640, s2
2124 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2125 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2126 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2127 ; SDAG-GFX11-NEXT: s_nop 0
2128 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2129 ; SDAG-GFX11-NEXT: s_endpgm
2131 ; SDAG-GFX10-LABEL: v_fcmp_f16_une:
2132 ; SDAG-GFX10: ; %bb.0:
2133 ; SDAG-GFX10-NEXT: s_clause 0x1
2134 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2135 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2136 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2137 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2138 ; SDAG-GFX10-NEXT: v_cmp_neq_f16_e64 s0, 0x5640, s4
2139 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2140 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2141 ; SDAG-GFX10-NEXT: s_endpgm
2143 ; GISEL-GFX11-LABEL: v_fcmp_f16_une:
2144 ; GISEL-GFX11: ; %bb.0:
2145 ; GISEL-GFX11-NEXT: s_clause 0x1
2146 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2147 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2148 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2149 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2150 ; GISEL-GFX11-NEXT: v_cmp_neq_f16_e64 s2, 0x5640, s2
2151 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2152 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2153 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2154 ; GISEL-GFX11-NEXT: s_nop 0
2155 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2156 ; GISEL-GFX11-NEXT: s_endpgm
2158 ; GISEL-GFX10-LABEL: v_fcmp_f16_une:
2159 ; GISEL-GFX10: ; %bb.0:
2160 ; GISEL-GFX10-NEXT: s_clause 0x1
2161 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2162 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2163 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2164 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2165 ; GISEL-GFX10-NEXT: v_cmp_neq_f16_e64 s0, 0x5640, s4
2166 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2167 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2168 ; GISEL-GFX10-NEXT: s_endpgm
2169 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 14)
2170 store i32 %result, ptr addrspace(1) %out
2175 define amdgpu_kernel void @v_fcmp_f16_ugt(ptr addrspace(1) %out, half %src) {
2176 ; SDAG-GFX11-LABEL: v_fcmp_f16_ugt:
2177 ; SDAG-GFX11: ; %bb.0:
2178 ; SDAG-GFX11-NEXT: s_clause 0x1
2179 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2180 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2181 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2182 ; SDAG-GFX11-NEXT: v_cmp_nge_f16_e64 s2, 0x5640, s2
2183 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2184 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2185 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2186 ; SDAG-GFX11-NEXT: s_nop 0
2187 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2188 ; SDAG-GFX11-NEXT: s_endpgm
2190 ; SDAG-GFX10-LABEL: v_fcmp_f16_ugt:
2191 ; SDAG-GFX10: ; %bb.0:
2192 ; SDAG-GFX10-NEXT: s_clause 0x1
2193 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2194 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2195 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2196 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2197 ; SDAG-GFX10-NEXT: v_cmp_nge_f16_e64 s0, 0x5640, s4
2198 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2199 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2200 ; SDAG-GFX10-NEXT: s_endpgm
2202 ; GISEL-GFX11-LABEL: v_fcmp_f16_ugt:
2203 ; GISEL-GFX11: ; %bb.0:
2204 ; GISEL-GFX11-NEXT: s_clause 0x1
2205 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2206 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2207 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2208 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2209 ; GISEL-GFX11-NEXT: v_cmp_nge_f16_e64 s2, 0x5640, s2
2210 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2211 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2212 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2213 ; GISEL-GFX11-NEXT: s_nop 0
2214 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2215 ; GISEL-GFX11-NEXT: s_endpgm
2217 ; GISEL-GFX10-LABEL: v_fcmp_f16_ugt:
2218 ; GISEL-GFX10: ; %bb.0:
2219 ; GISEL-GFX10-NEXT: s_clause 0x1
2220 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2221 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2222 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2223 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2224 ; GISEL-GFX10-NEXT: v_cmp_nge_f16_e64 s0, 0x5640, s4
2225 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2226 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2227 ; GISEL-GFX10-NEXT: s_endpgm
2228 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 10)
2229 store i32 %result, ptr addrspace(1) %out
2234 define amdgpu_kernel void @v_fcmp_f16_uge(ptr addrspace(1) %out, half %src) {
2235 ; SDAG-GFX11-LABEL: v_fcmp_f16_uge:
2236 ; SDAG-GFX11: ; %bb.0:
2237 ; SDAG-GFX11-NEXT: s_clause 0x1
2238 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2239 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2240 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2241 ; SDAG-GFX11-NEXT: v_cmp_ngt_f16_e64 s2, 0x5640, s2
2242 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2243 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2244 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2245 ; SDAG-GFX11-NEXT: s_nop 0
2246 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2247 ; SDAG-GFX11-NEXT: s_endpgm
2249 ; SDAG-GFX10-LABEL: v_fcmp_f16_uge:
2250 ; SDAG-GFX10: ; %bb.0:
2251 ; SDAG-GFX10-NEXT: s_clause 0x1
2252 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2253 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2254 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2255 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2256 ; SDAG-GFX10-NEXT: v_cmp_ngt_f16_e64 s0, 0x5640, s4
2257 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2258 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2259 ; SDAG-GFX10-NEXT: s_endpgm
2261 ; GISEL-GFX11-LABEL: v_fcmp_f16_uge:
2262 ; GISEL-GFX11: ; %bb.0:
2263 ; GISEL-GFX11-NEXT: s_clause 0x1
2264 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2265 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2266 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2267 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2268 ; GISEL-GFX11-NEXT: v_cmp_ngt_f16_e64 s2, 0x5640, s2
2269 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2270 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2271 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2272 ; GISEL-GFX11-NEXT: s_nop 0
2273 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2274 ; GISEL-GFX11-NEXT: s_endpgm
2276 ; GISEL-GFX10-LABEL: v_fcmp_f16_uge:
2277 ; GISEL-GFX10: ; %bb.0:
2278 ; GISEL-GFX10-NEXT: s_clause 0x1
2279 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2280 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2281 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2282 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2283 ; GISEL-GFX10-NEXT: v_cmp_ngt_f16_e64 s0, 0x5640, s4
2284 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2285 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2286 ; GISEL-GFX10-NEXT: s_endpgm
2287 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 11)
2288 store i32 %result, ptr addrspace(1) %out
2293 define amdgpu_kernel void @v_fcmp_f16_ult(ptr addrspace(1) %out, half %src) {
2294 ; SDAG-GFX11-LABEL: v_fcmp_f16_ult:
2295 ; SDAG-GFX11: ; %bb.0:
2296 ; SDAG-GFX11-NEXT: s_clause 0x1
2297 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2298 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2299 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2300 ; SDAG-GFX11-NEXT: v_cmp_nle_f16_e64 s2, 0x5640, s2
2301 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2302 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2303 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2304 ; SDAG-GFX11-NEXT: s_nop 0
2305 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2306 ; SDAG-GFX11-NEXT: s_endpgm
2308 ; SDAG-GFX10-LABEL: v_fcmp_f16_ult:
2309 ; SDAG-GFX10: ; %bb.0:
2310 ; SDAG-GFX10-NEXT: s_clause 0x1
2311 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2312 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2313 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2314 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2315 ; SDAG-GFX10-NEXT: v_cmp_nle_f16_e64 s0, 0x5640, s4
2316 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2317 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2318 ; SDAG-GFX10-NEXT: s_endpgm
2320 ; GISEL-GFX11-LABEL: v_fcmp_f16_ult:
2321 ; GISEL-GFX11: ; %bb.0:
2322 ; GISEL-GFX11-NEXT: s_clause 0x1
2323 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2324 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2325 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2326 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2327 ; GISEL-GFX11-NEXT: v_cmp_nle_f16_e64 s2, 0x5640, s2
2328 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2329 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2330 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2331 ; GISEL-GFX11-NEXT: s_nop 0
2332 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2333 ; GISEL-GFX11-NEXT: s_endpgm
2335 ; GISEL-GFX10-LABEL: v_fcmp_f16_ult:
2336 ; GISEL-GFX10: ; %bb.0:
2337 ; GISEL-GFX10-NEXT: s_clause 0x1
2338 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2339 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2340 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2341 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2342 ; GISEL-GFX10-NEXT: v_cmp_nle_f16_e64 s0, 0x5640, s4
2343 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2344 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2345 ; GISEL-GFX10-NEXT: s_endpgm
2346 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 12)
2347 store i32 %result, ptr addrspace(1) %out
2352 define amdgpu_kernel void @v_fcmp_f16_ule(ptr addrspace(1) %out, half %src) {
2353 ; SDAG-GFX11-LABEL: v_fcmp_f16_ule:
2354 ; SDAG-GFX11: ; %bb.0:
2355 ; SDAG-GFX11-NEXT: s_clause 0x1
2356 ; SDAG-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2357 ; SDAG-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2358 ; SDAG-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2359 ; SDAG-GFX11-NEXT: v_cmp_nlt_f16_e64 s2, 0x5640, s2
2360 ; SDAG-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2361 ; SDAG-GFX11-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s2
2362 ; SDAG-GFX11-NEXT: global_store_b32 v0, v1, s[0:1]
2363 ; SDAG-GFX11-NEXT: s_nop 0
2364 ; SDAG-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2365 ; SDAG-GFX11-NEXT: s_endpgm
2367 ; SDAG-GFX10-LABEL: v_fcmp_f16_ule:
2368 ; SDAG-GFX10: ; %bb.0:
2369 ; SDAG-GFX10-NEXT: s_clause 0x1
2370 ; SDAG-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2371 ; SDAG-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2372 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v0, 0
2373 ; SDAG-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2374 ; SDAG-GFX10-NEXT: v_cmp_nlt_f16_e64 s0, 0x5640, s4
2375 ; SDAG-GFX10-NEXT: v_mov_b32_e32 v1, s0
2376 ; SDAG-GFX10-NEXT: global_store_dword v0, v1, s[2:3]
2377 ; SDAG-GFX10-NEXT: s_endpgm
2379 ; GISEL-GFX11-LABEL: v_fcmp_f16_ule:
2380 ; GISEL-GFX11: ; %bb.0:
2381 ; GISEL-GFX11-NEXT: s_clause 0x1
2382 ; GISEL-GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c
2383 ; GISEL-GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
2384 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v1, 0
2385 ; GISEL-GFX11-NEXT: s_waitcnt lgkmcnt(0)
2386 ; GISEL-GFX11-NEXT: v_cmp_nlt_f16_e64 s2, 0x5640, s2
2387 ; GISEL-GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
2388 ; GISEL-GFX11-NEXT: v_mov_b32_e32 v0, s2
2389 ; GISEL-GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
2390 ; GISEL-GFX11-NEXT: s_nop 0
2391 ; GISEL-GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
2392 ; GISEL-GFX11-NEXT: s_endpgm
2394 ; GISEL-GFX10-LABEL: v_fcmp_f16_ule:
2395 ; GISEL-GFX10: ; %bb.0:
2396 ; GISEL-GFX10-NEXT: s_clause 0x1
2397 ; GISEL-GFX10-NEXT: s_load_dword s4, s[0:1], 0x2c
2398 ; GISEL-GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
2399 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v1, 0
2400 ; GISEL-GFX10-NEXT: s_waitcnt lgkmcnt(0)
2401 ; GISEL-GFX10-NEXT: v_cmp_nlt_f16_e64 s0, 0x5640, s4
2402 ; GISEL-GFX10-NEXT: v_mov_b32_e32 v0, s0
2403 ; GISEL-GFX10-NEXT: global_store_dword v1, v0, s[2:3]
2404 ; GISEL-GFX10-NEXT: s_endpgm
2405 %result = call i32 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 13)
2406 store i32 %result, ptr addrspace(1) %out
2410 attributes #0 = { nounwind readnone convergent }
2411 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: