1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-linux | FileCheck %s -check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefixes=X64
5 define i1 @is_nan_f80(x86_fp80 %x) nounwind {
6 ; X86-LABEL: is_nan_f80:
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
9 ; X86-NEXT: fucomp %st(0)
10 ; X86-NEXT: fnstsw %ax
11 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
16 ; X64-LABEL: is_nan_f80:
17 ; X64: # %bb.0: # %entry
18 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
19 ; X64-NEXT: fucompi %st(0), %st
23 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 3) ; "nan"
27 define i1 @is_nan_f80_strict(x86_fp80 %x) nounwind strictfp {
28 ; X86-LABEL: is_nan_f80_strict:
29 ; X86: # %bb.0: # %entry
30 ; X86-NEXT: pushl %esi
31 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
32 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
33 ; X86-NEXT: andl $32767, %ecx # imm = 0x7FFF
34 ; X86-NEXT: xorl %edx, %edx
35 ; X86-NEXT: cmpl {{[0-9]+}}(%esp), %edx
36 ; X86-NEXT: movl $-2147483648, %esi # imm = 0x80000000
37 ; X86-NEXT: sbbl %eax, %esi
38 ; X86-NEXT: movl $32767, %esi # imm = 0x7FFF
39 ; X86-NEXT: sbbl %ecx, %esi
40 ; X86-NEXT: sbbl %edx, %edx
42 ; X86-NEXT: testl %ecx, %ecx
44 ; X86-NEXT: shrl $31, %eax
45 ; X86-NEXT: xorb %cl, %al
46 ; X86-NEXT: xorb $1, %al
47 ; X86-NEXT: orb %dl, %al
48 ; X86-NEXT: # kill: def $al killed $al killed $eax
52 ; X64-LABEL: is_nan_f80_strict:
53 ; X64: # %bb.0: # %entry
54 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
55 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rcx
56 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
57 ; X64-NEXT: movabsq $-9223372036854775808, %rdx # imm = 0x8000000000000000
58 ; X64-NEXT: cmpq %rcx, %rdx
59 ; X64-NEXT: movl $32767, %edx # imm = 0x7FFF
60 ; X64-NEXT: sbbq %rax, %rdx
62 ; X64-NEXT: shrq $63, %rcx
63 ; X64-NEXT: testq %rax, %rax
65 ; X64-NEXT: xorb %cl, %al
66 ; X64-NEXT: xorb $1, %al
67 ; X64-NEXT: orb %dl, %al
70 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 3) strictfp ; "nan"
74 define i1 @is_snan_f80(x86_fp80 %x) nounwind {
75 ; X86-LABEL: is_snan_f80:
76 ; X86: # %bb.0: # %entry
77 ; X86-NEXT: pushl %ebx
78 ; X86-NEXT: pushl %esi
79 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
80 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
81 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
82 ; X86-NEXT: xorl %ecx, %ecx
83 ; X86-NEXT: cmpl {{[0-9]+}}(%esp), %ecx
84 ; X86-NEXT: movl $-2147483648, %esi # imm = 0x80000000
85 ; X86-NEXT: sbbl %edx, %esi
86 ; X86-NEXT: movl $32767, %esi # imm = 0x7FFF
87 ; X86-NEXT: sbbl %eax, %esi
88 ; X86-NEXT: movl $0, %esi
89 ; X86-NEXT: sbbl %esi, %esi
91 ; X86-NEXT: cmpl $-1073741824, %edx # imm = 0xC0000000
92 ; X86-NEXT: sbbl $32767, %eax # imm = 0x7FFF
93 ; X86-NEXT: sbbl %ecx, %ecx
95 ; X86-NEXT: andb %bl, %al
100 ; X64-LABEL: is_snan_f80:
101 ; X64: # %bb.0: # %entry
102 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
103 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rcx
104 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
105 ; X64-NEXT: movabsq $-4611686018427387904, %rdx # imm = 0xC000000000000000
106 ; X64-NEXT: cmpq %rdx, %rcx
107 ; X64-NEXT: movq %rax, %rdx
108 ; X64-NEXT: sbbq $32767, %rdx # imm = 0x7FFF
110 ; X64-NEXT: movabsq $-9223372036854775808, %rsi # imm = 0x8000000000000000
111 ; X64-NEXT: cmpq %rcx, %rsi
112 ; X64-NEXT: movl $32767, %ecx # imm = 0x7FFF
113 ; X64-NEXT: sbbq %rax, %rcx
115 ; X64-NEXT: andb %dl, %al
118 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 1) ; "snan"
122 define i1 @is_qnan_f80(x86_fp80 %x) nounwind {
123 ; X86-LABEL: is_qnan_f80:
124 ; X86: # %bb.0: # %entry
125 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
126 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
127 ; X86-NEXT: xorl %ecx, %ecx
128 ; X86-NEXT: movl $-1073741825, %edx # imm = 0xBFFFFFFF
129 ; X86-NEXT: cmpl {{[0-9]+}}(%esp), %edx
130 ; X86-NEXT: movl $32767, %edx # imm = 0x7FFF
131 ; X86-NEXT: sbbl %eax, %edx
132 ; X86-NEXT: sbbl %ecx, %ecx
136 ; X64-LABEL: is_qnan_f80:
137 ; X64: # %bb.0: # %entry
138 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
139 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
140 ; X64-NEXT: movabsq $-4611686018427387905, %rcx # imm = 0xBFFFFFFFFFFFFFFF
141 ; X64-NEXT: cmpq {{[0-9]+}}(%rsp), %rcx
142 ; X64-NEXT: movl $32767, %ecx # imm = 0x7FFF
143 ; X64-NEXT: sbbq %rax, %rcx
147 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 2) ; "qnan"
151 define i1 @is_zero_f80(x86_fp80 %x) nounwind {
152 ; X86-LABEL: is_zero_f80:
153 ; X86: # %bb.0: # %entry
154 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
155 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
156 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
157 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
161 ; X64-LABEL: is_zero_f80:
162 ; X64: # %bb.0: # %entry
163 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
164 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
165 ; X64-NEXT: orq {{[0-9]+}}(%rsp), %rax
169 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 96) ; 0x60 = "zero"
173 define i1 @is_zero_f80_strict(x86_fp80 %x) nounwind strictfp {
174 ; X86-LABEL: is_zero_f80_strict:
175 ; X86: # %bb.0: # %entry
176 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
177 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
178 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
179 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
183 ; X64-LABEL: is_zero_f80_strict:
184 ; X64: # %bb.0: # %entry
185 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
186 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
187 ; X64-NEXT: orq {{[0-9]+}}(%rsp), %rax
191 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 96) strictfp ; 0x60 = "zero"
195 define i1 @is_poszero_f80(x86_fp80 %x) nounwind {
196 ; X86-LABEL: is_poszero_f80:
197 ; X86: # %bb.0: # %entry
198 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
199 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
200 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
204 ; X64-LABEL: is_poszero_f80:
205 ; X64: # %bb.0: # %entry
206 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
207 ; X64-NEXT: orq {{[0-9]+}}(%rsp), %rax
211 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 64) ; 0x40 = "+zero"
215 define i1 @is_negzero_f80(x86_fp80 %x) nounwind {
216 ; X86-LABEL: is_negzero_f80:
217 ; X86: # %bb.0: # %entry
218 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
219 ; X86-NEXT: xorl $32768, %eax # imm = 0x8000
220 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
221 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
225 ; X64-LABEL: is_negzero_f80:
226 ; X64: # %bb.0: # %entry
227 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
228 ; X64-NEXT: xorq $32768, %rax # imm = 0x8000
229 ; X64-NEXT: orq {{[0-9]+}}(%rsp), %rax
233 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 32) ; 0x20 = "-zero"
237 define i1 @is_inf_f80(x86_fp80 %x) nounwind {
238 ; X86-LABEL: is_inf_f80:
239 ; X86: # %bb.0: # %entry
240 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
241 ; X86-NEXT: notl %eax
242 ; X86-NEXT: movl $-2147483648, %ecx # imm = 0x80000000
243 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %ecx
244 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
245 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
246 ; X86-NEXT: orl %ecx, %eax
250 ; X64-LABEL: is_inf_f80:
251 ; X64: # %bb.0: # %entry
252 ; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax
253 ; X64-NEXT: notl %eax
254 ; X64-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
255 ; X64-NEXT: xorq {{[0-9]+}}(%rsp), %rcx
256 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
257 ; X64-NEXT: orq %rcx, %rax
261 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 516) ; 0x204 = "inf"
265 define i1 @is_posinf_f80(x86_fp80 %x) nounwind {
266 ; X86-LABEL: is_posinf_f80:
267 ; X86: # %bb.0: # %entry
268 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
269 ; X86-NEXT: movl $-2147483648, %ecx # imm = 0x80000000
270 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %ecx
271 ; X86-NEXT: xorl $32767, %eax # imm = 0x7FFF
272 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
273 ; X86-NEXT: orl %ecx, %eax
277 ; X64-LABEL: is_posinf_f80:
278 ; X64: # %bb.0: # %entry
279 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
280 ; X64-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
281 ; X64-NEXT: xorq {{[0-9]+}}(%rsp), %rcx
282 ; X64-NEXT: xorq $32767, %rax # imm = 0x7FFF
283 ; X64-NEXT: orq %rcx, %rax
287 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 512) ; 0x200 = "+inf"
291 define i1 @is_neginf_f80(x86_fp80 %x) nounwind {
292 ; X86-LABEL: is_neginf_f80:
293 ; X86: # %bb.0: # %entry
294 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
295 ; X86-NEXT: xorl $65535, %eax # imm = 0xFFFF
296 ; X86-NEXT: movl $-2147483648, %ecx # imm = 0x80000000
297 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %ecx
298 ; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
299 ; X86-NEXT: orl %ecx, %eax
303 ; X64-LABEL: is_neginf_f80:
304 ; X64: # %bb.0: # %entry
305 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
306 ; X64-NEXT: xorq $65535, %rax # imm = 0xFFFF
307 ; X64-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
308 ; X64-NEXT: xorq {{[0-9]+}}(%rsp), %rcx
309 ; X64-NEXT: orq %rax, %rcx
313 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 4) ; "-inf"
317 define i1 @is_normal_f80(x86_fp80 %x) nounwind {
318 ; X86-LABEL: is_normal_f80:
319 ; X86: # %bb.0: # %entry
320 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
321 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
322 ; X86-NEXT: andl $32767, %ecx # imm = 0x7FFF
323 ; X86-NEXT: decl %ecx
324 ; X86-NEXT: movzwl %cx, %ecx
325 ; X86-NEXT: xorl %edx, %edx
326 ; X86-NEXT: cmpl $32766, %ecx # imm = 0x7FFE
327 ; X86-NEXT: sbbl %edx, %edx
329 ; X86-NEXT: shrl $31, %eax
330 ; X86-NEXT: andb %cl, %al
331 ; X86-NEXT: # kill: def $al killed $al killed $eax
334 ; X64-LABEL: is_normal_f80:
335 ; X64: # %bb.0: # %entry
336 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
337 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rcx
338 ; X64-NEXT: shrq $63, %rcx
339 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
340 ; X64-NEXT: decl %eax
341 ; X64-NEXT: movzwl %ax, %eax
342 ; X64-NEXT: cmpl $32766, %eax # imm = 0x7FFE
344 ; X64-NEXT: andb %cl, %al
347 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 264) ; 0x108 = "normal"
351 define i1 @is_posnormal_f80(x86_fp80 %x) nounwind {
352 ; X86-LABEL: is_posnormal_f80:
353 ; X86: # %bb.0: # %entry
354 ; X86-NEXT: pushl %esi
355 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
356 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
357 ; X86-NEXT: movl %ecx, %edx
358 ; X86-NEXT: andl $32767, %edx # imm = 0x7FFF
359 ; X86-NEXT: decl %edx
360 ; X86-NEXT: movzwl %dx, %edx
361 ; X86-NEXT: xorl %esi, %esi
362 ; X86-NEXT: cmpl $32766, %edx # imm = 0x7FFE
363 ; X86-NEXT: sbbl %esi, %esi
365 ; X86-NEXT: testl $32768, %ecx # imm = 0x8000
367 ; X86-NEXT: shrl $31, %eax
368 ; X86-NEXT: andb %cl, %al
369 ; X86-NEXT: andb %dl, %al
370 ; X86-NEXT: # kill: def $al killed $al killed $eax
371 ; X86-NEXT: popl %esi
374 ; X64-LABEL: is_posnormal_f80:
375 ; X64: # %bb.0: # %entry
376 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rax
377 ; X64-NEXT: movswq {{[0-9]+}}(%rsp), %rcx
378 ; X64-NEXT: testq %rcx, %rcx
379 ; X64-NEXT: setns %dl
380 ; X64-NEXT: andl $32767, %ecx # imm = 0x7FFF
381 ; X64-NEXT: decl %ecx
382 ; X64-NEXT: movzwl %cx, %ecx
383 ; X64-NEXT: cmpl $32766, %ecx # imm = 0x7FFE
385 ; X64-NEXT: shrq $63, %rax
386 ; X64-NEXT: andb %dl, %al
387 ; X64-NEXT: andb %cl, %al
388 ; X64-NEXT: # kill: def $al killed $al killed $rax
391 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 256) ; 0x100 = "+normal"
395 define i1 @is_negnormal_f80(x86_fp80 %x) nounwind {
396 ; X86-LABEL: is_negnormal_f80:
397 ; X86: # %bb.0: # %entry
398 ; X86-NEXT: pushl %esi
399 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
400 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
401 ; X86-NEXT: movl %ecx, %edx
402 ; X86-NEXT: andl $32767, %edx # imm = 0x7FFF
403 ; X86-NEXT: decl %edx
404 ; X86-NEXT: movzwl %dx, %edx
405 ; X86-NEXT: xorl %esi, %esi
406 ; X86-NEXT: cmpl $32766, %edx # imm = 0x7FFE
407 ; X86-NEXT: sbbl %esi, %esi
409 ; X86-NEXT: testl $32768, %ecx # imm = 0x8000
410 ; X86-NEXT: setne %cl
411 ; X86-NEXT: shrl $31, %eax
412 ; X86-NEXT: andb %cl, %al
413 ; X86-NEXT: andb %dl, %al
414 ; X86-NEXT: # kill: def $al killed $al killed $eax
415 ; X86-NEXT: popl %esi
418 ; X64-LABEL: is_negnormal_f80:
419 ; X64: # %bb.0: # %entry
420 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rax
421 ; X64-NEXT: movswq {{[0-9]+}}(%rsp), %rcx
422 ; X64-NEXT: testq %rcx, %rcx
424 ; X64-NEXT: andl $32767, %ecx # imm = 0x7FFF
425 ; X64-NEXT: decl %ecx
426 ; X64-NEXT: movzwl %cx, %ecx
427 ; X64-NEXT: cmpl $32766, %ecx # imm = 0x7FFE
429 ; X64-NEXT: shrq $63, %rax
430 ; X64-NEXT: andb %dl, %al
431 ; X64-NEXT: andb %cl, %al
432 ; X64-NEXT: # kill: def $al killed $al killed $rax
435 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 8) ; "-normal"
439 define i1 @is_subnormal_f80(x86_fp80 %x) nounwind {
440 ; X86-LABEL: is_subnormal_f80:
441 ; X86: # %bb.0: # %entry
442 ; X86-NEXT: pushl %esi
443 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
444 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
445 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
446 ; X86-NEXT: andl $32767, %eax # imm = 0x7FFF
447 ; X86-NEXT: xorl %edx, %edx
448 ; X86-NEXT: addl $-1, %esi
449 ; X86-NEXT: adcl $-1, %ecx
450 ; X86-NEXT: adcl $-1, %eax
451 ; X86-NEXT: adcl $-1, %edx
452 ; X86-NEXT: cmpl $-1, %esi
453 ; X86-NEXT: sbbl $2147483647, %ecx # imm = 0x7FFFFFFF
454 ; X86-NEXT: sbbl $0, %eax
455 ; X86-NEXT: sbbl $0, %edx
457 ; X86-NEXT: popl %esi
460 ; X64-LABEL: is_subnormal_f80:
461 ; X64: # %bb.0: # %entry
462 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
463 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rcx
464 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
465 ; X64-NEXT: addq $-1, %rcx
466 ; X64-NEXT: adcq $-1, %rax
467 ; X64-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF
468 ; X64-NEXT: cmpq %rdx, %rcx
469 ; X64-NEXT: sbbq $0, %rax
473 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 144) ; 0x90 = "subnormal"
477 define i1 @is_possubnormal_f80(x86_fp80 %x) nounwind {
478 ; X86-LABEL: is_possubnormal_f80:
479 ; X86: # %bb.0: # %entry
480 ; X86-NEXT: pushl %esi
481 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
482 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
483 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
484 ; X86-NEXT: addl $-1, %ecx
485 ; X86-NEXT: adcl $-1, %edx
486 ; X86-NEXT: adcl $-1, %eax
487 ; X86-NEXT: movzwl %ax, %eax
488 ; X86-NEXT: xorl %esi, %esi
489 ; X86-NEXT: cmpl $-1, %ecx
490 ; X86-NEXT: sbbl $2147483647, %edx # imm = 0x7FFFFFFF
491 ; X86-NEXT: sbbl $0, %eax
492 ; X86-NEXT: sbbl %esi, %esi
494 ; X86-NEXT: popl %esi
497 ; X64-LABEL: is_possubnormal_f80:
498 ; X64: # %bb.0: # %entry
499 ; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax
500 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rcx
501 ; X64-NEXT: addq $-1, %rcx
502 ; X64-NEXT: adcq $-1, %rax
503 ; X64-NEXT: movzwl %ax, %eax
504 ; X64-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF
505 ; X64-NEXT: cmpq %rdx, %rcx
506 ; X64-NEXT: sbbq $0, %rax
510 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 128) ; 0x80 = "+subnormal"
514 define i1 @is_negsubnormal_f80(x86_fp80 %x) nounwind {
515 ; X86-LABEL: is_negsubnormal_f80:
516 ; X86: # %bb.0: # %entry
517 ; X86-NEXT: pushl %edi
518 ; X86-NEXT: pushl %esi
519 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
520 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
521 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
522 ; X86-NEXT: movl %eax, %ecx
523 ; X86-NEXT: andl $32767, %ecx # imm = 0x7FFF
524 ; X86-NEXT: xorl %esi, %esi
525 ; X86-NEXT: addl $-1, %edi
526 ; X86-NEXT: adcl $-1, %edx
527 ; X86-NEXT: adcl $-1, %ecx
528 ; X86-NEXT: adcl $-1, %esi
529 ; X86-NEXT: cmpl $-1, %edi
530 ; X86-NEXT: sbbl $2147483647, %edx # imm = 0x7FFFFFFF
531 ; X86-NEXT: sbbl $0, %ecx
532 ; X86-NEXT: sbbl $0, %esi
534 ; X86-NEXT: testl $32768, %eax # imm = 0x8000
535 ; X86-NEXT: setne %al
536 ; X86-NEXT: andb %cl, %al
537 ; X86-NEXT: popl %esi
538 ; X86-NEXT: popl %edi
541 ; X64-LABEL: is_negsubnormal_f80:
542 ; X64: # %bb.0: # %entry
543 ; X64-NEXT: movzwl {{[0-9]+}}(%rsp), %eax
544 ; X64-NEXT: movswq %ax, %rcx
545 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %rdx
546 ; X64-NEXT: andl $32767, %eax # imm = 0x7FFF
547 ; X64-NEXT: addq $-1, %rdx
548 ; X64-NEXT: adcq $-1, %rax
549 ; X64-NEXT: movabsq $9223372036854775807, %rsi # imm = 0x7FFFFFFFFFFFFFFF
550 ; X64-NEXT: cmpq %rsi, %rdx
551 ; X64-NEXT: sbbq $0, %rax
553 ; X64-NEXT: testq %rcx, %rcx
555 ; X64-NEXT: andb %dl, %al
558 %0 = tail call i1 @llvm.is.fpclass.f80(x86_fp80 %x, i32 16) ; 0x10 = "-subnormal"
562 declare i1 @llvm.is.fpclass.f80(x86_fp80, i32)