summaryrefslogtreecommitdiff
path: root/lib/Target/X86/README.txt
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-12-24 11:23:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-12-24 11:23:32 +0000
commit32d720bb2f733684880c9720855e0d44097c1f44 (patch)
treea0c877bd857a562e578f6df839a3d65805a75f07 /lib/Target/X86/README.txt
parentd873a4b89b365f1e58e808109cd77034517f095d (diff)
downloadllvm-32d720bb2f733684880c9720855e0d44097c1f44.tar.gz
llvm-32d720bb2f733684880c9720855e0d44097c1f44.tar.bz2
llvm-32d720bb2f733684880c9720855e0d44097c1f44.tar.xz
Chandler fixed this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r--lib/Target/X86/README.txt32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index b407955060..51722b2248 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -2060,35 +2060,3 @@ Instead we could generate:
The trick is to match "fetch_and_add(X, -C) == C".
//===---------------------------------------------------------------------===//
-
-unsigned log2(unsigned x) {
- return x > 1 ? 32-__builtin_clz(x-1) : 0;
-}
-
-generates (x86_64):
- xorl %eax, %eax
- cmpl $2, %edi
- jb LBB0_2
-## BB#1:
- decl %edi
- movl $63, %ecx
- bsrl %edi, %eax
- cmovel %ecx, %eax
- xorl $-32, %eax
- addl $33, %eax
-LBB0_2:
- ret
-
-The cmov and the early test are redundant:
- xorl %eax, %eax
- cmpl $2, %edi
- jb LBB0_2
-## BB#1:
- decl %edi
- bsrl %edi, %eax
- xorl $-32, %eax
- addl $33, %eax
-LBB0_2:
- ret
-
-//===---------------------------------------------------------------------===//