add a note, I have no idea how important this is.
authorChris Lattner <sabre@nondot.org>
Thu, 2 Feb 2006 19:16:34 +0000 (19:16 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 2 Feb 2006 19:16:34 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25907 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 36f287bcf9227f347da3f9a45af301a2947408a7..c8e359fced33490039f391d0f0990fcad3998256 100644 (file)
@@ -350,3 +350,27 @@ much sense (e.g. its an infinite loop). :)
 None of the FPStack instructions are handled in
 X86RegisterInfo::foldMemoryOperand, which prevents the spiller from
 folding spill code into the instructions.
+
+//===---------------------------------------------------------------------===//
+
+In many cases, LLVM generates code like this:
+
+_test:
+        movl 8(%esp), %eax
+        cmpl %eax, 4(%esp)
+        setl %al
+        movzbl %al, %eax
+        ret
+
+on some processors (which ones?), it is more efficient to do this:
+
+_test:
+        movl 8(%esp), %ebx
+       xor %eax, %eax
+        cmpl %ebx, 4(%esp)
+        setl %al
+        ret
+
+Doing this correctly is tricky though, as the xor clobbers the flags.
+
+