From 5a5692734541abe3c218b5c5eedbd84b0c0162a9 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 27 Oct 2009 22:48:31 +0000 Subject: Move and clarify note. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85334 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/README.txt | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'lib/Target/X86/README.txt') diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 876bb65..9b7aab8 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1954,34 +1954,3 @@ 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 $127, %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 $127, %esi - testb %dil, %dil - cmovns %esi, %eax - movsbl %al,%eax - -Best (recognize this as 'b = (b & ~0x80) | (a & 0x80)'): - - andb $-128, %dil - andb $127, %sil - orb %dil, %sil - movsbl %sil, %eax -- cgit v1.1