add a note
authorChris Lattner <sabre@nondot.org>
Fri, 2 Nov 2007 17:04:20 +0000 (17:04 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 2 Nov 2007 17:04:20 +0000 (17:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43642 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 567d5c4ebbd259d6a0899d6c8bc18ac3adb2609d..9a5ca427e1e1c9867ee129b19406c18ac5275a8f 100644 (file)
@@ -651,6 +651,26 @@ _f:
 
 etc.
 
+Another is:
+int usesbb(unsigned int a, unsigned int b) {
+       return (a < b ? -1 : 0);
+}
+to:
+_usesbb:
+       movl    8(%esp), %eax
+       cmpl    %eax, 4(%esp)
+       sbbl    %eax, %eax
+       ret
+
+instead of:
+_usesbb:
+       xorl    %eax, %eax
+       movl    8(%esp), %ecx
+       cmpl    %ecx, 4(%esp)
+       movl    $4294967295, %ecx
+       cmovb   %ecx, %eax
+       ret
+
 //===---------------------------------------------------------------------===//
 
 Currently we don't have elimination of redundant stack manipulations. Consider