OSDN Git Service

add a note.
authorChris Lattner <sabre@nondot.org>
Sun, 8 Mar 2009 01:54:43 +0000 (01:54 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 8 Mar 2009 01:54:43 +0000 (01:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66359 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index e8c2561..c4746d0 100644 (file)
@@ -1818,3 +1818,25 @@ LBB1_1:  ## bb1
        jne     LBB1_1  ## bb1
 
 //===---------------------------------------------------------------------===//
+
+test/CodeGen/X86/2009-03-07-FPConstSelect.ll compiles to:
+
+_f:
+       xorl    %eax, %eax
+       cmpl    $0, 4(%esp)
+       movl    $4, %ecx
+       cmovne  %eax, %ecx
+       flds    LCPI1_0(%ecx)
+       ret
+
+we should recognize cmov of 0 and a power of two and compile it into a 
+setcc+shift.  This would give us something like:
+
+_f:
+       xorl %eax,%eax
+       cmpl    $0, 4(%esp)
+       seteq  %al
+       flds    LCPI1_0(%ecx, %eax,4)
+       ret
+
+//===---------------------------------------------------------------------===//