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

Bill Wendling isanbard at gmail.com
Tue Oct 27 15:34:43 PDT 2009


Author: void
Date: Tue Oct 27 17:34:43 2009
New Revision: 85329

URL: http://llvm.org/viewvc/llvm-project?rev=85329&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=85329&r1=85328&r2=85329&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Tue Oct 27 17:34:43 2009
@@ -1952,3 +1952,26 @@
 add target specific information to target nodes and have this information
 carried over to machine instructions. Asm printer (or JIT) can use this
 information to add the "lock" prefix.
+
+//===---------------------------------------------------------------------===//
+
+int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= 0x80; return b; }
+
+Current:
+
+        movb    %sil, %al
+        andb    $-128, %sil
+        orb     $-128, %al
+        testb   %dil, %dil
+        js      LBB1_2
+        movb    %sil, %al
+LBB1_2:
+        movsbl  %al, %eax
+
+Better:
+        movl    %esi, %eax
+        orl     $-128, %eax
+        andl    $-128, %esi
+        testb   %dil, %dil
+        cmovns  %esi, %eax
+        movsbl  %al,%eax





More information about the llvm-commits mailing list