1 ; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s 2 3 define i32 @isint_return(double %d) nounwind { 4 ; CHECK-NOT: xor 5 ; CHECK: cvt 6 %i = fptosi double %d to i32 7 ; CHECK-NEXT: cvt 8 %e = sitofp i32 %i to double 9 ; CHECK: cmpeqsd 10 %c = fcmp oeq double %d, %e 11 ; CHECK-NEXT: movd 12 ; CHECK-NEXT: andl 13 %z = zext i1 %c to i32 14 ret i32 %z 15 } 16 17 declare void @foo() 18 19 define void @isint_branch(double %d) nounwind { 20 ; CHECK: cvt 21 %i = fptosi double %d to i32 22 ; CHECK-NEXT: cvt 23 %e = sitofp i32 %i to double 24 ; CHECK: ucomisd 25 %c = fcmp oeq double %d, %e 26 ; CHECK-NEXT: jne 27 ; CHECK-NEXT: jp 28 br i1 %c, label %true, label %false 29 true: 30 call void @foo() 31 ret void 32 false: 33 ret void 34 } 35