From ab98c41337f8236169651efce4c59a6643ac303d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 24 Nov 2007 06:13:33 +0000 Subject: [PATCH] add a note llvm-svn: 44299 --- llvm/lib/Target/X86/README.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 9a5ca427e1e1..af73658bb362 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -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.