1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx704 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX7CHECK,GFX7SELDAG %s
3 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx704 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX7CHECK,GFX7GLISEL %s
4 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX8CHECK,GFX8SELDAG %s
5 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX8CHECK,GFX8GLISEL %s
6 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx908 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX9CHECK %s
7 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx908 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX9CHECK %s
8 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1031 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX10CHECK %s
9 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1031 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX10CHECK %s
10 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck --check-prefix=GFX11CHECK %s
11 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck --check-prefix=GFX11CHECK %s
13 define amdgpu_kernel void @sgpr_isnan_f32(ptr addrspace(1) %out, float %x) {
14 ; GFX7SELDAG-LABEL: sgpr_isnan_f32:
15 ; GFX7SELDAG: ; %bb.0:
16 ; GFX7SELDAG-NEXT: s_load_dword s4, s[0:1], 0xb
17 ; GFX7SELDAG-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9
18 ; GFX7SELDAG-NEXT: s_mov_b32 s3, 0xf000
19 ; GFX7SELDAG-NEXT: s_mov_b32 s2, -1
20 ; GFX7SELDAG-NEXT: s_waitcnt lgkmcnt(0)
21 ; GFX7SELDAG-NEXT: v_cmp_class_f32_e64 s[4:5], s4, 3
22 ; GFX7SELDAG-NEXT: v_cndmask_b32_e64 v0, 0, -1, s[4:5]
23 ; GFX7SELDAG-NEXT: buffer_store_dword v0, off, s[0:3], 0
24 ; GFX7SELDAG-NEXT: s_endpgm
26 ; GFX7GLISEL-LABEL: sgpr_isnan_f32:
27 ; GFX7GLISEL: ; %bb.0:
28 ; GFX7GLISEL-NEXT: s_load_dword s3, s[0:1], 0xb
29 ; GFX7GLISEL-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9
30 ; GFX7GLISEL-NEXT: s_mov_b32 s2, -1
31 ; GFX7GLISEL-NEXT: s_waitcnt lgkmcnt(0)
32 ; GFX7GLISEL-NEXT: v_cmp_class_f32_e64 s[4:5], s3, 3
33 ; GFX7GLISEL-NEXT: v_cndmask_b32_e64 v0, 0, -1, s[4:5]
34 ; GFX7GLISEL-NEXT: s_mov_b32 s3, 0xf000
35 ; GFX7GLISEL-NEXT: buffer_store_dword v0, off, s[0:3], 0
36 ; GFX7GLISEL-NEXT: s_endpgm
38 ; GFX8CHECK-LABEL: sgpr_isnan_f32:
40 ; GFX8CHECK-NEXT: s_load_dword s2, s[0:1], 0x2c
41 ; GFX8CHECK-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
42 ; GFX8CHECK-NEXT: s_waitcnt lgkmcnt(0)
43 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[2:3], s2, 3
44 ; GFX8CHECK-NEXT: v_mov_b32_e32 v0, s0
45 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, -1, s[2:3]
46 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, s1
47 ; GFX8CHECK-NEXT: flat_store_dword v[0:1], v2
48 ; GFX8CHECK-NEXT: s_endpgm
50 ; GFX9CHECK-LABEL: sgpr_isnan_f32:
52 ; GFX9CHECK-NEXT: s_load_dword s4, s[0:1], 0x2c
53 ; GFX9CHECK-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
54 ; GFX9CHECK-NEXT: v_mov_b32_e32 v0, 0
55 ; GFX9CHECK-NEXT: s_waitcnt lgkmcnt(0)
56 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[0:1], s4, 3
57 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s[0:1]
58 ; GFX9CHECK-NEXT: global_store_dword v0, v1, s[2:3]
59 ; GFX9CHECK-NEXT: s_endpgm
61 ; GFX10CHECK-LABEL: sgpr_isnan_f32:
62 ; GFX10CHECK: ; %bb.0:
63 ; GFX10CHECK-NEXT: s_clause 0x1
64 ; GFX10CHECK-NEXT: s_load_dword s2, s[0:1], 0x2c
65 ; GFX10CHECK-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
66 ; GFX10CHECK-NEXT: v_mov_b32_e32 v0, 0
67 ; GFX10CHECK-NEXT: s_waitcnt lgkmcnt(0)
68 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s2, s2, 3
69 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
70 ; GFX10CHECK-NEXT: global_store_dword v0, v1, s[0:1]
71 ; GFX10CHECK-NEXT: s_endpgm
73 ; GFX11CHECK-LABEL: sgpr_isnan_f32:
74 ; GFX11CHECK: ; %bb.0:
75 ; GFX11CHECK-NEXT: s_clause 0x1
76 ; GFX11CHECK-NEXT: s_load_b32 s2, s[0:1], 0x2c
77 ; GFX11CHECK-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
78 ; GFX11CHECK-NEXT: v_mov_b32_e32 v0, 0
79 ; GFX11CHECK-NEXT: s_waitcnt lgkmcnt(0)
80 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s2, s2, 3
81 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
82 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
83 ; GFX11CHECK-NEXT: global_store_b32 v0, v1, s[0:1]
84 ; GFX11CHECK-NEXT: s_nop 0
85 ; GFX11CHECK-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
86 ; GFX11CHECK-NEXT: s_endpgm
87 %result = call i1 @llvm.is.fpclass.f32(float %x, i32 3) ; nan
88 %sext = sext i1 %result to i32
89 store i32 %sext, ptr addrspace(1) %out, align 4
93 define amdgpu_kernel void @sgpr_isnan_f64(ptr addrspace(1) %out, double %x) {
94 ; GFX7SELDAG-LABEL: sgpr_isnan_f64:
95 ; GFX7SELDAG: ; %bb.0:
96 ; GFX7SELDAG-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9
97 ; GFX7SELDAG-NEXT: s_mov_b32 s7, 0xf000
98 ; GFX7SELDAG-NEXT: s_mov_b32 s6, -1
99 ; GFX7SELDAG-NEXT: s_waitcnt lgkmcnt(0)
100 ; GFX7SELDAG-NEXT: s_mov_b32 s4, s0
101 ; GFX7SELDAG-NEXT: s_mov_b32 s5, s1
102 ; GFX7SELDAG-NEXT: v_cmp_class_f64_e64 s[0:1], s[2:3], 3
103 ; GFX7SELDAG-NEXT: v_cndmask_b32_e64 v0, 0, -1, s[0:1]
104 ; GFX7SELDAG-NEXT: buffer_store_dword v0, off, s[4:7], 0
105 ; GFX7SELDAG-NEXT: s_endpgm
107 ; GFX7GLISEL-LABEL: sgpr_isnan_f64:
108 ; GFX7GLISEL: ; %bb.0:
109 ; GFX7GLISEL-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9
110 ; GFX7GLISEL-NEXT: s_waitcnt lgkmcnt(0)
111 ; GFX7GLISEL-NEXT: v_cmp_class_f64_e64 s[2:3], s[2:3], 3
112 ; GFX7GLISEL-NEXT: v_cndmask_b32_e64 v0, 0, -1, s[2:3]
113 ; GFX7GLISEL-NEXT: s_mov_b32 s2, -1
114 ; GFX7GLISEL-NEXT: s_mov_b32 s3, 0xf000
115 ; GFX7GLISEL-NEXT: buffer_store_dword v0, off, s[0:3], 0
116 ; GFX7GLISEL-NEXT: s_endpgm
118 ; GFX8SELDAG-LABEL: sgpr_isnan_f64:
119 ; GFX8SELDAG: ; %bb.0:
120 ; GFX8SELDAG-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
121 ; GFX8SELDAG-NEXT: s_waitcnt lgkmcnt(0)
122 ; GFX8SELDAG-NEXT: v_mov_b32_e32 v0, s0
123 ; GFX8SELDAG-NEXT: v_mov_b32_e32 v1, s1
124 ; GFX8SELDAG-NEXT: v_cmp_class_f64_e64 s[0:1], s[2:3], 3
125 ; GFX8SELDAG-NEXT: v_cndmask_b32_e64 v2, 0, -1, s[0:1]
126 ; GFX8SELDAG-NEXT: flat_store_dword v[0:1], v2
127 ; GFX8SELDAG-NEXT: s_endpgm
129 ; GFX8GLISEL-LABEL: sgpr_isnan_f64:
130 ; GFX8GLISEL: ; %bb.0:
131 ; GFX8GLISEL-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
132 ; GFX8GLISEL-NEXT: s_waitcnt lgkmcnt(0)
133 ; GFX8GLISEL-NEXT: v_cmp_class_f64_e64 s[2:3], s[2:3], 3
134 ; GFX8GLISEL-NEXT: v_mov_b32_e32 v0, s0
135 ; GFX8GLISEL-NEXT: v_mov_b32_e32 v1, s1
136 ; GFX8GLISEL-NEXT: v_cndmask_b32_e64 v2, 0, -1, s[2:3]
137 ; GFX8GLISEL-NEXT: flat_store_dword v[0:1], v2
138 ; GFX8GLISEL-NEXT: s_endpgm
140 ; GFX9CHECK-LABEL: sgpr_isnan_f64:
141 ; GFX9CHECK: ; %bb.0:
142 ; GFX9CHECK-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
143 ; GFX9CHECK-NEXT: v_mov_b32_e32 v0, 0
144 ; GFX9CHECK-NEXT: s_waitcnt lgkmcnt(0)
145 ; GFX9CHECK-NEXT: v_cmp_class_f64_e64 s[2:3], s[2:3], 3
146 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s[2:3]
147 ; GFX9CHECK-NEXT: global_store_dword v0, v1, s[0:1]
148 ; GFX9CHECK-NEXT: s_endpgm
150 ; GFX10CHECK-LABEL: sgpr_isnan_f64:
151 ; GFX10CHECK: ; %bb.0:
152 ; GFX10CHECK-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
153 ; GFX10CHECK-NEXT: v_mov_b32_e32 v0, 0
154 ; GFX10CHECK-NEXT: s_waitcnt lgkmcnt(0)
155 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s2, s[2:3], 3
156 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
157 ; GFX10CHECK-NEXT: global_store_dword v0, v1, s[0:1]
158 ; GFX10CHECK-NEXT: s_endpgm
160 ; GFX11CHECK-LABEL: sgpr_isnan_f64:
161 ; GFX11CHECK: ; %bb.0:
162 ; GFX11CHECK-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
163 ; GFX11CHECK-NEXT: v_mov_b32_e32 v0, 0
164 ; GFX11CHECK-NEXT: s_waitcnt lgkmcnt(0)
165 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s2, s[2:3], 3
166 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
167 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
168 ; GFX11CHECK-NEXT: global_store_b32 v0, v1, s[0:1]
169 ; GFX11CHECK-NEXT: s_nop 0
170 ; GFX11CHECK-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
171 ; GFX11CHECK-NEXT: s_endpgm
172 %result = call i1 @llvm.is.fpclass.f64(double %x, i32 3) ; nan
173 %sext = sext i1 %result to i32
174 store i32 %sext, ptr addrspace(1) %out, align 4
178 define i1 @isnan_f32(float %x) nounwind {
179 ; GFX7CHECK-LABEL: isnan_f32:
180 ; GFX7CHECK: ; %bb.0:
181 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
182 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
183 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
184 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
186 ; GFX8CHECK-LABEL: isnan_f32:
187 ; GFX8CHECK: ; %bb.0:
188 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
189 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
190 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
191 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
193 ; GFX9CHECK-LABEL: isnan_f32:
194 ; GFX9CHECK: ; %bb.0:
195 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
196 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
197 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
198 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
200 ; GFX10CHECK-LABEL: isnan_f32:
201 ; GFX10CHECK: ; %bb.0:
202 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
203 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
204 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
205 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
207 ; GFX11CHECK-LABEL: isnan_f32:
208 ; GFX11CHECK: ; %bb.0:
209 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
210 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
211 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
212 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
213 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
214 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 3) ; nan
218 define <2 x i1> @isnan_v2f32(<2 x float> %x) nounwind {
219 ; GFX7CHECK-LABEL: isnan_v2f32:
220 ; GFX7CHECK: ; %bb.0:
221 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
222 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
223 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
224 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
225 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
226 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
228 ; GFX8CHECK-LABEL: isnan_v2f32:
229 ; GFX8CHECK: ; %bb.0:
230 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
231 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
232 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
233 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
234 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
235 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
237 ; GFX9CHECK-LABEL: isnan_v2f32:
238 ; GFX9CHECK: ; %bb.0:
239 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
240 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
241 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
242 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
243 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
244 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
246 ; GFX10CHECK-LABEL: isnan_v2f32:
247 ; GFX10CHECK: ; %bb.0:
248 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
249 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
250 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
251 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
252 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
253 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
255 ; GFX11CHECK-LABEL: isnan_v2f32:
256 ; GFX11CHECK: ; %bb.0:
257 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
258 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
259 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
260 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
261 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
262 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
263 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
264 %1 = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> %x, i32 3) ; nan
268 define <3 x i1> @isnan_v3f32(<3 x float> %x) nounwind {
269 ; GFX7CHECK-LABEL: isnan_v3f32:
270 ; GFX7CHECK: ; %bb.0:
271 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
272 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
273 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
274 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
275 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
276 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
277 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
278 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
280 ; GFX8CHECK-LABEL: isnan_v3f32:
281 ; GFX8CHECK: ; %bb.0:
282 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
283 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
284 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
285 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
286 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
287 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
288 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
289 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
291 ; GFX9CHECK-LABEL: isnan_v3f32:
292 ; GFX9CHECK: ; %bb.0:
293 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
294 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
295 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
296 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
297 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
298 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
299 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
300 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
302 ; GFX10CHECK-LABEL: isnan_v3f32:
303 ; GFX10CHECK: ; %bb.0:
304 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
305 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
306 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
307 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
308 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
309 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
310 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
311 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
313 ; GFX11CHECK-LABEL: isnan_v3f32:
314 ; GFX11CHECK: ; %bb.0:
315 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
316 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
317 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
318 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
319 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
320 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
321 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
322 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
323 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
324 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
325 %1 = call <3 x i1> @llvm.is.fpclass.v3f32(<3 x float> %x, i32 3) ; nan
329 define <4 x i1> @isnan_v4f32(<4 x float> %x) nounwind {
330 ; GFX7CHECK-LABEL: isnan_v4f32:
331 ; GFX7CHECK: ; %bb.0:
332 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
333 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
334 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
335 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
336 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
337 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
338 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
339 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
340 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
341 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
343 ; GFX8CHECK-LABEL: isnan_v4f32:
344 ; GFX8CHECK: ; %bb.0:
345 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
346 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
347 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
348 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
349 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
350 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
351 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
352 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
353 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
354 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
356 ; GFX9CHECK-LABEL: isnan_v4f32:
357 ; GFX9CHECK: ; %bb.0:
358 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
359 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
360 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
361 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
362 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
363 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
364 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
365 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
366 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
367 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
369 ; GFX10CHECK-LABEL: isnan_v4f32:
370 ; GFX10CHECK: ; %bb.0:
371 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
372 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
373 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
374 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
375 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
376 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
377 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
378 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
379 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
380 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
382 ; GFX11CHECK-LABEL: isnan_v4f32:
383 ; GFX11CHECK: ; %bb.0:
384 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
385 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
386 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
387 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
388 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
389 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
390 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
391 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
392 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
393 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
394 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
395 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
396 %1 = call <4 x i1> @llvm.is.fpclass.v4f32(<4 x float> %x, i32 3) ; nan
400 define <5 x i1> @isnan_v5f32(<5 x float> %x) nounwind {
401 ; GFX7CHECK-LABEL: isnan_v5f32:
402 ; GFX7CHECK: ; %bb.0:
403 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
404 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
405 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
406 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
407 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
408 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
409 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
410 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
411 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
412 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
413 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
414 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
416 ; GFX8CHECK-LABEL: isnan_v5f32:
417 ; GFX8CHECK: ; %bb.0:
418 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
419 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
420 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
421 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
422 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
423 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
424 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
425 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
426 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
427 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
428 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
429 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
431 ; GFX9CHECK-LABEL: isnan_v5f32:
432 ; GFX9CHECK: ; %bb.0:
433 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
434 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
435 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
436 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
437 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
438 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
439 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
440 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
441 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
442 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
443 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
444 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
446 ; GFX10CHECK-LABEL: isnan_v5f32:
447 ; GFX10CHECK: ; %bb.0:
448 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
449 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
450 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
451 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
452 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
453 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
454 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
455 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
456 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
457 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v4, 3
458 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s4
459 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
461 ; GFX11CHECK-LABEL: isnan_v5f32:
462 ; GFX11CHECK: ; %bb.0:
463 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
464 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
465 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
466 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
467 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
468 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
469 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
470 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
471 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
472 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
473 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
474 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v4, 3
475 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
476 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s0
477 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
478 %1 = call <5 x i1> @llvm.is.fpclass.v5f32(<5 x float> %x, i32 3) ; nan
482 define <6 x i1> @isnan_v6f32(<6 x float> %x) nounwind {
483 ; GFX7CHECK-LABEL: isnan_v6f32:
484 ; GFX7CHECK: ; %bb.0:
485 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
486 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
487 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
488 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
489 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
490 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
491 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
492 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
493 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
494 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
495 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
496 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
497 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
498 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
500 ; GFX8CHECK-LABEL: isnan_v6f32:
501 ; GFX8CHECK: ; %bb.0:
502 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
503 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
504 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
505 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
506 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
507 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
508 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
509 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
510 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
511 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
512 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
513 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
514 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
515 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
517 ; GFX9CHECK-LABEL: isnan_v6f32:
518 ; GFX9CHECK: ; %bb.0:
519 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
520 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
521 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
522 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
523 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
524 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
525 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
526 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
527 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
528 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
529 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
530 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
531 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
532 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
534 ; GFX10CHECK-LABEL: isnan_v6f32:
535 ; GFX10CHECK: ; %bb.0:
536 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
537 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
538 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
539 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
540 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
541 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
542 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
543 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
544 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
545 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v4, 3
546 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s4
547 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v5, 3
548 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s4
549 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
551 ; GFX11CHECK-LABEL: isnan_v6f32:
552 ; GFX11CHECK: ; %bb.0:
553 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
554 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
555 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
556 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
557 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
558 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
559 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
560 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
561 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
562 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
563 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
564 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v4, 3
565 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
566 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s0
567 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v5, 3
568 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s0
569 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
570 %1 = call <6 x i1> @llvm.is.fpclass.v6f32(<6 x float> %x, i32 3) ; nan
574 define <7 x i1> @isnan_v7f32(<7 x float> %x) nounwind {
575 ; GFX7CHECK-LABEL: isnan_v7f32:
576 ; GFX7CHECK: ; %bb.0:
577 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
578 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
579 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
580 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
581 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
582 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
583 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
584 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
585 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
586 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
587 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
588 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
589 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
590 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
591 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
592 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
594 ; GFX8CHECK-LABEL: isnan_v7f32:
595 ; GFX8CHECK: ; %bb.0:
596 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
597 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
598 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
599 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
600 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
601 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
602 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
603 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
604 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
605 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
606 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
607 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
608 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
609 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
610 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
611 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
613 ; GFX9CHECK-LABEL: isnan_v7f32:
614 ; GFX9CHECK: ; %bb.0:
615 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
616 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
617 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
618 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
619 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
620 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
621 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
622 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
623 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
624 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
625 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
626 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
627 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
628 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
629 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
630 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
632 ; GFX10CHECK-LABEL: isnan_v7f32:
633 ; GFX10CHECK: ; %bb.0:
634 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
635 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
636 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
637 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
638 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
639 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
640 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
641 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
642 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
643 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v4, 3
644 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s4
645 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v5, 3
646 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s4
647 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v6, 3
648 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s4
649 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
651 ; GFX11CHECK-LABEL: isnan_v7f32:
652 ; GFX11CHECK: ; %bb.0:
653 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
654 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
655 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
656 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
657 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
658 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
659 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
660 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
661 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
662 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
663 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
664 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v4, 3
665 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
666 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s0
667 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v5, 3
668 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s0
669 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v6, 3
670 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
671 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s0
672 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
673 %1 = call <7 x i1> @llvm.is.fpclass.v7f32(<7 x float> %x, i32 3) ; nan
677 define <8 x i1> @isnan_v8f32(<8 x float> %x) nounwind {
678 ; GFX7CHECK-LABEL: isnan_v8f32:
679 ; GFX7CHECK: ; %bb.0:
680 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
681 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
682 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
683 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
684 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
685 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
686 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
687 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
688 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
689 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
690 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
691 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
692 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
693 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
694 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
695 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
696 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
697 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
699 ; GFX8CHECK-LABEL: isnan_v8f32:
700 ; GFX8CHECK: ; %bb.0:
701 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
702 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
703 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
704 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
705 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
706 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
707 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
708 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
709 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
710 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
711 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
712 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
713 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
714 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
715 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
716 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
717 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
718 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
720 ; GFX9CHECK-LABEL: isnan_v8f32:
721 ; GFX9CHECK: ; %bb.0:
722 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
723 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
724 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
725 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
726 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
727 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
728 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
729 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
730 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
731 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
732 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
733 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
734 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
735 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
736 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
737 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
738 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
739 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
741 ; GFX10CHECK-LABEL: isnan_v8f32:
742 ; GFX10CHECK: ; %bb.0:
743 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
744 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
745 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
746 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
747 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
748 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
749 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
750 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
751 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
752 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v4, 3
753 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s4
754 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v5, 3
755 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s4
756 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v6, 3
757 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s4
758 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v7, 3
759 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s4
760 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
762 ; GFX11CHECK-LABEL: isnan_v8f32:
763 ; GFX11CHECK: ; %bb.0:
764 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
765 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
766 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
767 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
768 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
769 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
770 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
771 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
772 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
773 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
774 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
775 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v4, 3
776 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
777 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s0
778 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v5, 3
779 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s0
780 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v6, 3
781 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
782 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s0
783 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v7, 3
784 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s0
785 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
786 %1 = call <8 x i1> @llvm.is.fpclass.v8f32(<8 x float> %x, i32 3) ; nan
790 define <16 x i1> @isnan_v16f32(<16 x float> %x) nounwind {
791 ; GFX7CHECK-LABEL: isnan_v16f32:
792 ; GFX7CHECK: ; %bb.0:
793 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
794 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
795 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
796 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
797 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
798 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
799 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
800 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
801 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
802 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
803 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
804 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
805 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
806 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
807 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
808 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
809 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
810 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v8, 3
811 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, s[4:5]
812 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v9, 3
813 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
814 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v10, 3
815 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
816 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v11, 3
817 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
818 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v12, 3
819 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
820 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v13, 3
821 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
822 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v14, 3
823 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
824 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v15, 3
825 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
826 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
828 ; GFX8CHECK-LABEL: isnan_v16f32:
829 ; GFX8CHECK: ; %bb.0:
830 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
831 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
832 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
833 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
834 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
835 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
836 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
837 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
838 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
839 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
840 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
841 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
842 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
843 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
844 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
845 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
846 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
847 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v8, 3
848 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, s[4:5]
849 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v9, 3
850 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
851 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v10, 3
852 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
853 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v11, 3
854 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
855 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v12, 3
856 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
857 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v13, 3
858 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
859 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v14, 3
860 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
861 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v15, 3
862 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
863 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
865 ; GFX9CHECK-LABEL: isnan_v16f32:
866 ; GFX9CHECK: ; %bb.0:
867 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
868 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
869 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
870 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v1, 3
871 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
872 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v2, 3
873 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
874 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v3, 3
875 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[4:5]
876 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v4, 3
877 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
878 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v5, 3
879 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
880 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v6, 3
881 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
882 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v7, 3
883 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
884 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v8, 3
885 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, s[4:5]
886 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v9, 3
887 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
888 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v10, 3
889 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
890 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v11, 3
891 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
892 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v12, 3
893 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
894 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v13, 3
895 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
896 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v14, 3
897 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
898 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v15, 3
899 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
900 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
902 ; GFX10CHECK-LABEL: isnan_v16f32:
903 ; GFX10CHECK: ; %bb.0:
904 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
905 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
906 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
907 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v1, 3
908 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
909 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v2, 3
910 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s4
911 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v3, 3
912 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s4
913 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v4, 3
914 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s4
915 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v5, 3
916 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s4
917 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v6, 3
918 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s4
919 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v7, 3
920 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s4
921 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v8, 3
922 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, s4
923 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v9, 3
924 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v9, 0, 1, s4
925 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v10, 3
926 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, s4
927 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v11, 3
928 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, s4
929 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v12, 3
930 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v12, 0, 1, s4
931 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v13, 3
932 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v13, 0, 1, s4
933 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v14, 3
934 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v14, 0, 1, s4
935 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v15, 3
936 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v15, 0, 1, s4
937 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
939 ; GFX11CHECK-LABEL: isnan_v16f32:
940 ; GFX11CHECK: ; %bb.0:
941 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
942 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
943 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
944 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
945 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v1, 3
946 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
947 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v2, 3
948 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
949 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v2, 0, 1, s0
950 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v3, 3
951 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v3, 0, 1, s0
952 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v4, 3
953 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
954 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v4, 0, 1, s0
955 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v5, 3
956 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v5, 0, 1, s0
957 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v6, 3
958 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
959 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v6, 0, 1, s0
960 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v7, 3
961 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v7, 0, 1, s0
962 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v8, 3
963 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
964 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, s0
965 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v9, 3
966 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v9, 0, 1, s0
967 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v10, 3
968 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
969 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, s0
970 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v11, 3
971 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, s0
972 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v12, 3
973 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
974 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v12, 0, 1, s0
975 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v13, 3
976 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v13, 0, 1, s0
977 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v14, 3
978 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
979 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v14, 0, 1, s0
980 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v15, 3
981 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v15, 0, 1, s0
982 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
983 %1 = call <16 x i1> @llvm.is.fpclass.v16f32(<16 x float> %x, i32 3) ; nan
987 define i1 @isnan_f64(double %x) nounwind {
988 ; GFX7CHECK-LABEL: isnan_f64:
989 ; GFX7CHECK: ; %bb.0:
990 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
991 ; GFX7CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
992 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
993 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
995 ; GFX8CHECK-LABEL: isnan_f64:
996 ; GFX8CHECK: ; %bb.0:
997 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
998 ; GFX8CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
999 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1000 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1002 ; GFX9CHECK-LABEL: isnan_f64:
1003 ; GFX9CHECK: ; %bb.0:
1004 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1005 ; GFX9CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
1006 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1007 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1009 ; GFX10CHECK-LABEL: isnan_f64:
1010 ; GFX10CHECK: ; %bb.0:
1011 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1012 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[0:1], 3
1013 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1014 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1016 ; GFX11CHECK-LABEL: isnan_f64:
1017 ; GFX11CHECK: ; %bb.0:
1018 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1019 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[0:1], 3
1020 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1021 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1022 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1023 %1 = call i1 @llvm.is.fpclass.f64(double %x, i32 3) ; nan
1027 define i1 @isnan_f32_strictfp(float %x) strictfp nounwind {
1028 ; GFX7CHECK-LABEL: isnan_f32_strictfp:
1029 ; GFX7CHECK: ; %bb.0:
1030 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1031 ; GFX7CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
1032 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1033 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1035 ; GFX8CHECK-LABEL: isnan_f32_strictfp:
1036 ; GFX8CHECK: ; %bb.0:
1037 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1038 ; GFX8CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
1039 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1040 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1042 ; GFX9CHECK-LABEL: isnan_f32_strictfp:
1043 ; GFX9CHECK: ; %bb.0:
1044 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1045 ; GFX9CHECK-NEXT: v_cmp_class_f32_e64 s[4:5], v0, 3
1046 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1047 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1049 ; GFX10CHECK-LABEL: isnan_f32_strictfp:
1050 ; GFX10CHECK: ; %bb.0:
1051 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1052 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 3
1053 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1054 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1056 ; GFX11CHECK-LABEL: isnan_f32_strictfp:
1057 ; GFX11CHECK: ; %bb.0:
1058 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1059 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 3
1060 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1061 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1062 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1063 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 3) strictfp ; nan
1067 define i1 @isnan_f64_strictfp(double %x) strictfp nounwind {
1068 ; GFX7CHECK-LABEL: isnan_f64_strictfp:
1069 ; GFX7CHECK: ; %bb.0:
1070 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1071 ; GFX7CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
1072 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1073 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1075 ; GFX8CHECK-LABEL: isnan_f64_strictfp:
1076 ; GFX8CHECK: ; %bb.0:
1077 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1078 ; GFX8CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
1079 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1080 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1082 ; GFX9CHECK-LABEL: isnan_f64_strictfp:
1083 ; GFX9CHECK: ; %bb.0:
1084 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1085 ; GFX9CHECK-NEXT: v_cmp_class_f64_e64 s[4:5], v[0:1], 3
1086 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
1087 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1089 ; GFX10CHECK-LABEL: isnan_f64_strictfp:
1090 ; GFX10CHECK: ; %bb.0:
1091 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1092 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[0:1], 3
1093 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1094 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1096 ; GFX11CHECK-LABEL: isnan_f64_strictfp:
1097 ; GFX11CHECK: ; %bb.0:
1098 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1099 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[0:1], 3
1100 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1101 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1102 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1103 %1 = call i1 @llvm.is.fpclass.f64(double %x, i32 3) strictfp ; nan
1107 define i1 @isinf_f32(float %x) nounwind {
1108 ; GFX7CHECK-LABEL: isinf_f32:
1109 ; GFX7CHECK: ; %bb.0:
1110 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1111 ; GFX7CHECK-NEXT: v_mov_b32_e32 v1, 0x204
1112 ; GFX7CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1113 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1114 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1116 ; GFX8CHECK-LABEL: isinf_f32:
1117 ; GFX8CHECK: ; %bb.0:
1118 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1119 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, 0x204
1120 ; GFX8CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1121 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1122 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1124 ; GFX9CHECK-LABEL: isinf_f32:
1125 ; GFX9CHECK: ; %bb.0:
1126 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1127 ; GFX9CHECK-NEXT: v_mov_b32_e32 v1, 0x204
1128 ; GFX9CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1129 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1130 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1132 ; GFX10CHECK-LABEL: isinf_f32:
1133 ; GFX10CHECK: ; %bb.0:
1134 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1135 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 0x204
1136 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1137 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1139 ; GFX11CHECK-LABEL: isinf_f32:
1140 ; GFX11CHECK: ; %bb.0:
1141 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1142 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 0x204
1143 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1144 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1145 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1146 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 516) ; 0x204 = "inf"
1150 define i1 @isinf_f64(double %x) nounwind {
1151 ; GFX7CHECK-LABEL: isinf_f64:
1152 ; GFX7CHECK: ; %bb.0:
1153 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1154 ; GFX7CHECK-NEXT: v_mov_b32_e32 v2, 0x204
1155 ; GFX7CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1156 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1157 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1159 ; GFX8CHECK-LABEL: isinf_f64:
1160 ; GFX8CHECK: ; %bb.0:
1161 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1162 ; GFX8CHECK-NEXT: v_mov_b32_e32 v2, 0x204
1163 ; GFX8CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1164 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1165 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1167 ; GFX9CHECK-LABEL: isinf_f64:
1168 ; GFX9CHECK: ; %bb.0:
1169 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1170 ; GFX9CHECK-NEXT: v_mov_b32_e32 v2, 0x204
1171 ; GFX9CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1172 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1173 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1175 ; GFX10CHECK-LABEL: isinf_f64:
1176 ; GFX10CHECK: ; %bb.0:
1177 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1178 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[0:1], 0x204
1179 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1180 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1182 ; GFX11CHECK-LABEL: isinf_f64:
1183 ; GFX11CHECK: ; %bb.0:
1184 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1185 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[0:1], 0x204
1186 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1187 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1188 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1189 %1 = call i1 @llvm.is.fpclass.f64(double %x, i32 516) ; 0x204 = "inf"
1193 define i1 @isfinite_f32(float %x) nounwind {
1194 ; GFX7CHECK-LABEL: isfinite_f32:
1195 ; GFX7CHECK: ; %bb.0:
1196 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1197 ; GFX7CHECK-NEXT: v_mov_b32_e32 v1, 0x1f8
1198 ; GFX7CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1199 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1200 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1202 ; GFX8CHECK-LABEL: isfinite_f32:
1203 ; GFX8CHECK: ; %bb.0:
1204 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1205 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, 0x1f8
1206 ; GFX8CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1207 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1208 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1210 ; GFX9CHECK-LABEL: isfinite_f32:
1211 ; GFX9CHECK: ; %bb.0:
1212 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1213 ; GFX9CHECK-NEXT: v_mov_b32_e32 v1, 0x1f8
1214 ; GFX9CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1215 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1216 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1218 ; GFX10CHECK-LABEL: isfinite_f32:
1219 ; GFX10CHECK: ; %bb.0:
1220 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1221 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 0x1f8
1222 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1223 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1225 ; GFX11CHECK-LABEL: isfinite_f32:
1226 ; GFX11CHECK: ; %bb.0:
1227 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1228 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 0x1f8
1229 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1230 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1231 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1232 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 504) ; 0x1f8 = "finite"
1236 define i1 @isfinite_f64(double %x) nounwind {
1237 ; GFX7CHECK-LABEL: isfinite_f64:
1238 ; GFX7CHECK: ; %bb.0:
1239 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1240 ; GFX7CHECK-NEXT: v_mov_b32_e32 v2, 0x1f8
1241 ; GFX7CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1242 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1243 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1245 ; GFX8CHECK-LABEL: isfinite_f64:
1246 ; GFX8CHECK: ; %bb.0:
1247 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1248 ; GFX8CHECK-NEXT: v_mov_b32_e32 v2, 0x1f8
1249 ; GFX8CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1250 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1251 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1253 ; GFX9CHECK-LABEL: isfinite_f64:
1254 ; GFX9CHECK: ; %bb.0:
1255 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1256 ; GFX9CHECK-NEXT: v_mov_b32_e32 v2, 0x1f8
1257 ; GFX9CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v2
1258 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1259 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1261 ; GFX10CHECK-LABEL: isfinite_f64:
1262 ; GFX10CHECK: ; %bb.0:
1263 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1264 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[0:1], 0x1f8
1265 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1266 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1268 ; GFX11CHECK-LABEL: isfinite_f64:
1269 ; GFX11CHECK: ; %bb.0:
1270 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1271 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[0:1], 0x1f8
1272 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1273 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1274 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1275 %1 = call i1 @llvm.is.fpclass.f64(double %x, i32 504) ; 0x1f8 = "finite"
1279 define i1 @isnormal_f32(float %x) nounwind {
1280 ; GFX7CHECK-LABEL: isnormal_f32:
1281 ; GFX7CHECK: ; %bb.0:
1282 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1283 ; GFX7CHECK-NEXT: v_mov_b32_e32 v1, 0x108
1284 ; GFX7CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1285 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1286 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1288 ; GFX8CHECK-LABEL: isnormal_f32:
1289 ; GFX8CHECK: ; %bb.0:
1290 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1291 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, 0x108
1292 ; GFX8CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1293 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1294 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1296 ; GFX9CHECK-LABEL: isnormal_f32:
1297 ; GFX9CHECK: ; %bb.0:
1298 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1299 ; GFX9CHECK-NEXT: v_mov_b32_e32 v1, 0x108
1300 ; GFX9CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1301 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1302 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1304 ; GFX10CHECK-LABEL: isnormal_f32:
1305 ; GFX10CHECK: ; %bb.0:
1306 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1307 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 0x108
1308 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1309 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1311 ; GFX11CHECK-LABEL: isnormal_f32:
1312 ; GFX11CHECK: ; %bb.0:
1313 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1314 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 0x108
1315 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1316 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1317 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1318 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 264) ; 0x108 = "normal"
1322 define <2 x i1> @isnormal_v2f64(<2 x double> %x) nounwind {
1323 ; GFX7CHECK-LABEL: isnormal_v2f64:
1324 ; GFX7CHECK: ; %bb.0:
1325 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1326 ; GFX7CHECK-NEXT: v_mov_b32_e32 v4, 0x108
1327 ; GFX7CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v4
1328 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1329 ; GFX7CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[2:3], v4
1330 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, vcc
1331 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1333 ; GFX8CHECK-LABEL: isnormal_v2f64:
1334 ; GFX8CHECK: ; %bb.0:
1335 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1336 ; GFX8CHECK-NEXT: v_mov_b32_e32 v4, 0x108
1337 ; GFX8CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v4
1338 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1339 ; GFX8CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[2:3], v4
1340 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, vcc
1341 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1343 ; GFX9CHECK-LABEL: isnormal_v2f64:
1344 ; GFX9CHECK: ; %bb.0:
1345 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1346 ; GFX9CHECK-NEXT: v_mov_b32_e32 v4, 0x108
1347 ; GFX9CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v4
1348 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1349 ; GFX9CHECK-NEXT: v_cmp_class_f64_e32 vcc, v[2:3], v4
1350 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, vcc
1351 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1353 ; GFX10CHECK-LABEL: isnormal_v2f64:
1354 ; GFX10CHECK: ; %bb.0:
1355 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1356 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[0:1], 0x108
1357 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1358 ; GFX10CHECK-NEXT: v_cmp_class_f64_e64 s4, v[2:3], 0x108
1359 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s4
1360 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1362 ; GFX11CHECK-LABEL: isnormal_v2f64:
1363 ; GFX11CHECK: ; %bb.0:
1364 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1365 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[0:1], 0x108
1366 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
1367 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1368 ; GFX11CHECK-NEXT: v_cmp_class_f64_e64 s0, v[2:3], 0x108
1369 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
1370 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1371 %1 = call <2 x i1> @llvm.is.fpclass.v2f64(<2 x double> %x, i32 264) ; 0x108 = "normal"
1375 define i1 @issubnormal_f32(float %x) nounwind {
1376 ; GFX7CHECK-LABEL: issubnormal_f32:
1377 ; GFX7CHECK: ; %bb.0:
1378 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1379 ; GFX7CHECK-NEXT: v_mov_b32_e32 v1, 0x90
1380 ; GFX7CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1381 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1382 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1384 ; GFX8CHECK-LABEL: issubnormal_f32:
1385 ; GFX8CHECK: ; %bb.0:
1386 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1387 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, 0x90
1388 ; GFX8CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1389 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1390 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1392 ; GFX9CHECK-LABEL: issubnormal_f32:
1393 ; GFX9CHECK: ; %bb.0:
1394 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1395 ; GFX9CHECK-NEXT: v_mov_b32_e32 v1, 0x90
1396 ; GFX9CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1397 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1398 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1400 ; GFX10CHECK-LABEL: issubnormal_f32:
1401 ; GFX10CHECK: ; %bb.0:
1402 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1403 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 0x90
1404 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1405 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1407 ; GFX11CHECK-LABEL: issubnormal_f32:
1408 ; GFX11CHECK: ; %bb.0:
1409 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1410 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 0x90
1411 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1412 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1413 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1414 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 144) ; 0x90 = "subnormal"
1418 define i1 @iszero_f32(float %x) nounwind {
1419 ; GFX7CHECK-LABEL: iszero_f32:
1420 ; GFX7CHECK: ; %bb.0:
1421 ; GFX7CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1422 ; GFX7CHECK-NEXT: v_mov_b32_e32 v1, 0x60
1423 ; GFX7CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1424 ; GFX7CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1425 ; GFX7CHECK-NEXT: s_setpc_b64 s[30:31]
1427 ; GFX8CHECK-LABEL: iszero_f32:
1428 ; GFX8CHECK: ; %bb.0:
1429 ; GFX8CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1430 ; GFX8CHECK-NEXT: v_mov_b32_e32 v1, 0x60
1431 ; GFX8CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1432 ; GFX8CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1433 ; GFX8CHECK-NEXT: s_setpc_b64 s[30:31]
1435 ; GFX9CHECK-LABEL: iszero_f32:
1436 ; GFX9CHECK: ; %bb.0:
1437 ; GFX9CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1438 ; GFX9CHECK-NEXT: v_mov_b32_e32 v1, 0x60
1439 ; GFX9CHECK-NEXT: v_cmp_class_f32_e32 vcc, v0, v1
1440 ; GFX9CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
1441 ; GFX9CHECK-NEXT: s_setpc_b64 s[30:31]
1443 ; GFX10CHECK-LABEL: iszero_f32:
1444 ; GFX10CHECK: ; %bb.0:
1445 ; GFX10CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1446 ; GFX10CHECK-NEXT: v_cmp_class_f32_e64 s4, v0, 0x60
1447 ; GFX10CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s4
1448 ; GFX10CHECK-NEXT: s_setpc_b64 s[30:31]
1450 ; GFX11CHECK-LABEL: iszero_f32:
1451 ; GFX11CHECK: ; %bb.0:
1452 ; GFX11CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1453 ; GFX11CHECK-NEXT: v_cmp_class_f32_e64 s0, v0, 0x60
1454 ; GFX11CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
1455 ; GFX11CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
1456 ; GFX11CHECK-NEXT: s_setpc_b64 s[30:31]
1457 %1 = call i1 @llvm.is.fpclass.f32(float %x, i32 96) ; 0x60 = "zero"
1461 declare i1 @llvm.is.fpclass.f32(float, i32)
1462 declare i1 @llvm.is.fpclass.f64(double, i32)
1463 declare <2 x i1> @llvm.is.fpclass.v2f32(<2 x float>, i32)
1464 declare <3 x i1> @llvm.is.fpclass.v3f32(<3 x float>, i32)
1465 declare <4 x i1> @llvm.is.fpclass.v4f32(<4 x float>, i32)
1466 declare <5 x i1> @llvm.is.fpclass.v5f32(<5 x float>, i32)
1467 declare <6 x i1> @llvm.is.fpclass.v6f32(<6 x float>, i32)
1468 declare <7 x i1> @llvm.is.fpclass.v7f32(<7 x float>, i32)
1469 declare <8 x i1> @llvm.is.fpclass.v8f32(<8 x float>, i32)
1470 declare <16 x i1> @llvm.is.fpclass.v16f32(<16 x float>, i32)
1471 declare <2 x i1> @llvm.is.fpclass.v2f64(<2 x double>, i32)