[llvm-commits] [llvm] r66359 - /llvm/trunk/lib/Target/X86/README.txt

Chris Lattner sabre at nondot.org
Sat Mar 7 17:54:43 PST 2009


Author: lattner
Date: Sat Mar  7 19:54:43 2009
New Revision: 66359

URL: http://llvm.org/viewvc/llvm-project?rev=66359&view=rev
Log:
add a note.

Modified:
    llvm/trunk/lib/Target/X86/README.txt

Modified: llvm/trunk/lib/Target/X86/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=66359&r1=66358&r2=66359&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Sat Mar  7 19:54:43 2009
@@ -1818,3 +1818,25 @@
 	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
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list