Note corrected.

llvm-svn: 85332
This commit is contained in:
Bill Wendling 2009-10-27 22:43:24 +00:00
parent cd4d148040
commit 2974f63cb5
1 changed files with 5 additions and 3 deletions

View File

@ -1955,12 +1955,13 @@ information to add the "lock" prefix.
//===---------------------------------------------------------------------===//
int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= 0x80; return b; }
int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= ~0x80; return b; }
Current:
movb %sil, %al
andb $-128, %sil
andb $127, %sil
orb $-128, %al
testb %dil, %dil
js LBB1_2
@ -1968,11 +1969,12 @@ Current:
LBB1_2:
movsbl %al, %eax
Better:
movl %esi, %eax
orl $-128, %eax
andl $-128, %esi
andl $127, %esi
testb %dil, %dil
cmovns %esi, %eax
movsbl %al,%eax