add a note
authorChris Lattner <sabre@nondot.org>
Sat, 24 Nov 2007 06:13:33 +0000 (06:13 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 24 Nov 2007 06:13:33 +0000 (06:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44299 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 9a5ca427e1e1c9867ee129b19406c18ac5275a8f..af73658bb36215b0533468e7cd6f2dc819f66443 100644 (file)
@@ -1511,3 +1511,24 @@ LBB1_4:  # cond_true
         cmpl    $262144, %eax
 
 //===---------------------------------------------------------------------===//
+
+define i64 @test(double %X) {
+       %Y = fptosi double %X to i64
+       ret i64 %Y
+}
+
+compiles to:
+
+_test:
+       subl    $20, %esp
+       movsd   24(%esp), %xmm0
+       movsd   %xmm0, 8(%esp)
+       fldl    8(%esp)
+       fisttpll        (%esp)
+       movl    4(%esp), %edx
+       movl    (%esp), %eax
+       addl    $20, %esp
+       #FP_REG_KILL
+       ret
+
+This should just fldl directly from the input stack slot.