1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -mattr=+sse2 | FileCheck %s
4 define zeroext i8 @t(double %x) nounwind readnone {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
8 ; CHECK-NEXT: cvttpd2dq %xmm0, %xmm1
9 ; CHECK-NEXT: cvtdq2pd %xmm1, %xmm1
10 ; CHECK-NEXT: cmpeqsd %xmm0, %xmm1
11 ; CHECK-NEXT: movd %xmm1, %eax
12 ; CHECK-NEXT: andl $1, %eax
13 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
16 %0 = fptosi double %x to i32 ; <i32> [#uses=1]
17 %1 = sitofp i32 %0 to double ; <double> [#uses=1]
18 %2 = fcmp oeq double %1, %x ; <i1> [#uses=1]
19 %retval12 = zext i1 %2 to i8 ; <i8> [#uses=1]
23 define zeroext i8 @u(double %x) nounwind readnone {
25 ; CHECK: # %bb.0: # %entry
26 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
27 ; CHECK-NEXT: cvttpd2dq %xmm0, %xmm1
28 ; CHECK-NEXT: cvtdq2pd %xmm1, %xmm1
29 ; CHECK-NEXT: cmpneqsd %xmm0, %xmm1
30 ; CHECK-NEXT: movd %xmm1, %eax
31 ; CHECK-NEXT: andl $1, %eax
32 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
35 %0 = fptosi double %x to i32 ; <i32> [#uses=1]
36 %1 = sitofp i32 %0 to double ; <double> [#uses=1]
37 %2 = fcmp une double %1, %x ; <i1> [#uses=1]
38 %retval12 = zext i1 %2 to i8 ; <i8> [#uses=1]